Hello!
Now that I have built a space invaders clone ( http://love2d.org/forums/viewtopic.php?f=5&t=2304 ), next I would like to build a platform game.
Are there any tutorials around (forums or internet) or projects posted in the forums that can help me with that?
Basic information that I want to know, is 1) how to move the scenery from right to left and have collision detection with the various elements, e.g. obstacles, enemies of the scrolling scene against the player's sprite. 2) how to describe this scrolling scenery in lua, using tables, graphics and whatnot.
Thanks!
information on creating a platform game
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: information on creating a platform game
We're working on it. It's not that easy. Also, stay away from Box2D for character movement and interaction. It does not work. Box2D physics do not equal Mario or Sonic or Cave Story or even Super Meat Boy physics.
Work on something else for now. Or try your hand.
The problem I ran into is that if the computer slows down, dt does not work as well for making sure you move correctly. If I'm jumping and my computer has a hiccup, i.e. when my desktop picture fades from one to another, I end up jumping too short. DeltaTime is supposed to avoid this, but for some reason it does not. Don't know why.
Work on something else for now. Or try your hand.
The problem I ran into is that if the computer slows down, dt does not work as well for making sure you move correctly. If I'm jumping and my computer has a hiccup, i.e. when my desktop picture fades from one to another, I end up jumping too short. DeltaTime is supposed to avoid this, but for some reason it does not. Don't know why.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: information on creating a platform game
Hmmm, yeah, another problem I found with dt is if the framerate gets really low (like 1-3 FPS or something) then the physics system goes wild. For example boxes with run over each other, structures will collapse, and all manner of strange happenings.Jasoco wrote:The problem I ran into is that if the computer slows down, dt does not work as well for making sure you move correctly. If I'm jumping and my computer has a hiccup, i.e. when my desktop picture fades from one to another, I end up jumping too short. DeltaTime is supposed to avoid this, but for some reason it does not. Don't know why.
Re: information on creating a platform game
I have experienced that too. I was making a game where this ball would fall down a track, but when i i tried it on my old school laptop - which sometimes had 1-3 FPS - the ball would spasm and fly like a squirrel on coffee. (worked fine on my desktop)BlackBulletIV wrote:Hmmm, yeah, another problem I found with dt is if the framerate gets really low (like 1-3 FPS or something) then the physics system goes wild. For example boxes with run over each other, structures will collapse, and all manner of strange happenings.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: information on creating a platform game
Ceiling dt to a maximum (relatively small) number. The game will technically slow down time, but it will keep a minimum precision.BlackBulletIV wrote:Hmmm, yeah, another problem I found with dt is if the framerate gets really low (like 1-3 FPS or something) then the physics system goes wild. For example boxes with run over each other, structures will collapse, and all manner of strange happenings.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: information on creating a platform game
Ah so by using that method you would trade physical weirdness for slow motion. That would be the best solution I guess.
Re: information on creating a platform game
I think Flixel does it by limiting the frame rate regardless to a certain FPS. I have no idea how feasible that is here.
Unfortunately I came here to ask about doing a platformer too. I guess that'll have to go in a different library, alas.
Unfortunately I came here to ask about doing a platformer too. I guess that'll have to go in a different library, alas.
Re: information on creating a platform game
Why?FinalSin wrote:I think Flixel does it by limiting the frame rate regardless to a certain FPS. I have no idea how feasible that is here.
Unfortunately I came here to ask about doing a platformer too. I guess that'll have to go in a different library, alas.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: information on creating a platform game
Well, I feel LOVE is perfectly able to do a platform. But, if you feel LOVE is too technical, you should check out E02.FinalSin wrote:Unfortunately I came here to ask about doing a platformer too. I guess that'll have to go in a different library, alas.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: information on creating a platform game
I've never used Flixel, but I know FlashPunk (a similar library) has the option of either fixed frame rate (what you just described) or a variable capped frame rate, meaning that the frame rate can vary (therefore you use delta time) but it is capped to a certain frame rate (by default 60).FinalSin wrote:I think Flixel does it by limiting the frame rate regardless to a certain FPS.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 4 guests