Sunday, 24 August 2008

CPC nostalgy



What I was doing these days was, coding the CPC, playing some old CPC games, drinking tequila, more coding, more tequila, dreaming of CPC, coding the CPC, playing some old games and coding the CPC.

It was good. I am working on a demo but I really wish to code a game next time. For some reasons I am really obsessed, really dreaming of coding some games for the CPC. I won't be thinking of the state of the art all the time, at least the first 2-3 titles will be simple stuff focused on gameplay and decent speed. I mean, I will prefer to have small sprites and no tens of tricks and big sprites and the controls to work well and smooth. Maybe I'll have some cpu time to add some nice mode 1 rasters or something. Anyways,. I have two simple games in my mind as first developing plans.

Whatever, what I coded was not exactly a new effect (what I have now is the mathematics for drawing curves) but something I will be using with various ways, the main routine of the demo. The screenshot is an ugly representation that it just works (almost). But the most important code was some functions that help me to build new objects with data structures, providing things like adding new objects in an array, iterating through each object, taking care of memory or the max limit of objects, etc. Things that make coding much easier. I couldn't believe that I would create something that tries to look like C/C++.

Well, not exactly. There are a lot of things to be done (maybe some real memory allocation functions which split the memory in 256b blocks and a table to tell me which are reserved and which not, maybe more). But it just happened. As I code, I ask myself how some things would be written nicer, more organized or more practical for further use. And I just come into this. It's great, it will make game developing on CPC in the future much more nicer, but now I will continue with the demo and maybe leave that part and concentrate more on the effects.

But it's nice that I am building such a system. I'd really like to see how this makes life easier in game and demo development. Of course if I had to write, e.g. a dot record, I wouldn't make a call for the next object in the array list for each dot. But I would rather write an ugly unrolled code specifically for the effect. But for more general stuff that don't need much speed, this is great!

Till next week I will try to make the curves look nicer (maybe with something like WU pixels from a precalculated table) and maybe I'll need to start messing around with CRTC hardware for this demo. It's getting harder and more challenging. I am hoping to finish the demo in maybe 3 months, because I'll be coding for other things soon too, but most probably it will take some more time. At least I am coding. And happily! :)

No comments:

Post a Comment