CH concept breakdown

Game:game is played by two players. The players are challenged by one or more stages until the game is over.

Stage: When play starts for each player, they are all on the same stage. Each player has an arena, so (assuming two players), a stage consists of two arenas. Once each arena has set an exit flag, the stage is completed. If there is a next stage, the arenas for that stage are set up and play continues. Otherwise, the game ends.

Arena: An arena has 2D bounds, measured in pixels. No entity is allowed to be placed or moved outside the bounds. A player character is positioned somewhere within the bounds. One or more gateways are positioned somewhere within the bounds. A goal is positioned somewhere within the bounds. These are the minimum entities that must be placed for an arena to be valid. (Note: may want to allow multiple goals which connect to different stages)

The player can use the keyboard (and possibly the mouse) to move the character around the arena. If the character steps on the goal, the arena’s exit flag is set.

Gameplay would be exceptionally dull if the only work necessary to complete a stage was to step on the goal. Thus, each stage also contains other entities. The character is able to pick up, drop, and throw props. Only one prop can be held at a time. If a prop is placed on a gateway, it becomes available to the other character to pick up from the corresponding gateway. Props can carry state data from arena to arena. Fixtures are entities that don’t move. They may block the character from crossing them. They may block thrown props or other projectiles from crossing them. They may react to events.

Switches are entities that send events. They may also be fixtures. They might be triggered by the character resting on them, or by the character being adjacent to them, or by the character interacting with them, or by a prop doing any of those things.

CH- Simple Arena (1)

 

The image above depicts an extremely simplistic stage. The two large rectangles represent each player’s arena. The smiley faces represent the characters, the beveled boxes represent gateways, the right-pointing arrows represent the goals.

The lines dividing the arenas are impassible walls (fixtures). The trapezoid is an unlockable door (also a fixture) which is opened when a character carrying the corresponding key (a prop) is adjacent to it. In this case, the top player would want to grab the key and drop it on the gateway. The bottom player would grab the key and unlock the door.

The diamonds are gates (portcullises, perhaps). They can be opened by events. The donuts are floor plates. When a character steps on them for the first time, they emit an event. The plate in the top arena emits event A, and the gate in the bottom arena is opened by event A. The plate in the bottom arena emits event B, and the gate in the top arena is opened by event B. Thus, after the door is opened, the bottom player would step on their plate, opening the gate for the top player; the top player would then step on the newly accessible plate, opening the gate for the bottom player. Then, both players would be able to step on their goals and win the stage.

The outline above covers the two fundamental means of interaction between the players’ arena — passing props back and forth via gateways, and triggering events that transition the state of other entities. Most of the gameplay becomes an elaboration of these two basic mechanisms. Entities can both emit and be activated by events. Whether they emit or are activated by events is affected by the state they’re in. Events can be global or they can be restricted only to entities in range.

Eventually, I also want to add mobs, which are entities with AI that can move themselves.

Examples of various types of entities:

Props: Keys (to open doors), boulders (to block other things from moving, to set on switches), shields (to keep hazards from injuring you), jetpacks (to fly over pits and hazards), bombs (to blow up obstructions), delicious steaks (to distract mobs), mirrors (to reflect lasers and light)

Fixtures: Walls, doors, gates; water, lava, pits, other hazards; statues, light sources, laser emitters, mirrors, prisms

Switches: levers (switches that toggle on and off), floor plates (switches that toggle when things are placed on them or removed), buttons (switches that trigger events whenever they’re pushed), sensors (switches that trigger events when entities are in line of sight)

Mobs: tigers who pursue and try to eat you; ogres who sit in one place until provoked; robots who can be remote-controlled; wizards who fling spells at you