Didn’t get a whole lot of visible stuff done this time around – in fact I pretty much broke the game into a million pieces so it’s not really in a playable state right now.
I felt it was finally time to start taking organization more seriously, so I started working on a generic GameEntity class that most of the rest of the objects in the game can inherit from. It started off very well, but before I knew it ye olde programming monster showed up and soon I was trying to generic-ify the most complex of tasks for no good reason. I knew it’d happen, but it was hard to avoid. Luckily I got back on track though.
Reorganizing code like this is kind of like playing Tetris – you start off nice and organized, but slowly little things pile up that mess up with your smooth plan, and eventually you have to focus on getting rid of those little things before you can get back to smooth running again. That’s basically what’s going on here.
Tile collision detection
Before, I had working tile collision detection, but it was very primitive and definitely overkill. It also had some issues when you wound up going more than one pixel at a time, like if you got hit or something. Then there was the issue of not being able to walk around obstacles very well.
So I decided it’s time to get this most basic of things out of the way by redoing the tile collision system. It’s such a simple concept but it’s always a big pain for me, no matter how hard I prepare for it. This time it took me a couple hours, but I got a better system than before working. Now I’m working on making it work properly if you’re faster than one pixel at a time. I’m not sure the best way to do this, I’m thinking some sort of iterative thing is probably what I’ll go for, but then the idea of recursive function stuff popped into my head.
At any rate, this advanced tile collision is a pain, I don’t know how I’m going to handle it when I try to do something like EarthBound’s collision detection in a future game 😯
This latest version isn’t really playable, but I’m putting it here for archival purposes and for anyone who’s curious anyway. Right now it’s set to moving at 3 pixels at a time.