Positron8 - Star Raiders (ish) game using a small 18F device and a 128x64 LCD

Started by top204, Sep 27, 2024, 01:26 PM

Previous topic - Next topic

top204

On youtube, I happened across a video of a favourite game of mine on the Atari 800 computer back in the early 1980s named 'Star Raiders', and it stirred my nostalgia so much that I had a bit of time on my hands and started writing a game similar to it, but using a PIC18F chip running at 16MHz and a 128x64 KS0108 graphic LCD, instead of the lovely giant 'tank of a machine' that was the Atari 800. :-)

It simulates the perspective 3D stars movement and the alien ship movement so it gets smaller and larger while randomly moving on the display, and the ship's viewer with the fire mechanism, and the rear view of the stars. I doubt if I will complete it, but it was fun writing the 3D perspective of the stars so they also move in relationship with the direction buttons. It has been something I have wanted to write since the 1980s when I first came across computers, but never had the time or the incentive.

Below is a movie of the game code running in a simulator, and even in that it was running too fast, so I had to slow it down with differing tick event timings for each item, so on a real device it operates very smoothly and no flicker at all on the display, and only using a 16MHz PIC18F26K40 device and using only 4K of flash memory and 246 bytes of RAM, at the moment. It just goes to show what the compiler is capable of producing, using only the high level language itself, and no tweeks to the code using any assembler. The code also uses signed 16-bit variables (SWord), for all the item movements, including the stars in 3 arrays for X, Y and Z coordinates, so it shows how efficient they are as well in the Positron8 compiler.

I know it is a pointless task, but it was fun to write the code so far, and it triggered some good memories of first seeing the wonderful Atari 800 in action as a young-un. I wish I had kept my lovely Atari 800 machine, but I had to sell it after my injury:



JonW

That is cool!  Nice one.  Remember that Elite game that shocked the world back in the days, expert use of math and small code space. 

JonW

I know its not the same but here is a windows emulator for the Atari. Emulator