Well, I'm back. I can't believe my last post was in September of last year, and that over four months have passed me by - but then, that's what happens to side-projects like this when Real Life decides to slap you around a bit. It started with a bad back, which meant I couldn't sit in The Chair of Coding for a fortnight or so. Then some other family-related stuff consumed a bunch of time, followed by Christmas, New Year, and then the return of the bad back which actually took a serious turn and needed proper medical attention. I'm now on the mend (though still restricted of movement and unable to sit for more than 20 minutes at a time) thanks entirely to a wonderful physiotherapist who entertains herself by spending an hour every few days bending my lower back into new and interesting shapes.
So, with a Big Project just appearing over the horizon - I'm in the R&D stage right now, hoping to kick-off in April/May - and a little spare time available, I want to finish this game and publish it for all to enjoy, point-and-laugh at, or fall to their knees in awe of (delete as applicable). I've been thinking about the technicalities of the code over the past few days, and have decided that the best thing to do regarding the collision-detection cycle situation is to bite the bullet and write a proper framework to do this stuff in - kind of like what I did back at the beginning when pondering how to write to the screen efficiently, and which subsequently gave us CharPlot.
So, over this weekend my plan is to create a new 'Sprite' object structure, which will include the CharPlot structure but extend things by giving me a simple way to describe what was under the object when it moved, what to draw after it moves again, and what conditions trigger a collision-event. I use the term 'Sprite' loosely, since we're still working at the character level rather than at the pixel level, but since the CharPlot structure is already designed to accommodate pixel-level granularity (even though the CharPlot logic doesn't yet) this is a precursor to switching to that level in a later revision.
I will spend some hours reworking the routines that call CharPlot so that they route through a new Sprite handler to get to the right bits of data, and then I can rip out the nastiness that is the current collision-detection logic (or illogic, to be honest) and replace it with a nice Sprite-based routine which will use the extended features of the new structure.
But before I do any of that, I'm going to see if Notepad++ is really as good as it looks like it might be. Crimson Editor has served me well, but it's not quite up to the job of handling the kinds of complex macros I want to run when doing the save-assemble-test loop - and having played a little with N++ I'm thinking it might be just what I need to speed things up and remove some manual point-and-click steps when getting the code running in VICe.
So tonight is just going to be a couple of hours of environment tweaking, and then the next couple of sessions will be the aforementioned Sprite stuff. Stay tuned!

0 comments:
Post a Comment