Tradewars 2002 fever is back! I recently picked up a game I started in 2019; a text-based space game, titled "Terminal Space".
I had already written the basic structure, client/server bits, and simple UI. I just added some ascii animations to give it more personality.
To do the animations, I found an approach that uses simple drawing primitives but renders decent enough visuals that can be 100% dynamic.
- Use Python's pillow to create a canvas based on the size available (as the terminal may be any size). One pixel per character
- Use pillow's Draw API to draw basic shapes, encoding both the ANSI color and glyph in the color itself (RGBA, so R=ANSI color code (fg+bg), G=glyph index, B=unused)
- Scale and transform the items and image itself as desired
- Walk through the pixels and render as ANSI control codes and characters
With this approach, I'm able to generate animations that compose and scale the objects per frame with decent performance.
From here, should this be a more faithful copy of Tradewars 2002 or something else? I'm thinking something else as. There was a great post on https://classictw.com (well, I'd link but I can't find it now) that pointed out the ways that Tradewars 2002 really isn't that good of a game, especially to a modern player. What simultaneously killed and saved TW2002 is scripting, turning a plodding game into a blitz of automated bots and text floods.
When I think back on why I liked it backend in the day, it was definitely the P2P nature of the game, especially as there wasn't many other options in those days pre-internet. Therefore, I'm thinking of not focusing too much on TW2002, but maybe more Space Rangers, a delightfully bizarre game that created a compelling single player experience.
Or, maybe I'll just amuse myself for a bit then pick it up in another 5 years :)