A Realtime Strategy/Action Game By Tom Grandgent
Last updated: Thursday, July 15, 1999
UPDATE: Complete source code has been released!
Bapple 2 is a game that I've been working on in some of my spare time since about January of 1997. It was started with Borland C++ 3.1, but I switched to DJGPP very early in development. I use the wonderful Allegro game programming library, as well as the Libnet communications library for accessing Win95's UDP/IP communications stack. The Windows/DirectX version is compiled with Visual C++ and the WinAllegro library.
I made Bapple 2 mainly for educational purposes (so that I learn more about game programming). It is the third non-trivial graphical game in my series of game projects. Each time I learn a lot in the process, and each game's technology and structure is a generation beyond the previous one. I also made Bapple 2 because I have always wanted to write a Herzog Zwei style game (details about this in the next paragraph), and I just like working on games. It's a fun way to sharpen my skills as a programmer, and it is nice to have a project of significance to show people and say "Hey, I did this". Well, except for the graphics (more on that later). :-)
|This game is intended to be primarily a realtime
strategy game, with a bit of an action/arcadish feel to
it. It's loosely based on an old favorite of mine,
the little-known Genesis game "Herzog
Zwei". You fly a ship around, commanding your
forces with the ultimate goal of destroying the enemy
base(s). You order units, pick them up, carry them,
and place them. You can always pick up units, carry
them around, and give them new orders. There are
also mini-bases which can be taken over and used as bases
of operation. They also contribute to your flow of
You can click on the screenshot to the left to see the full 640x480 version of it. The graph window is tracking the number of active projectiles over time.
Yes, but you must know a few things before you run the program. This is still very much a work in progress, which means that it is incomplete and has bugs. To run the game you should have at least a 486/66 and a decent video card. You must be running under either DOS (preferred for single-player) or Windows 95 (required for multi-player through UDP/IP). I also recommend that you run Scitech's UniVBE program to increase graphics performance and compatibility. You can read the bapple2.txt file which will tell you what the keys and controls are, but it is horribly out of date and some things have changed. Actually, you can browse through this while in the game by hitting F1 for help, though this help system could use some more work. One quick tip about graphics modes - if you get an error like "Virtual screen size too large", or the display is all jumpy, try enabling double buffering. It generally allows you to run at higher resolutions and also sacrifices a little bit of speed for compatibility. This option is the first checkbox that shows up in the first options screen when you run the game.
|Filename||Filesize||HTTP||Description / Instructions|
|bapple2.zip||~551k||DOS version and game data: unzip it into its own directory and run bapple2.exe|
|wbapple2.zip||~188k||Experimental Windows 95/NT version (executable and DLL only): unzip this into the same directory that you unzipped bapple2.zip into. Note that DirectX 3 or higher is required.|
|terrain.zip||~355k||Two extra terrain graphics sets, lava
and ice - once you have these try typing these commands
in the game:
And be sure to hit E and take a look at the map editor with these graphics.
|b2src.zip||~120k||The complete C source code to Bapple 2! Enjoy..|
If you download and try out my game, I would appreciate receiving email from you concerning your reactions to the game, as well as any problems you may have with it. Sorry about the lack of documentation, I will fix that some day...
I downloaded WinAllegro, got it to compile, played around with it, and then got Bapple 2 to work with it! It is amazing how few changes needed to be made, and now the same source compiles for both DOS and Windows (thanks to a few #ifdef's). The game will run both in a window and fullscreen. Be careful with this Windows version of Bapple 2 though. It is fairly stable but could crash Windows for you. Also note that the communications system has been disabled for this version. There is a Win32 version of Libnet though, so I will be working on this soon.
The mini-map has been changed. Instead of seeing everything at all times, there is now a realistic radar system. Radars can be established at points on the map, or they can be associated with mobile units. Radar sweeps will uncover dark terrain, as well as update unit positions on the mini-map. Individual radars can have different burst frequencies, rates of expansion, and ranges. So, the idea will be to have as much radar coverage as possible. Main-bases have the most powerful radar, mini-bases have the second most powerful radar, and mobile units have varying radar power.
There is now a tile animation system that allows a contiguous block of tiles in a tileset to be rotated, providing an animation effect. Each animation is defined in an animation definition file (having the extension .ANI) by its starting tile number, number of frames, and frame rate. When a tile datafile is loaded, such as islands.dat or frill.dat, the game will look for a corresponding .ANI file (like frill.ani). The frill layer is simply a layer of tiles on the map that are drawn above the normal map tiles. The bases and flags are stored in the frill layer so that there can be terrain underneath them. The flags need this because they are transparent. The bases need this because they can be destroyed. (Try surrounding your own main-base with enemy units by flying around it while hitting F11. Eventually it will be destroyed.)
|The integrated map editor and GUI
(graphical user interface) ended up turning into a
project of its own (weighing in at 53k of source code -
18% of the entire program size), and I am pretty happy
with the results. It allows users to create maps from
right inside of the game, using a mouse-driven GUI.
Designing and implementing my first GUI was interesting;
there is so much that can be done, but I tried to keep
the design fairly simple. Internally it may not be as
elegant as Windows, but it is efficient and most
importantly, flexible; it's very easy for me to go and
add a new window type or change an existing one. Take a
look at the thumbnail to the right, and you can click on
it to see the full-sized screenshot from the game.
To get into map editing mode while running the game, just hit E (for edit). Then experiment with the windows and creating your own maps, if you want. To load and save map files, use the /loadmap and /savemap commands like so: /loadmap choppy
The graphics in Bapple 2 have been assembled (mostly borrowed) from several different places. This is because I cannot do a good job drawing these types of graphics, but I didn't want my game to look especially bad in its early state because of crappy graphics. The "ripped" graphics are only temporary, of course, and are being replaced as fast as possible. Unfortunately this is not very fast, since I have no artist drawing graphics for the game. If you are wondering how I got the graphics from other games, click here and you will understand. Anyway, here are the games and people whose graphics are currently in Bapple 2:
This section of the web site goes into detail about the inner workings of each and every aspect of the game. It is not yet finished, but it might be worth a look anyway. Hopefully this information will be of use to fellow game programmers (and game programmer wanna-bes), and probably myself in the future. It might also give a non-programmer some idea of the complexity behind a game like Bapple 2...
Skip Next Site
List Next 5