Project Under is an aRPG/Platformer currently in development by two guys who share the same passion for video games. It is still on the early stages of development but with steady progress.

Image RSS Feed Latest Screens
Artwork sample
Blog RSS Feed Report abuse Latest Blog: Collision Detection Revamped and Testing

2 comments by PROJECTUNDER on Nov 26th, 2012

This past week I've been working on redoing how I handle the collisions in the game, previously it was a posteori collision system, basically the collision had to occurr and then react accordingly.The problem is that the collision already happened and part of the collision box was already inside the tile. Another problem with this is the fact that if the body of the object moved too fast it could go through another body without having a collision, this is also known as the "Tunnel Effect".

To solve this I had to redo some code and make it a priori collision system. Since I use tiles on this game basically I traced a line downwards and check the first tile that is collision able, then I get the tile information (position on the Y axis) and that would be my lowest position for my character. After that before I moved my character I stored the information on a variable then checked if that movement would go lower than my lowest position available, if it did then my new position would be my lowest point, if not then I moved my character with the given value.

We also added the sky background, full color on the character and the idle animation. I'm still working on the physics, I think I nailed it on my neutral jump and neutral jump with movement, but still have a long way for my moving jump. Here's a short video showing the implementation so far, please note that we don't have a jumping animation that's why it looks so funny when it jumps.

If you have any questions feel free to ask!

- Noe

Media RSS Feed Latest Video
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Offline Since
Jun 5, 2013
Mexico Mexico
Member Watch
Track this member
Activity Points
69,429 of 519,477
2 members
Time Online
1 second
Site Visits
Profile Visitors
1,088 (1 today)
Private Message
Send Now
Members Only
badilla0 friends since Nov 14, 2012