Visual Basic Battle Zone
This game was an attempt to duplicate the classic Atari game "Battle Zone" using Microsoft Visual Basic.
Every object in the game is derived from a base class which implements a wire frame object. Sub-classes of the wire frame object implement their behaviors in an Update function which they override.
Every object in the game is derived from a base class which implements a wire frame object. Sub-classes of the wire frame object implement their behaviors in an Update function which they override.
The enemy tanks switch between a series of states. They are either pursuing the player and firing, or if they hit an obstacle they will turn to a random heading, and back up for a set number clock ticks. Once the tank has backed up, it will attempt to pursue the player again.
The mountains in the background are drawn on a separate graphics buffer. Each degree of the field of view is represented by ten pixels meaning the buffer is 3600 pixels wide. The mountains are drawn on it when the game starts. When drawing the scene, the appropriate segment from the mountains buffer is copied onto the main buffer, then the remaining objects are drawn.
The mountains in the background are drawn on a separate graphics buffer. Each degree of the field of view is represented by ten pixels meaning the buffer is 3600 pixels wide. The mountains are drawn on it when the game starts. When drawing the scene, the appropriate segment from the mountains buffer is copied onto the main buffer, then the remaining objects are drawn.