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.
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!
No blogs were found matching the criteria specified. We suggest you try the blog list with no filter applied, to browse all available. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.