Distributed Tanks Game Sample

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Tank game sample image

In this project we implemented a real-time multi-player distributed animated tank game.

This project was done during one of our lab assignments in the Technion – Israel’s Technologicl Institute.

Major game features:

  • This game runs on Win32 platforms (Win95 / 98, Win NT 4 or above)
  • Supports various communication methods (LAN, Internet, Dial-up, Direct cable)
  • The game allows up to 4 players to take part in a game session
  • The game uses graphics and animation to display the background and moving objects
  • A game session is hosted on a server machine
  • Each player is either a server (there’s exactly one server in each game session) or a client
  • A client interacts with the server and participates in the game play

Major programming features:

  • MFC based
  • Heavy use of C++ features
  • Uses DirectPlay
  • Uses DirectSound
  • Multithreaded
  • Uses DIBs and the DrawDIB API (from WFW) for animations
  • Synchronization
  • Message packing and unpacking
  • A timer mechanism – time synchronization using smoothed averages
  • Automatic and random map generation
  • Image manager Lists of images
  • Smart queues for inter-thread messaging support
  • Keyboard manager – Mapping virtual keys into maneuver sets of local tanks
  • Animated dialog buttons
  • Animation controls


Visit project’s site

Download demo project executable – 3785 KB

Download source – 1621 KB

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read