Software Engineering and Computer Games
Authors: Rucker R.
Published year: 2002
Pages: 260-262/272
Buy this book on amazon.com >>

Dambuilder

This is a design for a game that has never quite been finished. The idea is to use the default Drag cursor to drag the dam walls around. Try and make the falling flow of the polygons as slow as you can without actually stopping the flow. You can use the Replicate cursor (the = sign) to make extra walls, and you can use the Pin cursor to remove them. Note that you can flip through different cursor types by using the mouse wheel. To work as a game, Dambuilder would need a clear goal and a mechanism for having advances and setbacks.

Most programmers instead use Dambuilder for a starting point for an adventure game. Typically they turn the gravity off, and arrange the walls in a more maze-like pattern. The player can then be hunting certain food or power-up critters, and avoiding certain rival critters.

We don't attach any gravity to the player in Dambuilder, so you can use Car Control without any confusion.

Dambuilder has an interesting appearance if you use View 3D OpenGL Graphics . In order to have good speed, you should use View Solid Background or View No Background to turn off the background bitmap, which tends to be expensive in 3D. While in this mode, drive around the world, looking things over. You are riding the player. Try using Ctrl+Up/Down to alter your point of view. Even though this is essentially a 2D game, the program enhances the visual interest by making the walls higher than the critters in the 3D mode. While still in 3D mode, use View Ride the Player to turn off Ride the Player so you can see the whole world from above. Now try zooming in on the world with Ins , and select View Keep Player in View so the player is always visible.


Worms

The player has an animated sprite that cycles through a series of colors. There are other critters with face icons and 'worms' made up of worm segments, which are polygon-shaped critters that tag after each other as if playing follow the leader.

If the player touches a worm segment, it reduces the player's health by 1.

The player's bullets are small polypolygons.

When a player bullet hits one of the worm segments, the number of sides in the worm segment's polygon decreases, down to a minimum of three, after which the segment disappears, effectively splitting the worm in two.

The face critters shoot out 'food' bubbles at a right angle to the direction towards the player, and the food bubbles avoid the player. The player gains score points by running into the bubbles , effectively eating them. The value of the food bubble goes up with the square of its size. The bigger the bubble the better. The bigger the face, the bigger the food bubbles it shoots out.

When a player bullet hits one of the faces, the face will grow, up to a certain size upon which it pops and disappears. So you should shoot each face until it's just short of popping and then eat its bubbles.

Meanwhile, whenever a worm segment bumps a face, it makes it smaller, so you need to try and keep the faces away from the worms. This is tricky, as the faces run away from you.

You can use the Game Large Critter Count to make longer worms.


2DStub

The 2DStub is close to being a game, though it's primarily meant to be a piece of code for the developer to improve.

In the 2DStub game, besides the player, there are two kinds of critters: rivals and props . The rivals have bitmap sprites, and the props have polygonal sprites .

The rivals shoot bullets at the player. They run away from the player bullets so fast that your only hope of killing them is to chase them down.

Chasing them down is made harder by the fact that they wrap around the world, but your player doesn't.

The props run away from the bullets of the rivals and from the player bullets. If the player runs over a prop, the player's health is improved by one point. The props are like health- packs .

Unlike the Spacewar game, the player needs to move around a lot to do well in 2DStub. Trying to sit in the middle of the screen and shoot is a losing strategy, as the rivals are so evasive and since the props need to be chased down.

The player's default controller is the Scooter Controls.

The game world is larger than a single screen, and we start with a zoomed-in view.

Software Engineering and Computer Games
Authors: Rucker R.
Published year: 2002
Pages: 260-262/272
Buy this book on amazon.com >>

Similar books