Virtual Developer Workshop: Containerized Development with Docker

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


  • Can I Get your Source code?

    Posted by Legacy on 11/10/2000 08:00am

    Originally posted by: TONY_LU

    Now I can't get your source , Could you send me a copy?
    sir can i get full description of game in brief.i want it in vc++ and using sdk
    student of india

    • can i get a source code mobile game?

      Posted by ranjeetmote on 06/20/2007 05:47am

      Now I can't get your source , Could you send me a copy? sir can i get full description of game in brief.i want it in java and using sdk BestRegards student of india Ranjeet

  • Library Error On Compile

    Posted by Legacy on 05/14/2000 07:00am

    Originally posted by: VC++ 6 User

    I get some crap error about a invalid/non-existant link to a file.

    Something like na????

    Could someone help me please?

    I am using vc6, winnt sp6a w/dx7 sdk.

  • Dll Problem

    Posted by Legacy on 11/15/1999 08:00am

    Originally posted by: Mangesh Kardbhajne

    I got an error while executing tank.exe
    I got a messagebox saying,

    A required .DLL file, DPLAYX.DLL, was not found
    One of the library files needed to run this application cannot be found.

    (though I have dplayx.lib file at proper place.)

    How should I make the game executable?

  • why?

    Posted by Legacy on 11/03/1999 08:00am

    Originally posted by: cqjq

    when i use ur exe,it can chat!!
    but when i use exe of myself compile,it is a error?
    i use vc6.0.

    cqj 1999.11.4

  • Excellent !

    Posted by Legacy on 05/12/1999 07:00am

    Originally posted by: Cristiano Bruno

    Just one word: Excellent !
    Your project is really fantastic, well commented, easy to understand.
    And it's working/compiling perfectly. I'm using VC++6.0 with NT4 SP4, and I don't even have a warning during the compilation (I was a little bit afraid while reading the comments on this page before the compilation).

    Again, thank you for this project !

  • Movement of Tank Object

    Posted by Legacy on 03/18/1999 08:00am

    Originally posted by: Amit Bindal

    On the very onset,I appritiate your distributed game on tanks
    that really resembles a lot to real time conditions.

    Well ! I am developing such a game as my semester project.
    So , I have plenty of problems encountered during developing
    such game.

    Right now , I'm sending U my first problem , which is
    related to movement of tank .
    The problem is like this :
    In the resources you have used in the game for moving the tank
    object, the bitmaps are used , Isn't it ? Now this bitmap are
    like that they have tank on GREEN background.Here is the
    problem . How are you able to move the tank on the map without
    showing the GREEN background of the bitmap of tank used.And
    also please let me know about as to what function or classes
    you had used for showing the bitmap on the map. Well I'm using
    BITBLT function provided by MFC but that is not working
    as per the excellent way your game implemented it .
    I hope I made my problem clear . I'll be sending my other
    problem to you the moment I get response from your side.

    Amit Bindal

  • Got past language compile error, but can't execute

    Posted by Legacy on 02/02/1999 08:00am

    Originally posted by: Peter Wolszczak

    I figured out that the language lines were not needed. However, after I have done a build all (in VC++5), I get an error saying that one of the library files needed could not be found (WIN32 error 1157) when trying to execute. Is it because I don't have the DirectX 6.0 Media SDK installed? Please advise. I would like to see how your program works when it is in action. Thanks!

  • VC++ 6.0 problems

    Posted by Legacy on 01/07/1999 08:00am

    Originally posted by: Rene Balvert

    When I tried to compile the project under VC++ 6.0 I got the following problems:

    1) The #pragma code_page ( .. ) gave an error (invalid code_page) when opening the resources. This has something to do with the language.

    1.1) Probably a bug in VC++ 6.0: the resource file was not closed after this error. I had to close VC++ before I could edit the resource file.

    2) The ClassWizard couldn't find CTankDlg, becuase it was not in the <project> directory, but in the <project>\SRC directory.

    Rene Balvert

  • Project's site has moved. Here are the new URLs...

    Posted by Legacy on 01/02/1999 08:00am

    Originally posted by: Eran Yariv

    Sorry about that.
    Our project's host was going through some changes and the URLs have moved.

    I posted a notice to CodeGuru's webmaster about a week ago but the links in the article were not changed (until today).

    Here are the new links:
    1. Project's main site: http://tochna.technion.ac.il/project/Tanks2D/html/Tanks2D.html

    2. Download demo project executable:

    3. Download source:

  • the airplane graphics need work

    Posted by Legacy on 12/06/1998 08:00am

    Originally posted by: Mr

    Please make your source code out of SRGP
    and make it not win32 based. Make it
    C ansii standard in which most can use it thank you.

  • Loading, Please Wait ...

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date