Since the DOSember Game Jam was announced I’ve been toying with the idea of making another DOS game. Something small, that would allow me to try some ideas in the context of a game jam. I haven’t been too inspired lately, so I thought… why not?
I did some brainstorming with my son and we ended with a nice, if not genre revolutionary, idea for a tower defense game. I know we have game in there, but I’m not really into the genre which means that I don’t know how it works –a problem when you get to the level design part of it–. And also, as it has happened to me before, getting too deep in a game concept –with or without game design document– has…
Since the DOSember Game Jam was announced I’ve been toying with the idea of making another DOS game. Something small, that would allow me to try some ideas in the context of a game jam. I haven’t been too inspired lately, so I thought… why not?
I did some brainstorming with my son and we ended with a nice, if not genre revolutionary, idea for a tower defense game. I know we have game in there, but I’m not really into the genre which means that I don’t know how it works –a problem when you get to the level design part of it–. And also, as it has happened to me before, getting too deep in a game concept –with or without game design document– has the fundamental problem that it is me doing the graphics and unfortunately I can’t draw everything we came up with.
So that went nowhere (at least so far).
I have already my own library for DOS 32-bit games with DJGPP, and I have used this opportunity to fix a couple of bugs –although there could be more because I haven’t used it yet for a full game–, and I added mouse support because that would be required for a tower defense game.
And then, after a conversation #dosgameclub on Afternet in which people were lamenting that there were not many good platform games in DOS, I started investigating a little bit how would you do scrolling in the VGA with hardware assistance. What a nice side-quest!
So I ended in these two pages:
- Michael Abrash’s Graphics Programming Black Book, Special Edition
 - VGA registers documentation from PC-GPE
 
Abrash’s book is still a good read, even if some of the examples try to do too many things at once and sometimes it is quite hard to get what was the actual point; which I guess it may have not been a problem when it was published, because people interested in the topic would have been more used to reading assembler that I am today. Together with the PC-GPE documentation, I think I’m getting somewhere.
I’ve been working on a unchained branch, that is probably full of bugs, but at least I have a good implementation of a few things that make it very interesting compared to the simpler code I used for example in Gold Mine Run! and Alien Intruder (although is 16-bit, uses the same engine essentially). To be specific:
- Uses the 256K of VRAM of the VGA (unchained mode 
320x200; what people called mode Y). - That gives us a hardware back buffer (so you write on a hidden page and swap when done; no more racing the beam!), a full screen to store the background (for erases), and another screen to store tiles (or sprites, but have to be plane aligned).
 - Latched writes, that allow copying 4 pixels per byte from VRAM to VRAM (making some operations much faster). For example: erasing using the background screen or copying tiles from the tiles’ screen.
 - Screen split to have a HUD on the bottom of the screen (great to not have to update the HUD in both the visible screen and then back buffer).
 - 1-pixel “infinite” vertical scroll (WIP, but so far it works for 8 pixel tiles).
 
All working on a 386 30MHz, and I managed to implement this rather quickly, in a few evenings. And can you guess? Exactly: still no game!
There is now less than a month to finish the jam, so I don’t know what is going to happen. If I have a super clear idea of the game I was making, there would be time enough if I was only making the game, and it looks like I have two libraries now (the simple one and the unchained; ignoring the scroll for now!). So we will see if I can finally start anything this week.
Would you like to discuss the post? You can send me an email!