Game Controls & Display Mechanisms

Game Control Mechanisms are the control objects — whether visual or virtual — that conform the game to its Game Mechanics.

This library of game controls and mechanism spans several javascript gaming frameworks. (more are on the way!) This tools helps you choose the game display controls then opens the generic code snapshots (aka "snippets"). Spend a minute to refactor these snapshots to your design and you'll have a functional "Game Prototype" in minutes.

Web SQL databases do not work in IE nor Firefox. Please, use Chrome or Safari.

Control Category Game Control Name Game Control Description
Abstract Action points is a budget of activity allocated to restrict what a player may do in their turn.
Abstract Auction or bidding Players make competitive bids to determine which player gets the right to perform particular actions.
Abstract Capture/eliminate the number of tokens a player has on the game board is related to his current strength in the game.
Abstract Catch-up This mechanism is designed to provide increased barriers as the player progress closer to final victory goals.
Abstract Game modes One of the most common examples of game mode is the single player versus multiplayer choice in online games.
Abstract Movement How game tokens are permitted to move (physics) and when (action points) is controlled by movement mechanisms.
Abstract Playing Cards Decks of cards act as a randomizer and/or to act as tokens to keep track of states in the game.
Abstract Randomizers The most common use is to randomly determine an outcome of a game interaction.
Abstract Resource management an accounting systems that monitors the collection (i.e. income) and expenditure (i.e. expenses) of game resources.
Abstract Tile-laying Many games use a grid on a world surface to form a tessellation.
Abstract Turns it is an abstract representation to regulate game play or denote a passage of time in a game set aside for certain player actions to happen before moving on to another turn.
Abstract Worker Deployment is a game mechanism where players allocate a limited number of tokens (�workers�) to multiple stations that provide various defined actions.
Buttons Add Button adds a button object to stage world
Canvas Click Canvas adds a listener to the entire game canvas
Sound Add Sound prepare sound to encoding and playback
Sound Mute Sound turns off a sounds volume
Sound Play Sound play a sound file.
Sound Set Sound Volume sets the volume for a Sound, values are between 0 and 1
Sound Sound Preload loads a sound into the cache and
Spites Load Image This will add an image to the library and make it available to your code. Tip:Use this in the preload section
Sprite Add Group adds a group to the stage
Sprite Add Sprite Animation defines an animation for a sprite
Sprite Add Sprite Mask adds a mask that will partly obscure a graphic
Sprite Add Sprite to Group add sprite inside existing group
Sprite Add Tile Sprite add a sprite multiplied and stitched together
Sprite Add to Stage Adds a sprite from the cache to the stage.
Sprite Click Sprite attach click handler to sprite
Sprite Enable Sprite Input use a click event on a sprite you first must enable it for inputs
Sprite Play Sprite Animation plays an animation in a sprite that has been defined
Sprite Preload Sprite Sheet preloads a sprite sheet to the cache.
Sprite Prototype Template use this to make a prefab/class for sprites
Sprite Set Sprite Frame select initial frame shown
Sprite Set Sprite Position set the location of a sprite in the stage world
Sprite Set Sprite Registration Sets the registration point for a sprite. For example setting the anchor to 0,0 means the positioning will apply to the top left corner of the sprite setting the anchor to 0.5,0.5 will apply positioning to the middle of the sprite
State HTML Skeleton starter html file for Phaser
State Initiate Skeleton Use this sample to make your own init state. Init states set up the bare bones code for launch and prepare for loading states
State Preload Skeleton load states allow you preload everything before the game starts
State State Skeleton this is a blank state template with the the essential functions
State Switch States changes a state. For example if you game is over you can call game.state.start('StateGameOver')
Text Add Text add a text field to the stage
Text Center Text set the x anchor to 50 percent of the width, giving us centered text
Text Set Customer Fonts uses the 4th parameter of the add text function to set advanced font properties
Text Set Font Size sets the font size for a textfield
Text Set Text Color sets the text field color
Text Set Text Font sets the font for the text field
Text Web Font Loader use this to load Google Fonts into your Phaser project
Tween Complete callback handler upon tween completion
Tween Object add tween attribute and direction
Utility Add timer Delay a delay timer
Utility Orientation Incorrect function invoked when the rotation of the device goes against setting in lockOrientation
Utility Orientation Locked locks orientation to portrait or landscape. Doesn't stop rotation, works with game.scale.enterIncorrectOrientation
Utility Timer add game stopwatch timer.

Copyright © 2016 Stephen Gose LLC. All rights reserved.