An Introduction
In the height of financial speculation, amidst the golden era of reckless subprime mortgage lending, I found myself navigating the corridors of high school. The year was 2006 and I was facing grade eleven. My high school had literally just started offering a course teaching computer science (Visual Basic). There would come to be a second year of the course available teaching Java via an online course run by a teacher in another city.
Our final project was to be completed in pairs, and we simply needed to make an application fulfilling various criteria. Criteria such as sliders, buttons, and a label. Naturally my partner and I chose to build a game, cause why stop at buttons and sliders.
This would in fact be my first game. The game Shirly, was surely as simple as we could make it. My partner developed the rendering code and implemented simple shapes to use, while I worked on everything else.
Description
This game featured a ball that bounced around, attempting to reach the four corners of a square space filled with blocks. These blocks moved when the ball collided with them, or became fixed in space if they could move no farther. The ball could thus become trapped as a result. The only tool the player had for avoiding such an outcome was a block fixed to the mouse cursor. This allowed the player to interfere with the path of the ball and force it to change direction.
There were two shapes: circles and squares, with three colours – blue, red, black, and green. The game logic had equally few mechanics. The ball travelled along diagonals (i.e. 45 degrees, or pi/4 if you’re into radians). When the ball bounced it would either reflect when hitting a flat surface, or invert its direction when colliding with a corner. Blue blocks would move when collided with by the ball, or turn black and become fixed if they could not move farther. When the player’s ball (blue) collided with the green balls in the four corners of the map the balls would disappear. If all four were collected, the level would increase. As the level increased more blue blocks would spawn to block the path of the ball.
The game offered three sliders: top speed, acceleration, and level. At any time the player could modify these and reset the game. Along with three buttons: pause, reset, and apply. The scoring was simple, you started with a score equal to the number of blue blocks and it decreased for every second spent trying to collect the green balls.
Objectives
- Create a simple game in Visual Basic
- Impress the teacher.
- Implement non-trivial logic.
Highlights
Successes
- Fulfill every objective.
- Made a surprisingly enjoyable game.
Challenges
- Creating the bounce logic was in fact tricky, having never done anything like it before. It took a few day to get right.
- Understanding my partner’s rendering code proved too much of a challenge for me at the time.
Results
Shirly was fun to play, we didn’t take the entire time available to finish, and it actually still runs 18 years later in a totally new operating system (Windows 11). You wouldn’t expect something developed in Windows XP or NT to still function on Windows 11, but it does [for me] 18 years later. Give it a try if you like, the file should be 72.0KB and have a SHA256 of 4E1814C48A499AA550A9BE919C44C09DF94406CAD29107D4388DD431F992013E.