|
Space Tyrant: A multiplayer strategy game and programming project |
 vote
 |
|
The Game 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:- 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
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.
The Code 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:- a Linux / Unix daemon
- a multithreaded game server
- a network socket listener
- a memory-resident daemon with an asynchronous dirty block backup thread
It also includes:- 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
The codefile consists of fewer than 4500 C statements. Counting multiline C formatting and comments, the entire file is under 9500 lines long.
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:9691 | -Ray, March 7, 2007 |
Articles and website reviews are owned by their authors. The rest is © 2000-2012, Ray Yeargin. Abstract Art Gallery
| |