Slinkers!
A Tile-Based Puzzle Game
Windows 95, Amiga OE, Linux, Indrema
OpenGL Hardware Acceleration
Game Design Document
This game is a tile-based puzzle game. The player controls one or more protagonists known as Slinkers (they're kinda like slinkys accept they are composed of rings rather than coils), and moves them about the tile map in an attempt to reach specific target tiles. This is a game of logic, rather than speed or reflexes, and only by strategically using various objects and tools can the player complete the level.
Slinkers Design
Document Version History / Design Diary:
1.0
the first version of this document
1.1
added version history
added tile rendering subsection
added teleport tiles subsection
added moving tiles subsection
added pregame menu subsection
1.2
added graphics section
1.3
September 16
Today my hard drive crashed,
taking all of my source code and hard work with it. I had been keeping a backup, but that was on my other partition
and the hard drive is inaccessible. I
will have to start over right away, but in order to meet the deadline, I’ll
need to concentrate on producing a demo version leaving some features
unimplemented. Today I have learned a
very valuable lesson in keeping backups and using floppies!
1.4
September 26
I’ve managed to catch up to
the point I was at before my hard drive crashed. Working components now include a working 3d tilemap which loads
from disk, a basic menu system, and a few game actors. Considering the amount of time I have
remaining I can pretty much scrap mouse interaction, inventory objects, dynamic
lighting, lasers, and mirrors. When I
submit the contest submission demo, I will probably only have enough time to implement
the following objects:
- pushable blocks and similar objects (objects with similar functionality which look different)
- unpushable anvils and similar objects
- rolling beach balls
- rolling bowling balls
- slippery tiles
- teleport tiles
- a simple menu system
- midi music only, no sound effects
- added target platforms section
The design document represents what the completed release version will support. The demo version will have limited functionality and will implement only some of the features listed herein. I’ve made quite a few changes to the design document. Those changes are listed here:
- made a few additions to the overview section
- rewrote the pregame menu section
- added slippery tiles
- Game objects section renamed Game Actors
- bowling ball actor renamed bowling ball
- added block and anvil actors
2.0
October 6
I have submitted the playable demo version of my game to gamedev.net. This version does not support sound, and has some trouble with positioning on slopes. I have finished work on the following elements: beach balls, blocks, teleport tiles, multiple slinkers, slippery tiles, and multiple textures. The menu was removed and replaced by a simpler interface. I have submitted eight levels to gamedev.net.
Target Platforms
This game was originally designed and written for Windows9x as an entry to the gamedev.net contest. I plan to convert the game into the following formats following the first release:
- Amiga OE – A platform independent operating system that can run hosted in another OS or on it’s independently. Designed largely with games in mind.
- Linux
- Indrema – An open source, Linux based game console
Overview
The object of this game is to complete as many levels as possible. Once one level has been completed, the next level becomes available. Scores are not kept in this game, since once the player knows how do defeat a level, it will be very easy for him/her to do so, and keeping score would not make any sense. Once any player defeats a level, he will be prompted for his name and will be registered as the defeater of the level. The next level will be available to any player.
Each level is laid on in a tile format. The camera is situated above the playfield and points toward the center of the tile map. The user can change the orientation of the camera to any of four compass directions. All tiles are within the scope of the camera at any given time.
The player controls one or more Slinkers, the protagonists of this game. There are no bad guys to defeat, just environmental obstacles and hazards. This game has no significant violent content. The player moves the Slinkers around the tile map collecting tools and interacting with the game objects. The objective of each level is to reach the flag. If the flag is destroyed or a Slinker is destroyed, the player must start the level over. There is no penalty for losing and being required to start over.
Pregame Menu
When the Slinkers app is first loaded, an introduction screen will appear with some fancy graphic and the game title. It will automatically disappear in five seconds or whenever the user presses a key or clicks a mouse button. Once this screen disappears, the main menu is presented to the player. Any menus displayed are navigatable by the control keys.
Intro Screen
Shows a fancy graphic and waits for a keypress. When the user presses a key, control switches to the main menu.
About
Displays the contents of “About.txt”. If the exit_program flag is set, Slinkers! will terminate when the user presses a key. Otherwise, control will pass to the main menu.
Level Selection
Displays a list of the levels in the selected section and waits for the user to select one. The escape key returns the main menu, and the return key selects the currently highlighted option.
Controls
Sets the keyboard controls. Each command will be displayed and when the user presses a key, that key will be mapped to that command. Control will return to the main menu upon completion.
Main Menu
The main menu provides the player with the following options:
Simple – moves to the Level Selection
menu showing the simple levels
Medium – moves to the Level Selection
menu showing the medium levels
Hard – moves to the Level Selection
menu showing the hard levels
About – about Slinkers!
Quit – quits Slinkers!
Tiles
|
A Slinker may move |
|
It may not, however, |
The game play takes place in a tile map. Each tile has a given elevation and slant. Slinkers can easily climb from tiles of any given elevation to an adjacent tile of lesser elevation. A Slinker can easily descend any distance, but cannot climb to a tile of higher elevation. If a tile is slanted towards the Slinker and the elevation of the side facing the Slinker is equal or less than the elevation of the Slinker's current elevation, than the Slinker can traverse that tile. Game objects that can roll will automatically roll downhill when moved onto a slanted tile.
|
A Slinker may not move |
|
It may, however, |
Each tile may contain one or more game objects. In general, the Slinker may not traverse a tile that holds a game object or push another object onto that tile. If the elevation of the Slinker or object that is being pushed onto the obstructed tile is higher than the elevation of the targeted tile plus the height of the obstructing object(s), than Slinker or object being pushed will move to that space. In general, each tile will be precisely 1 unit in height. This will allow the player to create strategies without doing complex math.
No more than one tile may occupy the same X/Y world space. The tiles are retrieved from an ASCII data file and stored in an array.
Some tiles will have tracks on them. This allows various kinds of objects to be moved onto these tiles, such as lasers and mirrors.
Teleport Tiles
Some tiles are marked as teleport tiles. Any game object that moves onto a teleport tile (including a Slinker), will be teleported to the next available teleport tile of that color. If all other teleport tiles of that type are occupied, no teleportation will take place. If an object had any momentum when it entered the teleport tile, it will retain that momentum after the teleportation.
Moving Tiles
Moving tiles are tiles which are constantly moving in a particular direction like a conveyer belt. For performance reasons, you should not use more than one or two different textures for moving tiles. Moving tiles can be slanted or normally oriented. Moving tiles may not be teleport or slippery tiles at the same time.
Slippery Tiles
If an actor enters a tile that has been marked as slippery, it will continue moving at its previous momentum. A slippery tile may not also be a teleport tile or a moving tile.
Tile Rendering
This section deals with the rendering of tiles. The tile map will not change during the course of a level, so at the outset of the level, an OpenGL display list will be created for the tile map.
The camera will usually be situated such that the vast majority, if not all, of the map is visible at any given point in time. Because all tile surfaces are usually in the scope of the camera, the only hidden surface elimination we’ll use is OpenGL back culling. To facilitate this, all polygons should be drawn clockwise and all counterclockwise polygons will be eliminated.
The display list will be optimized for the fewest number of instructions. To do this, we’ll group all tiles by top textures, and create a second array grouping the tiles by their side’s textures. Then we’ll have OpenGL draw all the tops and sides grouped by texture, thereby eliminating the number of texture changes.
In some situations, the walls of a tile are completely covered its neighbor (when the elevation of its neighbor is the same as the elevation of itself). In these situations, the obstructed side is never drawn.
If any tile is highlighted, the curser should be drawn on top of the tile map display list is processed. Also teleport tiles and moving tiles will be rendered after the main rendering process. These tiles are not included in the main display list since they are animated. Moving tiles will be grouped into their own display list which is drawn after setting the adjusted texture.
Game Actors
Every object has a tile associated with it. Game objects can be referred to as “Actors”. Some actors may be moved on top of one another so that a tile may contain more than one actor. Here is a quick list of objects I intend to include in the game:
Slinker |
Slinkers are the main character and the player alter ego in this puzzle game. Each level has one or more Slinker in it. Slinkers are controlled by the control keys and may move in any direction the player specifies, so long as that move is legal. If the player tries to move onto a tile which contains an object and the Slinker cannot move on top of it, the Slinker will attempt to move the object. A Slinker can only move an object at the top of the stack. Slinkers cannot move one another, but they can climb down onto one another. If the Slinker is set on fire or hit by a bowling ball, it will die and the player will have to try the level again. |
|
Bowling Ball |
A Bowling Ball is a heavy spherical object with three holes in it. If it is moved onto a downward slanted tile, it will roll downhill. A bowling ball may not be pushed uphill. A bowling ball in motion will tend to remain in motion. If a Slinker is in the way of a bowling ball, it will get crushed. If a bowling ball hits another bowling ball, the second bowling ball will be pushed and the first will stop. If a bowling ball hits a barrel, the barrel will be destroyed and the bowling ball will stop. Bowling balls are not affected by lasers. A bowling ball will explode if it crashes into a TNT barrel. |
|
Beach Ball |
A beach ball is a light rolling ball. A beach ball may be pushed uphill or downhill. If it is moved onto a slanted tile or pushed, it will roll downhill. A beach ball in motion will remain in motion until obstructed. If a beach ball hits anything but another beach ball, it will stop. If it hits another beach ball, the first one will stop, and the second one will be pushed in the same direction as the first. If a beach ball is set on fire or hit by a bowling ball it will passively explode (by popping). |
|
Spring |
A spring is horizontally mounted on the wall. It will bounce a bowling ball or beach ball back the way it came. It cannot be moved. |
|
Barrel |
A wooden barrel. It impedes the progress of the Slinker, but will passively explode if brought into contact with a moving bowling ball or set on fire. |
|
TNT Barrel |
A wooden barrel full of TNT. It impedes the progress of the Slinker just as a regular barrel would, but if brought into contact with a moving bowling ball or set on fire, it will explode setting objects on fire in the eight tiles adjacent to it. |
|
Laser Cannon |
Emits a laser beam in one of four directions. Any object in the path of the beam will be set on fire. If a laser cannon is set on fire or hit by a Bowling ball, it will explode in the same manner as a TNT barrel. Laser cannons can be pushed, but only on tiles which have tracks on them |
|
Mirror |
A mirror is set up in a diagonal orientation, and reflects a laser at a 45 degree angle. These are two-sided mirrors. If a laser beam hits it and it is not in the proper orientation to reflect the beam, the beam will be obstructed, but nothing else will happen. Being hit by a bowling ball or being set on fire from sources other than laser beans, such as an exploding TNT barrel, will cause the mirror to passively explode. |
|
Flag |
The objective of each level is to retrieve the flag. The flag must be protected during the game. It can be crushed by bowling balls or set on fire. If this happens, the player will lose the level and have to start the level over. If a Slinker moves onto the same tile as the flag, the player will win the level. |
|
Anvil |
An anvil is an immovable object. It can not be moved or destroyed under any conditions. |
|
Block |
A block is a movable object. It moves one square in the direction it was pushed. It can be moved downhill, but not uphill. |
|
Graphics
This section covers the graphics aspect of the game. As I have mentioned before, this game is rendered in OpenGL and thereby supports hardware acceleration.
Camera Dynamics
The camera is situated above the tile map from an overhead perspective. The camera rotates around the playfield upon command, and stops only when the angle is equal to one of the compass directions. A slight isometric offset is added to the angle to give it more of an isometric feel.
Tile Rendering
Detailed information on tile map rendering can be found in the section on Tiles.
Object Rendering
Each component and actor which is rendered contains a pointer to its associated renderer class. By limiting graphic commands to renderer classes, the game can be modified to run under any graphic environment.
Below is a list of game objects and a description of their rendering process:
Slinker |
A Slinker is a collection of rings which form a cylinder Number of rings: user customizable. Generally 10 – 40 rings Complexity of ring: 32 segments |
Bowling ball |
A bowling ball is a round, texture-mapped sphere which rotates in the direction of its movement. |
Beach Ball |
Rendered in a similar method to the bowling ball, the beach ball is slightly smaller and uses a different texture map. |
Spring |
Rendered similarly to the Slinker, though very simplified. The spring will recoil every time something tries to move it. It simply adds a glScale transform before the display list to create the recoil effect. Number of rings: 3 Complexity of ring: 12 segments |
Barrel |
Not implemented yet. |
TNT Barrel |
Not implemented yet. |
Laser Cannon |
Not implemented yet |
Mirror |
Not implemented yet |
Flag |
The flag is composed of two segments: a pole and the main flag. The main flag segment will wave in the wind using a sin wave effect. |
Block |
A block is designed to look like a wooden child’s toy. It is a cube with three textures. Each texture appears to be carved out of wood and has a letter on it. |
Anvil |
An anvil is a metallic weight. The top of the anvil is slightly smaller to the bottom. Each side has a 1 Ton sign on it. |
Tools (Inventory Objects)
At the beginning of each level, the player is provided certain tools.
Each tool is stored in the players' inventory and displayed at the bottom of
the screen. The player may collect additional tools by having a Slinker
move onto a tile containing the tool Collectable tools will be
represented by a thin box which will spin around in a circle about the Y axis
and have an image of the object printed on the front and back surfaces.
To use an object, select it from the list at the bottom and click on the Game
Object you wish to use it on. If the tool is not designed to interact
with the object, a buzzer will sound and nothing will happen. If the game
object selected is designed for use with the tool, the tool will disappear from
the player's inventory and send the appropriate message to the object. If
the object can only be used on a tile, than the player should select a tile
instead. If the player selects an object instead, the tile the object is
on will be selected.
Object name |
Use it on what |
Description |
|
Match |
Game Object |
A match sets a Game Object on fire. It only works on Barrels, TNT Barrels, and Beach Balls. |
|
Falling Bowling ball |
Tile |
A Bowling ball will fall from the sky and crush whatever was under it. |
|
Falling Beach Ball |
Tile |
A Beach ball will fall and land on the given tile |
|
Teleport Laser |
Tile |
A laser will materialize at the given tile and begin firing immediately |
|
Teleport Mirror |
Tile |
A mirror will materialize at the given tile |
|
Clockwise Wrench |
Game Object |
rotates a mirror or laser in a clockwise direction. |
|
Counter-clockwise Wrench |
Game Object |
rotates a mirror or laser in a counter-clockwise direction. |
|
Controls
To select a Slinker, click it with the mouse button. This is now the active Slinker. The Slinker can be moved by using the keyboard as shown in the table below.
Keyboard keys:
Up arrow |
Sends the Slinker a message to move north |
Down arrow |
Sends the Slinker a message to move south |
Left arrow |
Sends the Slinker a message to move west |
Right arrow |
Sends the Slinker a message to move east |
a |
Rotate camera counterclockwise |
s |
Rotate camera clockwise |
Escape |
Pauses the game |
Q |
Quits the game |
R |
Restarts the level |
number keys |
Select associated tool |
To select a tool either click the icon at the bottom of the screen or click the associated number key. Once it is selected, click the mouse on the game object or tile you want it to interact with.
Levels
Levels are designed so that the player must use all available resources to complete the level. Ideally, there should only be one way to complete a level. Generally the objects provided the player should be somehow useful in completing the puzzle, though in higher levels decoy objects that are not useful to the current puzzle may be used to distract the player, making the player think before acting. This is an open game, meaning that nothing is hidden in this game. All of the pieces should be visible.