Sunday, February 13, 2011

Clixmaker in Python

Clixmaker will be written mostly in Python, not Java anymore. The scripting language will be Clixtalk, a dynamically-typed object-oriented language of my own invention. The Clixtalk Converter (part of the Game Editor) converts Clixtalk to JavaScript.

Game Editor
  • Vector graphics
  • Uses Cairo graphics toolkit
Game Engine
  • Written in JavaScript
  • Uses Canvas/HTML5 for graphics
  • Handles animation and collision detection
Clixtalk
  • Scripting language
  • CT2JS converts Clixtalk to JavaScript
  • Custom event handlers
Containers, highest to lowest
  • Levels
  • Grids, Tables, Multilevels
  • Stacks
Containers in more detail
  • Grid cells are always square
  • Table row heights and column widths may vary
  • Adjacent table cells may be merged
  • Table cells may be split, horizontally or vertically, into multiple cells
  • Multilevels are stacks of levels
  • Stacks (in grid/table cells) contain zero or more cell objects
  • Each stack may have a vertical or horizontal offset between its member cell objects (table cells only)
Game Objects
  • Object types: cell/missile/background/widget
  • Cell objects are contained in grid/table cells
  • Cell objects may be player handles, non-player characters, or simple objects
  • Cell objects have a bounding rectangle or circle for collision detection
  • Missile objects are not confined to grid/table cells
  • Missile objects may be circular or rectangular
  • Circular missiles can move in any direction
  • Rectangular missiles can only move up/down or left/right
  • Missiles can be any shape, but the missile type (circular/rectangular) is used for collision detection
  • Background objects can be any size
  • Widgets are contained in table cells, and may be clicked on by any player who is contained in the same table
  • Players and NPCs may carry multiple simple objects
Collisions
  • First client to detect collision sends message to server
  • Server synchronizes clients
Handles
  • All players must have at least one handle
  • Male handles are square, female handles are circular
  • Male/female handles are equal in area
  • Female handle circles touch grid cell borders at the midpoint of each border
  • All handles bounded by a black square/circle of width one pixel
  • In case background color of grid cell is uniform and very dark, handles are bounded by white square/circle
Events
  • Collision
  • Click
  • Drag/Drop
  • Direction (up/down/left/right)
  • Translation (cell object jumps to non-adjacent cell)
  • Enter/exit grid/table
  • Verb
Verb Events
  • Acquire
  • Discard
  • Give
  • Receive
  • Use
  • Toggle
  • Throw
  • Catch
  • Fire
  • Kill
  • Destroy
  • Create
  • Talk
Object Panel
  • Current external object/player at upper right
  • Objects being carried displayed vertically below current external object/player
  • Associated names displayed beneath each object/player
  • Primary object displayed below name of current external object/player
  • Click on secondary object to swap it with primary object
  • Click on external or primary object to display list of available verbs
  • Double-click on primary object to perform default verb
  • To interact with adjacent object/player, press arrow key in its direction
Sample Game
  • Players wander around and interact with adjacent simple objects and other players
  • NPCs have attraction, avoidance, exploration, and stationary behaviors
  • NPCs can be attracted to or afraid of players within a given radius
  • Exploration behavior causes NPCs to seek out places they haven't been to
  • Missile objects can be benign or deadly
  • Being struck by a deadly missile costs a player one of her lives
  • Missile objects can bounce, die, or stick
Implementation
  • Mike to implement game editor first, then Clixtalk Converter
  • Sample game and Clixtalk Converter implemented simultaneously
  • Partner to be hired to implement sample game

No comments:

Post a Comment