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! / I need som help on 2-D collision please

Author
Message
Obee Wan
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: The Daegoba system
Posted: 28th Feb 2004 20:45
I need to know how to have "multiple" collisions, i.e. if the player jumps on top of the enemy the enemy is killed, but if it collides everywhere else but there with the enemy the player dies. So I would appriciate any help anybody cold give me. This type of collision is quite necessary especually since many of the tiles will be interactive.

Use The Force Luke!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 28th Feb 2004 22:41
Well if you are using tiles, and the player jumps on top of an enemy, then you can work out that the player is on the tile above the enemy. Or you could check their X/Y positions, and the player has a similar X, but a lower Y position. Y-32 or whatever. It's not really a different collision problem. It's a programming problem. Different tiles can have different types of collision just by storing different numbers in their map positions.

0= No collision.
1= Walls
2=Doors

Whatever you like.

Login to post a reply

Server time is: 2024-05-18 03:01:21
Your offset time is: 2024-05-18 03:01:21