Commit Graph

3 Commits (bca848d5347ab964e3e3d40a00e120c368dd06ac)

Author SHA1 Message Date
Noah e1cbff8c3f Add Palette Window and Palette Support to Edit Mode
* Add ui.Window to easily create reusable windows with titles.
* Add a palette window (panel) to the right edge of the Edit Mode.
  * Has Radio Buttons listing the colors available in the palette.
* Add palette support to Edit Mode so when you draw pixels, they take
  on the color and attributes of the currently selected Swatch in your
  palette.
* Revise the on-disk format to better serialize the Palette object to
  JSON.
* Break Play Mode: collision detection fails because the Grid key
  elements are now full Pixel objects (which retain their Palette and
  Swatch properties).
  * The Grid will need to be re-worked to separate X,Y coordinates from
    the Pixel metadata to just test "is something there, and what is
    it?"
2018-08-10 17:19:47 -07:00
Noah d560670b7b Better Collision Detection (Bouncy Jumps Up Hills)
* Add a debug view that draws the player bounding boxes.
* Improve the collision detection to add support for:
  * Doodads being "Grounded" so gravity need not apply.
  * Walking up hills, albeit a bit "bouncily"
  * Harder to clip out of bounds
2018-07-24 20:57:22 -07:00
Noah e141203c4b Basic Collision Detection, Toggle Between Play/Edit
Known bugs:
* The Pixel format in the Grid has DX and DY attributes and
  it wreaks havoc on collision detection in Play Mode when you
  come straight from the editor. Reloading the map from disk to
  play is OK cuz it lacks these attrs.
2018-07-23 20:10:53 -07:00