PDA

View Full Version : Non tile engine platformers



snottlebocket
August 13th, 2008, 04:51 PM
Hey guys,

I'm just doing some 'research' out of curiosity. I was just playing around with Tonypa's tile engine tutorials the other day, applying them in AS3 when I started looking around at some of the platformers out there.

I have a fair understanding of all the simple platform functioning like the basic 'if your y-position is beyond the floor, reset your position to the floor' kind of stuff and straight up 'you can't walk on this tile kind of stuff'.

I've also noticed there's a few platformers out there that use a decidedly non tile based way of checking character-platform collisions. Most notably the amazing mr fancy pants game. (http://armorgames.com/play/553/the-fancy-pants-adventure-world-2)

I was wondering if anyone knows how games like this work out their platform collisions. I know that games like for example the recent super mario galaxy let's Mario run around all kinds of funky shapes by aligning Mario perpendicular against the face of a 3d object he's standing on by using vector normals.

My best guess is that fancy pants is based on a similar system using vector normals. Still that's just a guess and I'd love to know more if there's anyone here with a better understanding it. Fancy pants is such an amazingly smooth polished ride that even if it is based on vector normals it's only the beginning of a lot of very neat programming. (and so smoothly running in flash too!)

substance
August 16th, 2008, 01:41 PM
A combination of bitmapData hittests and multiple hitboxes on a character.

http://teamimpulse9.com/platformerHitboxes.jpg

Then using a WHILE loop to check if both bottom hitboxes(feet) are intersecting with the map. If so, move the character up untill the problem is resolved.

example (http://teamimpulse9.com/Platformer/Platformer.html)

snottlebocket
August 19th, 2008, 07:17 AM
Interesting, I toyed with that method while playing around with simple beat'em up moves. Hitpoints on the tips of the fists and so on. At the time I assumed it was too inefficient to do anything serious with.

Do you align the character to the slopes by attempting to align both feet to a surface? I noticed that by jumping into a vertical surface the game seems to place the character on the on the vertical surface like an insect, causing a glitch.

andrew2110
August 19th, 2008, 07:30 AM
Personally if I was going to build a platformer I'd look at using Box2D to simulate the world. Mostly because I saw this demo yesterday:

http://www.bakis.se/temp/jungle

And it really impressed me.

snottlebocket
August 19th, 2008, 07:49 AM
Heh good point, with the various excellent physics engines around these days coding a tile engine or similar might be a bit redundant.

rahul_7star
August 19th, 2008, 11:00 AM
Personally if I was going to build a platformer I'd look at using Box2D to simulate the world. Mostly because I saw this demo yesterday:

http://www.bakis.se/temp/jungle

And it really impressed me.


wonderfull game .......plz share this source code

andrew2110
August 19th, 2008, 12:05 PM
haha I wish I could make a game like that :( I stumbled upon it whilst trying to read up about Box2D, just an example of what you can do with Box2D

shazzmoe
August 25th, 2008, 07:08 PM
I am also looking at various ways to code a sidescrolling game. I personally prefer using the hit test points method of doing things and for small areas it has been working great for me. However I am now trying to make a larger level for my game and the "ground" that my player walks on is longer than the 3700 pixels i can go to the right of the stage.

To clarify what i mean by this I have a ground MC that scrolls left and right as the player moves around on it. So in flash I'm building the ground MC and have now gone so far to the right that it will no longer allow me to build any further in that direction. I could probably come up with a way to load a new section once the player reaches that point, but that would be very tedious to make it seamlessly stream into the next part. So i was just wondering if there was a way to make a movie clip span a wider section in flash. If not I'll probably just break up the level into section.

motionsmith
September 12th, 2008, 04:17 AM
Box2D is definitely the future of Flash Platformers. I've seen some pretty amazing stuff on the Box2D XNA build and it's only a matter of time before that quality starts getting replicated in Flash.

I started creating a Platformer based on APE, called Citrus Engine (Check it out at my site: www.blueflamedev.com). All the demos on the site are in APE, but I'm currently converting it to Box2D for performance increases and for other features like complex shapes and angular velocity.

I'm looking to collaborate if anyone's interested.

rahul_7star
October 9th, 2008, 09:27 AM
hi guys a small demo using box2d ...Andrew thanks for that above link..its form there i got this BOX2D
http://rahul7star.googlepages.com/box