information on creating a platform game

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
sp2011
Prole
Posts: 2
Joined: Sun Jan 02, 2011 3:26 am

information on creating a platform game

Post by sp2011 »

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!
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: information on creating a platform game

Post by Jasoco »

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.
User avatar
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

Post by BlackBulletIV »

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.
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.
User avatar
Chief
Party member
Posts: 101
Joined: Fri Mar 12, 2010 7:57 am
Location: Norway, 67° north

Re: information on creating a platform game

Post by Chief »

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.
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)
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: information on creating a platform game

Post by TechnoCat »

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.
Ceiling dt to a maximum (relatively small) number. The game will technically slow down time, but it will keep a minimum precision.
User avatar
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

Post by BlackBulletIV »

Ah so by using that method you would trade physical weirdness for slow motion. That would be the best solution I guess.
User avatar
FinalSin
Prole
Posts: 16
Joined: Tue Dec 14, 2010 3:09 pm

Re: information on creating a platform game

Post by FinalSin »

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.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: information on creating a platform game

Post by thelinx »

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.
Why?
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: information on creating a platform game

Post by TechnoCat »

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.
Well, I feel LOVE is perfectly able to do a platform. But, if you feel LOVE is too technical, you should check out E02.
User avatar
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

Post by BlackBulletIV »

FinalSin wrote:I think Flixel does it by limiting the frame rate regardless to a certain FPS.
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).
Post Reply

Who is online

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