Newsletter #1 - Vexxon The Game
Creating unique games for the PiTrex #pitrex #vectrex #retrogaming
I hope all of you have in the meantime a working PiTrex connected to your beloved Vectrex. If not, you can try out most of the parts on Windows and macOS, but of course, it’s not the same experience. One of the main reasons we all love the Vectrex is because of his unique vector monitor.
But let’s start now with part one!
Vexxon - The Game
My plan was to create a game like Zaxxon for the Vectrex. Zaxxon is one of my most favored games on many platforms and so far not available for the Vectrex.
As far as I know, there is also no port for it on any vector-based arcade machine. But that’s my goal and after a few changes to a little game library I already had, I was able to create the first prototype. It looks different for now but in the final version, I want to get as close as possible to the original and more important provide gameplay that is the same fun to play.
As you see it already looks quite nice and shows the potential of the PiTrex.
Advantages of using the PiTrex
The biggest advantage to using the PiTrex from a developer’s perspective is the (in comparison) huge amount of memory and CPU power you have. The only limitation that remains is the number of possible vectors to draw per cycle before it starts to flicker. That’s why I call it “Modern Game Development for the Vectrex”. It has of course his charm to create native Vectrex Games, but I want to make use of the advantages I personally see:
Performance and memory (already mentioned)
More dynamic content
Client/Server possibilities and networking in general
Multiuser possibilities, also Leaderboards, etc.
Keyboard and other controllers (Have you seen the iPhone ;) ?)
More accessible to the majority of game programmers
All of this and much more will allow us to create games and apps that are unique and some of the above items we will already use in Vexxon, others later in the next projects.
Design of the Game
Before we start coding I wanna highlight some key challenges when designing a game for the Vectrex compared to other game consoles/computers from that time:
Vector only: We can just draw lines and only a limited number of lines
No colors: We can just use forms and animations to use instead. This can be improved slightly by using screen overlays
No filling: We can’t fill a “sprite” or overlap screen areas to hide objects, we need math for it (hidden line algorithm)
Portrait mode: The Vectrex uses a different screen ratio than almost every other console/computer
This all means we will end with something like this:
No worries, it’s just a rough design, it will not be that ugly ;), but you see the point. We have to reduce the original game art to the minimum needed to preserve the gameplay and still make it play- and enjoyable like the original.
The Architecture of the Game
The game architecture itself is not so important for what we want to do at first but as soon we extend the game and add some unique features it becomes important to have a well-defined architecture from the beginning. Some potential things we want to add during that project are:
Controllers that are not connected directly to the Vectrex (modules)
Multiplayer functionality (modules)
Testing sandbox (Test the game on Windows or macOS)
Re-use for other games and apps as much as possible
That’s the reason I will use an architecture like this. We go into every detail of the above diagram and the blocks described, but we start from the bottom and only need at first the PiTrex Library (created by the developers of the PiTrex) and of course the Vectrex. This is already available on your PiTrex (on the SD card) and is ready to use.
How to start?
If you never worked before with a Raspberry Pi (or other single-board computers) you probably wondering how we can do anything with it. There is no keyboard, even not a display. The only possibility, for now, is to access the PiTrex from another computer. I will later provide a web interface that simplifies all that but to start it’s at least helpful to know the basics.
Connect to the PiTrex
As written in the previous newsletter you have to connect to the PiTrex using ssh
. This works the same for Windows 10 using the Command Prompt or on macOS and Linux using a Terminal. By entering ssh pi@raspberrypi.local
and using the default password pitrex
you work remotely on the PiTrex. Unlike the bare-metal implementation of the PiTrex, we are using here Raspbian (Linux) and so there is by default no menu but just a command line. Even to start a game we use it.
(Info: In the next tutorial I introduce a web Interface for the PiTrex which allows you to upload and start games on the PiTrex among other things)
Run a game on the PiTrex
Since the code will be executed on the PiTrex (and not on the Vectrex or the host computer) we can just start a game like any other program in Linux by entering ./{name_of_game_binary} which is for Vexxon ./vexxon.
The difference to a “normal” Linux program is that the graphic output (vectors) is visible on the Vectrex while every print command (printf()
in C) is visible in the Terminal where I started the game.
See in the following video how it all comes together.
I hope you liked the first part about “Vexxon - The Game”. Stay tuned for the next posts when we start coding them. All source code during this series will be publicly available. If you have a paid subscription you can already download this proof of concept to your PiTrex and can see it live. Enjoy and hopefully until next time!
If you like this newsletter, please give it a like and if you have questions, please comment below. I’m happy to answer it!
Happy holidays to all of you!
What’s next?
Continue with “Vexxon The Game” - Part 2