Commit Graph

9 Commits (7b264dffbab2eb5cc4c5d06258f74f433823ac9f)

Author SHA1 Message Date
Noah 7b264dffba Minor Tweaks 2019-06-08 17:02:28 -07:00
Noah d10f7d190c Return False: Solid Collision Between Actors
* Implement the handler code for `return false` when actors are
  colliding with each other and wish to act like solid walls.
* The locked doors will `return false` when they're closed and the
  colliding actor does not have the matching key.
* Add arbitrary key/value storage to Actors. The colored keys will set
  an actor value "key:%TITLE%" on the one who touched the key before
  destroying itself. The colored doors check that key when touched to
  decide whether to open.
* The trapdoor now only opens if you're touching it from the top (your
  overlap box Y value is 0), but if you touch it from below and the door
  is closed, it acts like a solid object.
2019-05-28 21:43:30 -07:00
Noah 58fae48a2a WIP: MsgPack stubs, Level Filesystem Module
* Add some encoding/decoding functions for binary msgpack format for
  levels and doodads. Currently it writes msgpack files that can be
  decoded and printed by Python (mp2json.py) but it can't re-read from
  the binary format. For now, levels will continue to write in JSON
  format.
* Add filesystem abstraction functions to the balance/ package to search
  multiple paths to find Levels and Doodads, to make way for
  system-level doodads.
2019-05-06 12:41:46 -07:00
Noah 6c5542673a Remove ScreenshotKey Event, Add F* Key Handlers
* The F3 key now toggles the Debug Overlay, which is now OFF by default.
* The F4 key now toggles the Debug Collision Boxes feature.
2019-04-19 16:21:04 -07:00
Noah 95ef079724 Remove pkg/log from lib/render package
This breaks the last ties from the lib/ folder of publicly open
sourceable code from the internals of Doodle in pkg/
2019-04-18 22:14:02 -07:00
Noah 8dfae5b8d8 Play Mode: Fix Level Collision w/ Scrolling
Fixes:
* Move the call to CollidesWithGrid() inside the Canvas instead of
  outside in the PlayScene.movePlayer() so it can apply to all Actors
  in motion.
* PlayScene.movePlayer() in turn just sets the player's Velocity so the
  Canvas.Loop() can move the actor itself.
* When keeping the player inside the level boundaries: previously it was
  assuming the player Position was relative to the window, and was
  checking the WorldIndexAt and getting wrong results.
* Canvas scrolling (loopFollowActor): check that the actor is getting
  close to the screen edge using the Viewport into the world, NOT the
  screen-relative coordinates of the Canvas bounding boxes.
2019-04-14 15:25:03 -07:00
Noah 2ae77a8c82 Port over code from old collision dev PR 2019-04-09 19:17:56 -07:00
Noah 31e01987e5 Clean up extra log modules 2019-04-09 17:47:03 -07:00
Noah cddc41465f Code Layout Refactor
* All private Doodle source code into the pkg/ folder.
* Potentially public code into the lib/ folder.
* Centralize the logger into a subpackage.
2019-04-09 17:35:44 -07:00