Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2D platform game

Author
Message
Captain America
21
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 14th Jan 2006 04:54
I am interested in making a 2D platform game.

I am sort of a good 3D programer, but when it comes to 2D im lost.

It will look like this:



I do not want to use a tile based thing using things like this:

data 0,0,0,0,0
data 0,0,0,0,0
data 0,0,1,0,0
data 1,1,1,1,1

I would like to just use collision on certain sprites, like the gray sqaures(platforms). Would it be easier this way?
Can someone please help me with this?

Thanks!

-Cap'n-


Cheers,
Capt. America
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 14th Jan 2006 07:40
The concept is pretty straight forward, have a search for DB topics relating to 'Sliding collision'.

Most of the old DB demo/example were REGION based, there's bound to be some example(s) in the code base.

Region base sliding works via comparing a box shape region (the represents the players space) and calc it's sliding position against another set of BOX shapes (the environment/other objects).

While any example are probably 3D. Converting the logic to 2D (removing the Z) shouldn't be problem.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Jan 2006 14:19
If you're a good 3D programmer then box collision will work perfectly. Just check the X/Y of the player character compared to the platform to see which side you collided with. Box collision is just the same as..

Data 0,0,0,0
Data 1,1,1,1

Captain America
21
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 14th Jan 2006 20:13
ok thanks, but could someone explain how to jump.
I have the code from someone else, but i dont understand it very good yet.

Thanks!

-Cap'n-


Cheers,
Capt. America

Login to post a reply

Server time is: 2026-06-12 23:24:42
Your offset time is: 2026-06-12 23:24:42