Wednesday, 21 January 2015

Retrochallenge 2015/01: Night Blitz


Well I've made another (possibly final) entry to Allen Huffman's 4K TRS-80 Color Computer Challenge. This program is a game idea I have been toying with since I first posted about it back in February 2013. It basically grew out of an attempt to represent the figure of  an airplane pointing in 8 possible directions using only the chunky block graphics of the MC-10 (and as Allen suggested, probably inspired by Air Combat for the Atari). Here is the initial sketch I made using my simple but handy graphics program "Sketch."


I had also originally planned an elaborate graphic for the title screen:
However, this was obviously a no-go if I was going to make a game that could fit into 4K. However, I was able to wedge in the simple 8 direction plane graphics and the skyline of London (my apologies to any Londoners out there if it is a complete miss on accuracy). The game is much simpler than the one I had originally envisioned, which would have involved flack bursts and enemy planes that shot back. In the version I  did create a single enemy plane travels back and forth from a random starting point on either side of the screen. However, I think that the game is probably much more playable than it would have been if I had not been constrained by the 4K limit. That limit really enforces a rigorous simplicity that probably results in a faster and more challenging BASIC game.  But you be the judge.  Here's a video:
The planes are less flickery in the real thing. The frame capture rate at which the Cam Studio software I use to create my videos is probably set too low to capture the animation accurately, but unfortunately the VMC-10 emulator is such a resource hog that I have to keep the rate low to prevent both programs from slowing each other down excessively.

3 comments:

  1. Hi,

    I'm making a game for the contest too, and I am dealing with flickering too. Is it better to set or reset to clear a color? I've been messing with different ways to get a quick redraw. I think I can work with what I have so far, but was wondering if there was any pokes besides the speed poke that might help with the flickering.

    ReplyDelete
  2. No magic poke. Just make sure you remove all unnecessary spaces and pack lines as tightly as possible using colons (See my http://jimgerrie.blogspot.ca/2014/10/converting-from-mc-10-to-coco-and-dragon.html for advice on the few places you must leave spaces in for the Coco). I also find that even once I have got something working, there are usually many ways to improve the logic and make the flow of the main loop more efficient. For example, if you're doing repetitive calculations in your main animation loop, put them in a variable at start up, or do a pre-calculation loop at startup and store the results in an array. Then just consult the variable rather than do a calculation. Also, although in NBLITZ I use reset to display the planes, I don't use RESET to clear them. Instead, I have two large strings filled with CHR$(128)s (the black sky character) and the little graphic of London characters for the bottom of the screen. I just print these two strings @0, and they clear the entire screen to the background of black sky and city skyline. Then I just redraw the planes in their new locations. This is much faster than RESETing the individual pixels of each plane or having complicated procedures to POKE them to black.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete