Friday, October 1, 2010

Clixmaker Gridware

Gridware is the initial game framework of Clixmaker, which enables users to create their own multiplayer 2D games and play them in a web browser. The target language is JavaScript, and it uses Canvas and HTML5, so the games can be run on iPads and phones, as well as regular computers.

The game board is a grid, and all game objects and the rooms containing those objects are composed of one or more square cells. Game object (gobject) positions are restricted to an imaginary line connecting the centers of 2 adjacent room cells. Every room cell can have up to 4 borders. All room cells, as well as object cells, may contain a transparent bitmap (so room boundaries can be between transparent and non-transparent sections of room cell bitmaps, therefore not being restricted to horizontal/vertical lines). Levels are composed of rooms and optionally other levels. A special kind of gobject is the missile object, which consists of a bitmap and an imaginary circle for the purpose of collision detection, and its position is not restricted to grid lines like other game objects. A special kind of room cell border is a door object, which connects 2 rooms, not necessarily belonging to the same level (so objects can teleport through a door to distant rooms).

Most event handlers are collision events: gobject-gobject, gobject-room boundary, gobject-cell border, gobject-cell center. Other events include keyboard, mouse, and timer events. Arrow keys (or optionally a joystick) are used to move around. The current player is always in the center of the window, which scrolls up, down, left, or right. Gobjects possessed by game characters can be displayed, one at a time, in a corner of the game window.

Default Commands:
  • Tab: first/next child gobject
  • Shift+Tab: previous child gobject
  • Enter: default command of child gobject
  • Click: display popup menu of available commands for gobject
  • Esc: hide child gobject
  • Arrow key: move
The plan is to first define the class hierarchy, fields, and methods. The game-making tool will be written in Python, using PyGTK and Pygame. The scripting language will be a very small subset of the Python language and its libraries. The Python script is single-player. To test in multiplayer mode, the Python code is first translated into JavaScript, including Canvas and HTML5. I will develop the Python to JavaScript converter myself.

No comments:

Post a Comment