Jimmy Haglund

Tank Game 1991

Tank Game 1991

About

This was a game I created using Game Maker as a part of a university assignment in game design. The assignment was to make a clone of a classic game, Scorched Earth, which was created in 1991. I had a really good time working on the assignment, and there were several very interesting problems to solve, such as terrain generation and destruction. I was very happy with what I accomplished during the assignment, and kept working on it during my free time for a few months afterwards. My initial goal was to create an as-faithful-as-possible version of the game, but eventually I felt discouraged as I realized that I could be working on something original instead of copying what someone else already made years before. I considered re-theming the game, but by then I had moved on to learn Unity and felt that I’d rather move forward with other projects. As a result, Tank Game 1991 is a semi-finished product with functional gameplay but lacking that extra bit of “oomph” to make it a worthwhile experience.

Game

Much like the original Scorched Earth, this is a multiplayer, turn-based game where players control tanks that fire shells at each other and cause a great deal of terrain destruction in the process.

Controls

  • Mouse: Aim
  • Mouse wheel: Change shot power
  • Spacebar: Fire
  • 1-5: Change between missiles (Note the ammo count)

Your browser doesn't support HTML5 canvas.

Post-Mortem

The terrain is generated using a midpoint displacement algorithm, starting by picking a number of peak points and recursively adding mid-points between them while reducing displacement in each iteration. The terrain is stored in an array of integers, each representing a height. It’s rendered out using Game Maker’s line drawing function. When terrain is destroyed, a circle is calculated mathematically from the point of origin of the explosion. Any terrain placed on the lower-half of the circle is set to the height of the circle’s lower circumference. Additionally, each vertical segment of the explosion-circle is used to determine wether there will be terrain left over at the top, which will then fall down. These falling segments are created by generating an extra height-array, which is animated falling down until it hits the normal terrain and is added to that.

The controls were changed from the original Scorched Earth. Instead of manually entering the angle and power of shots using the keyboard, it’s now done using the mouse. The result is double-edged: on the one hand its’s faster to aim and fire, but players can no longer adjust the shot angle relative to their previous shot. It’s interesting to see how a change that I thought would be universally positive wound up having deeper ramifications. A solution would be to display the previous turn’s power and angle next to the current one.

Creating the systems for generating, rendering and destroying terrain made me appreciate just how advanced the original Scorched Earth was for its time. It was also really interesting to see the relationship between game design and computer engineering - I can imagine that there is a fairly short leap between learning about midpoint displacement algorithms, data structures and pixel-by-pixel rendering and coming up with a game based on those concepts.