This is a series of articles about the rewriting of Battle Ground Copyright: a two player, 2d vector tank combat game that I originally wrote in QBASIC. This is the main index for those articles, where you will find the table of contents below.
It is called “Battle Ground Copyright” because it shamelessly rips off several ideas from multiple games:
- The Battle Force Tank from Recoil (as the tank)
- The Plasma Battery from Total Annihilation (as a weapon)
- The Auto-Cannon from Krush, Kill n Destroy (as a weapon)
- The GDI Ion Cannon from Command n Conquer (as a weapon)
- The Suprise Crate from Command n Conquer
- Overall gameplay based on Liero (You should know about this)
Here is a screenshot:
Above: Battle Ground Copyright, a 2d vector tank game that poorly approximates Liero while ripping off several ideas from other games
You’ll find the history of this game underneath the Table of Contents if you want to know more.
Table of Contents
- Choosing a Graphics Library
- Reverse Engineering the QBASIC DRAW Command
- Parsing QBASIC DRAW commands with FParsec
- Parsing QBASIC DRAW commands with FParsec (Round II)
- Line Rendering Engine with SDL2
- Text Rendering The Horrible Way
- Game Entity Management
History
I recall Battle Ground Copyright started as a high school project for our Software Engineering class, to be shown at a sort of highschool open day. This game was basically the culmination of several years of stumbling in the dark learning QBASIC on my own; for a while the only source I had was inbuilt Help system (which by the way was amazing). Eventually I picked up a “Beginning Programming for Dummies” book which gave me a better understanding of programming, but it wasn’t until I wrote a basic text editor that I really understood how arrays worked. You can laugh at my terrible beginnings with this article on my programming history.
Once I got better with the concept of programming, the last piece of the puzzle was discovered at the end of the year 2000. I had an old Toshiba 386 laptop that happened to include QB version 4, which included a bunch programs someone else had written. One of these programs was called CUBE.BAS:
I had run it before, but did not pay much attention to it. Silly me, as this single line pretty much made everything possible:
From this I discovered that the QBASIC DRAW command accepted a command called “Turn Angle” (TA), which when applied to a list of draw commands, would rotate everything about the origin. I quickly confirmed this with a mock program called TANK2.BAS:
I remember being so happy at the time. I finally had the basis to make a tank game.
I created another mock program called “2DEXP1.BAS”, which incorporated animation and movement about an origin – that is, everything moved around the tank.
Above: This code was revolutionary: using arrays (somewhat) effectively AND rotated vector graphics. Also that tank looks remakably similar to the CORE Reaper from Total Annihilation…
From this program, Battle Ground Copyright was finally born.