Page 6 of 7

Re: PlatformGuy! V0.4

Posted: Mon Dec 03, 2012 10:57 pm
by Puzzlem00n
Uh, for me the new download still ends after the first level... :huh:

P.S., did you miss my suggestion? I don't know if I made it clear that I'm pretty sure the game will be broken without that fix, it's not just the indentation I'm worried about.

Re: PlatformGuy! V0.4

Posted: Mon Dec 03, 2012 11:15 pm
by Qcode
WolfNinja2 wrote: EDIT: I tried the for loop you suggested, does not work, says expected userdata.
I'm sorry, make that

Code: Select all

for i = 1, P_bullets do
     g.draw(B_pic, i*32, 26, math.rad(-90), 4, 4)
end

Re: PlatformGuy! V0.4

Posted: Mon Dec 03, 2012 11:37 pm
by WolfNinja2
Puzzlem00n wrote:Uh, for me the new download still ends after the first level... :huh:

P.S., did you miss my suggestion? I don't know if I made it clear that I'm pretty sure the game will be broken without that fix, it's not just the indentation I'm worried about.
I saw it and took the advice of orginization, and WOW... I did the same mistake twice. D:< Tired mistake, the download will be fixed now.

And Do you all really not like that he runs mid-air? I can change that :p I liked it though

Re: PlatformGuy! V0.4

Posted: Tue Dec 04, 2012 4:40 am
by substitute541
Putting "ends" at random places until it gives no errors is a bad practice. Try using whitespaces in your code. Something like :

Code: Select all

for i=1, 100 do
    if i < 50 then
        print("i is less than 50 and is currently equal to" .. i)
    end
end
Instead of :

Code: Select all

for i=1,100 do
if i<50 then
print("i is less than 50 and is currently equal to"..i)
end
end
Of course, it's up to the programmer if he wants different styles or not. I am just suggesting a cleaner, readable style. If you wanna learn more, there's a wikipedia page about programming styles.

Re: PlatformGuy! V0.4

Posted: Tue Dec 04, 2012 11:01 am
by WolfNinja2
substitute541 wrote:Putting "ends" at random places until it gives no errors is a bad practice. Try using whitespaces in your code. Something like :

Code: Select all

for i=1, 100 do
    if i < 50 then
        print("i is less than 50 and is currently equal to" .. i)
    end
end
Instead of :

Code: Select all

for i=1,100 do
if i<50 then
print("i is less than 50 and is currently equal to"..i)
end
end
Of course, it's up to the programmer if he wants different styles or not. I am just suggesting a cleaner, readable style. If you wanna learn more, there's a wikipedia page about programming styles.
I always try to organize code like this. What Puzz was referencing was pretty much just me being a newb and forgetting end's after statements then making up for it by putting them at the bottom of the function. Thanks for the help though :)

-Wolf

Re: PlatformGuy! V0.4

Posted: Wed Dec 05, 2012 3:37 am
by Puzzlem00n
Ah, and yet still probs with love.draw... You may notice that Nsmurf's congratulations no longer prints on level 2. This' should fix that, if I'm understanding how the secret works ;) :

Code: Select all

function love.draw()
	if secret == "OFF MOFO" then
		bulletdraw()
      
		if startstate == "starting" then
			g.setFont(small)
			g.print("Hello! Welcome To PlatformGuy!", 266, 220)
			g.print("Controls Are: Arrow Keys,",266, 240)
			g.print("Enter To Restart LvL,",266, 260)
			g.print("Spacebar to shoot, (Try shooting Spikes!)",266,280)
			g.print("S to change Skin!",266,300)
			g.print("Press Enter To Start!",266,320)
		elseif gamestate == "lvl 2" then
			g.setColor(0,255,0,100)
			g.print("Congratz to Nsmurf for finding the Waffles!",40,268)
		elseif gamestate == "lvl 4" then
			g.setColor(255,255,255,255)
			g.draw(tile,768,320,0,2,2,0)
		end
      
		enemy_draw()
		  
		playerdraw()
		  
		mapdraw()
		  
		bullet_counter_draw()
		  
		g.setFont(small)
		g.print("Deaths:" .. P_deaths, 300, 5)
		  
		secret_draw()
		  
		  
		  --DEBUGGING
		  
			 --print( P_storedY ,5, 65)
			 --print( P_timer )
			 --print( P_storedY - player.y)
			 --print( player.x)
			 --print( player.y)
			 --print( B_x )
			 --print( B_y )
		  
		  --------------------------------
	elseif secret == "ON MOFO" then
		g.setColor(255,255,255,255)
		g.setFont(small)
		g.print("HOW DID YOU FIND THIS?! YOU SHOULDN't BE HERE!",32,32)
		g.print("Well, since you're here,reply on my LOVE2D, post,",32,64)
		g.print("' I found the secret, and I DIDN'T USE THE CODE TO HELP. '",32,96)
		g.print(" :) ",32,128)
		g.print("Press '1' and 'Enter' at the same time to continue",32,160)
	end
end

Re: PlatformGuy! V0.4

Posted: Wed Dec 05, 2012 12:17 pm
by WolfNinja2
Puzzlem00n wrote:Ah, and yet still probs with love.draw... You may notice that Nsmurf's congratulations no longer prints on level 2. This' should fix that, if I'm understanding how the secret works ;) :
Man Puzz, you always got my back xD

So, what does everyone think should be in 0.5?
Moving platforms? or
A new location? (The lab) or
A actual ending screen? :)

Tell me what you think!

Re: PlatformGuy! V0.4

Posted: Thu Dec 06, 2012 6:44 am
by Codex
WolfNinja2 wrote:
Puzzlem00n wrote: So, what does everyone think should be in 0.5?
Here's a tougie - procedural generated levels.

:joker:

Re: PlatformGuy! V0.4

Posted: Thu Dec 06, 2012 3:28 pm
by WolfNinja2
Procedural means like there will always be some thing there no matter what? (Like let's say the ground, and a way to get to the door? )
Or
There's a pattern of some sort.

I think I could do randomn generation but I have no idea how to make it work like that up there lol.

Sounds like a fun challenge though!!!!

:)

-Wolf

Re: PlatformGuy! V0.4

Posted: Wed Dec 12, 2012 9:43 pm
by ananasblau
Am I the only one to hit left/right first and then the up button?