Thursday, June 28, 2012

One Step Back and Three Steps Forward

I don't really understand why I couldn't wrap me head around the physics movement problem yesterday but here goes. I took a step back and wrote down on paper how I need the movement to work. When I took a look back at the code, it was easy to implement. Now Mario walks, runs, and slides properly around the screen. Jumping and gravity still isn't implemented yet because I need to do collision detection with the blocks.

The next thing I did was fix the animation class so now he animates properly. It doesn't look completely accurate yet, but I'm writing it off as "good enough" until I get the rest of the major elements implemented.

Finally, I created a tile manager class which takes a text file and prints out all the objects on screen. Amazingly I got this working my first try without any errors!

There is one bug to note. When Mario is standing still he appears behind all the objects on the screen. This has to do with the order that the sprites are being drawn and should be an easy fix.


No comments:

Post a Comment