Each of the 3 sample games covered here (Scramble, backgammon, and bridge) is based on the same basic set of 5 generic drag-and-drop components. These components enable the game designer to implement simple drag-and-drop versions of almost any board and card game without coding, hence the term "codeless programming." Each "codeless" game implementation contains no game-specific code. That way, even a game designer who is a non-programmer is capable of creating almost any board game imaginable.
Drag-and-Drop Components
Here are the 5 basic drag-and-drop components, the Card component, which contains the actual text and/or graphic(s) to be dragged, and its 4 container components:
· Card: This component corresponds to a playing card, chess piece, Scramble letter tile, Monopoly player piece, etc. It is always contained in a Card-stack object.
· Card-stack: A stack of Card objects. Individual Card objects, or entire Card-stack objects, can be dragged and dropped to other Card-stack objects.
· Board-grid: A 2-dimensional array of Card-stack objects. Each element of the array has the same width and height.
· Rack-grid: A one-dimensional array of Card-stack objects, oriented horizontally or vertically.
· Table-grid: A 2-dimensional array of Card-stack objects, in which the column widths and row heights may vary. Also, adjacent array elements may be merged into one table cell containing a single Card-stack object. This component would be a good candidate for a Monopoly board.
Tri-State Design Process
During the game design process, the game designer is always in one of the following 3 states: design-time, in which components are dropped on a form (game window) and their properties set; run-time, in which the game program is executed (what the end-user sees); and live-design-time, which is similar to run-time, except that the "freeze" command has not yet been invoked. The live-design-time state allows the game designer to drag Card objects to where they will be located at run-time (when the end-user starts the game). When the game designer is satisfied with the layout of the game, the freeze command is invoked, saving the current game setup in a form file with a .XML extension.