Space Tyrant: A multiplayer strategy game and programming project
Space Tyrant (ST) is a free telnet-based space strategy game that anyone with Internet access can play. All you need is a telnet client -- which is included in virtually all operating systems released in the last ten years. The ST game features include:
The game is intended to provide a universe and a set of physical laws where players can create their own strategies. If you're interested in playing or looking at the game, go to the game introduction page.
- player configurable starships
- endless variations of economic, military, and political strategy
- pure player-vs-player; there are no in-game monsters
- an in-game radio with paging and secret channels
- teams with private team radio channels
- the ability to modify the universe by guarding sectors and moving objects
- . . . and much more
Space Tyrant is also an Open Source (GPL 2) programming project in the C language compatible with any recent version of GCC. ST is pure C code (the embedded shell script, mentioned below, is technically a C comment ;). It consists of a single source file that is an example of:
It also includes:
- a Linux / Unix daemon
- a multithreaded game server
- a network socket listener
- a memory-resident daemon with an asynchronous dirty block backup thread
The codefile consists of fewer than 4500 C statements. Counting multiline C formatting and comments, the entire file is under 9500 lines long.
- a simple and understandable recursive sort
- an example of function pointer arrays implementing a menu
- a ring buffer message queue
- a simple random number generator macro
- a detached thread spawning and reaping routine
- signal processing routines
- a loop-based shortest-path algorithm
- an embedded compile shell script (run `sh st.c` to compile the code)
- . . . and many more curious features
Programmers interested in the code -- as well as anyone interested in hosting a game -- might want to go to the Space Tyrant source code page.
| read more | score:9771 | -Ray, March 7, 2007|
Articles and website reviews are owned by their authors.
The rest is © 2000-2012, Ray Yeargin.
Abstract Art Gallery