PlatformGuy! V0.4

Show off your games, demos and other (playable) creations.
User avatar
Puzzlem00n
Party member
Posts: 171
Joined: Fri Apr 06, 2012 8:49 pm
Contact:

Re: PlatformGuy! V0.4

Post 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.
I LÖVE, therefore I am.
User avatar
Qcode
Party member
Posts: 170
Joined: Tue Jan 10, 2012 1:35 am

Re: PlatformGuy! V0.4

Post 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
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: PlatformGuy! V0.4

Post 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
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: PlatformGuy! V0.4

Post 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.
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: PlatformGuy! V0.4

Post 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
User avatar
Puzzlem00n
Party member
Posts: 171
Joined: Fri Apr 06, 2012 8:49 pm
Contact:

Re: PlatformGuy! V0.4

Post 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
I LÖVE, therefore I am.
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: PlatformGuy! V0.4

Post 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!
User avatar
Codex
Party member
Posts: 106
Joined: Tue Mar 06, 2012 6:49 am

Re: PlatformGuy! V0.4

Post by Codex »

WolfNinja2 wrote:
Puzzlem00n wrote: So, what does everyone think should be in 0.5?
Here's a tougie - procedural generated levels.

:joker:
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: PlatformGuy! V0.4

Post 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
ananasblau
Prole
Posts: 11
Joined: Tue Nov 06, 2012 6:44 pm
Location: Austria
Contact:

Re: PlatformGuy! V0.4

Post by ananasblau »

Am I the only one to hit left/right first and then the up button?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests