Prototype: Platformer


With the wonderful tutorial over at Emanuele Feronato's website, I've started to clean up and tweak the code to work on my very own platformer. I've always wanted to do one, but always had the hardest time figuring out collision on the side of walls while jumping or falling.

The code itself is pretty straight forward, but there's a number of places that hard code entity placement based on the width or height of said entity. Since I don't want to use a 18px tall sprite for the player, for example, I had to make it so it was taking in the width and height of the actual sprite and compare it against the tile size. It wasn't hard, I just had to track it down in all the spots it was happening (keys, coins, enemies, player).

Anyway, the goal is to make a platformer like the one built into Alien Hominid. The theme would be Sadie rescuing me and other Shen family members from Mr. Peterson (the jealous cat that pees on things).

This game will come out one day.