Uh, for me the new download still ends after the first level...
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.
PlatformGuy! V0.4
- Puzzlem00n
- Party member
- Posts: 171
- Joined: Fri Apr 06, 2012 8:49 pm
- Contact:
Re: PlatformGuy! V0.4
I LÖVE, therefore I am.
Re: PlatformGuy! V0.4
I'm sorry, make thatWolfNinja2 wrote: EDIT: I tried the for loop you suggested, does not work, says expected userdata.
Code: Select all
for i = 1, P_bullets do
g.draw(B_pic, i*32, 26, math.rad(-90), 4, 4)
end
- WolfNinja2
- Party member
- Posts: 150
- Joined: Wed Oct 24, 2012 10:10 pm
Re: PlatformGuy! V0.4
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.Puzzlem00n wrote:Uh, for me the new download still ends after the first level...
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.
And Do you all really not like that he runs mid-air? I can change that :p I liked it though
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: PlatformGuy! V0.4
Putting "ends" at random places until it gives no errors is a bad practice. Try using whitespaces in your code. Something like :
Instead of :
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.
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
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
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
- WolfNinja2
- Party member
- Posts: 150
- Joined: Wed Oct 24, 2012 10:10 pm
Re: PlatformGuy! V0.4
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 thoughsubstitute541 wrote:Putting "ends" at random places until it gives no errors is a bad practice. Try using whitespaces in your code. Something like :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.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
-Wolf
- Puzzlem00n
- Party member
- Posts: 171
- Joined: Fri Apr 06, 2012 8:49 pm
- Contact:
Re: PlatformGuy! V0.4
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.
- WolfNinja2
- Party member
- Posts: 150
- Joined: Wed Oct 24, 2012 10:10 pm
Re: PlatformGuy! V0.4
Man Puzz, you always got my back xDPuzzlem00n 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 :
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
Here's a tougie - procedural generated levels.WolfNinja2 wrote:Puzzlem00n wrote: So, what does everyone think should be in 0.5?
- WolfNinja2
- Party member
- Posts: 150
- Joined: Wed Oct 24, 2012 10:10 pm
Re: PlatformGuy! V0.4
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
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
-
- Prole
- Posts: 11
- Joined: Tue Nov 06, 2012 6:44 pm
- Location: Austria
- Contact:
Re: PlatformGuy! V0.4
Am I the only one to hit left/right first and then the up button?
I'm doing #onegameamonth | http://ananasblau.com/games | http://twitter.com/ananasblau
Who is online
Users browsing this forum: Google [Bot] and 0 guests