foosoft.net

Schwermetall

Schwermetall 2041: Apocalypse is the result of a two-person collaborative project to develop a networked 2d tank dueling game (remake of Scorched Earth). The game consists of client and dedicated server components, features dynamic terrain generation, support for an arbitrary number of players, procedural animation, and terrible programmer art. This game was developed in C# and utilizes managed DirectX 9.0 for graphics, Windows Forms for UI design and WinSock for network play. In case you're wondering, Schwermetall translates to something like "Heavy Metal" in German (mandatory for tank games).

The game-play is straightforward: you take turns selecting power and angle settings (you can also drive around), attempting to shoot down the enemy tanks (controlled by other human players across the network) before they kill you. The round would end when only one tank remained alive. To prevent the game from becoming repetitive, each round the tank placement and terrain are randomly generated. A random climate is also selected (temperate, arctic and desert). The tanks themselves were implemented in a 5-stage primitive hierarchy, which allowed individual components on the tanks to move, affording increased realism (for example, the tank would rotate when stationed on slanted terrain).

The standalone server (a simple console application) listened on a predetermined TCP port, and accepted incoming connections from an arbitrary number of clients. The server relayed messages from one client to other clients and made certain that everyone had a turn, and performed some maintenance tasks (such as removing disconnected players). It also distributed a seed value which the clients would use to generate random terrain and climate. The client, in turn, informed the server about the actions of the current player. Although the game used a heavy client (which you probably wouldn't do in a commercial game) it simplified the underlying network protocol, and seeing how security was not a big deal in a this project, it worked well.

Images

schwermetall

The player takes a shot at an enemy tank - pew pew!

tank

The future of tank warfare.