Platform game stuff
Displaying 1-5 of 5 total.
1
mr_blister

Sorry, this has probably been asked before, but I did look around, and also googled my backside off before I posted this.

I'd just like to know if anyone could point me towards some good tutorials of what is required to make platform games. I *think* I've got a good idea of what is needed (lots and lots of collision detection + gravity) but I don't know how to put it together to make a solution.

If I tried things my way, I'd have a big-ass list of walls and enemies that I'd have to iterate through constantly to check that my char has landed on the ground/bumped into a wall/killed an enemy/been hit by an enemy/whatever. That can't possibly be sensible, can it?

Also anyone who's done this with Verge, could you point me to how to do this with the Verge system? I'm guessing that if you're clever (which I'm not :P), you'd make use of zones/obstructions?

Posted on 2006-09-07 07:03:35

Want to reply? login or register!

Overkill

I've done this with Snowball and My Two Bits, among other things that haven't been publically released. My platformer code utilizes the Vege's obstructions and zones.

The floor collision detection in Snowball got a bit glitchy once introducing those pushable, ridable, gravity adhering platforms. And Snowball uses a customized Verge engine, unfortunately. So some of the functions and variables used don't exist, or have other names in the official build. But the general idea is there, and I've since updated Snowball to use an official engine (so I should really, really should rerelease).

My Two Bits was made before there was any way of getting a zone's script, so I had to get the zone's index using GetZone() and then CallFunction("Zone" + str(zone)); for each on-map event.

Oh yeah, and another source to glance over maybe could be 4Four, by Zaratustra, although it's a Verge2 game, and thus different in some ways (for example, pixel obstructions didn't exist natively, so an invisible map layer was read from instead, and basically all drawing routines differ from Verge3), It was a good resource when I made my first platform thing for fun.

So, play these, and then look over their source code. Some things are sort of scary, like how I maintain consistant timing for the various platforms, or how I cheaply work around stupid things like falling while walking downhill. Yeah, and 4Four's code is kind of ugly and not very well spaced, but considering it was made in 48 hours, and is basically a game with an ending, it's awesome. ;_;

Posted on 2006-09-07 08:54:12

Want to reply? login or register!

Omni

The physics within 4Four are quite sufficient for gaining the general idea of how to build a good platformer. Pay attention to the parts on friction (halts movement when control is stopped) and velocity (controls don't actually move the player -- they just help him accelerate in a given direction).

Posted on 2006-09-07 09:54:37

Want to reply? login or register!

zonker6666

Hi there - heres a bit of advice concerning platform game development ---- this is approaches i've taken in my own projects that I know work - if you want to check out source code download the Zelda 2 and the Solomon's Key remakes that (shoulc) contain the full source.


So .. here goes.

For obstructions I used a special layer (not obstructions layer --- although u could also use that) that was only there to hold solid colored tiles - each meaning a different thing ----- RGB(0,0,255) for example was solid - RGB(255,255,255) was a jump pad --- water - quicksand and so on - each with its own color,

Now ---- as the game loop iterates thru creatures - the player - items etc they would all get the gravity constant applied to them (say +2 to their Y coordinate) .... then they would all look at the pixel right under their feet and check its color ---- if its nothing (thin air) then keep falling ... -- if its red -- stop --- white --- set their yspeed to 12 --- (a jump)

You get the idea ------

this way you can also change the properties of terrain on the board like changing all water tiles to ice --- or whatever...

---------------------------------------------------------------------------------

#2 how to keep the level changes as game progresses.

Say your player is on level X and has taken the jewel of absurdity and has opened 3 doors there ------ then he leaves the level and comes back there again ----- you need to have a temporary file that will be used to store the level itself with all the content changes. This you would load every time the player enters --- except on the first time it is entered (instead you would use the original map and create the changed copy as he exits)


----- well thats my 2 cents on that - i hope it helps you out -- if u have any questions or clarifications just let me know ;)

cheers

Posted on 2006-09-08 04:36:37

Want to reply? login or register!

zonker6666

Hi there - heres a bit of advice concerning platform game development ---- this is approaches i've taken in my own projects that I know work - if you want to check out source code download the Zelda 2 and the Solomon's Key remakes that (shoulc) contain the full source.


So .. here goes.

For obstructions I used a special layer (not obstructions layer --- although u could also use that) that was only there to hold solid colored tiles - each meaning a different thing ----- RGB(0,0,255) for example was solid - RGB(255,255,255) was a jump pad --- water - quicksand and so on - each with its own color,

Now ---- as the game loop iterates thru creatures - the player - items etc they would all get the gravity constant applied to them (say +2 to their Y coordinate) .... then they would all look at the pixel right under their feet and check its color ---- if its nothing (thin air) then keep falling ... -- if its red -- stop --- white --- set their yspeed to 12 --- (a jump)

You get the idea ------

this way you can also change the properties of terrain on the board like changing all water tiles to ice --- or whatever...

---------------------------------------------------------------------------------

#2 how to keep the level changes as game progresses.

Say your player is on level X and has taken the jewel of absurdity and has opened 3 doors there ------ then he leaves the level and comes back there again ----- you need to have a temporary file that will be used to store the level itself with all the content changes. This you would load every time the player enters --- except on the first time it is entered (instead you would use the original map and create the changed copy as he exits)


----- well thats my 2 cents on that - i hope it helps you out -- if u have any questions or clarifications just let me know ;)

cheers

Posted on 2006-09-08 04:56:46

Want to reply? login or register!


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.