I moved to a new URL! Check it out!

Dev Log: Tile Collisions!

Image


Finally after weeks of putting off the task I got around to implementing the tile based collision system in my C# SFML framework. Right there in that animation above is a simple movement that is actively colliding with the tiles, stopping the movement. I can scale up and down the hit box and sometimes it does get caught on an overlap as a result which is why it turns red.

I used a couple of references to get this working including Flashpunk's own tile collision which can be found in the source code, and I also took a peek at C# Punk to see how it was implemented there as well. My solution is similar, and maybe worse, but for now it works and that's all that matters.

With the tile based collision in, I have all the power in the world to make a platformer if I wanted... well, as long as it didn't have any slopes.

Comments

Jesse Chounard
Jesse Chounard
Slopes are fairly easy. Awhile back I wrote up a little bit about how I do it. (There's even some old XNA C# code in the sample project.)

http://thirdpartyninjas.com/blog/2010/07/28/sloped-platform-collision/
Posted August 11th 2013 9:58 PM
Kyle
Kyle
Oh rad! I will check this out, thanks! :D
Posted August 12th 2013 10:47 AM
new comment!

Post your comment!

Name
Email
Comment