doodle/docs/Doodad Ideas.md
Noah Petherbridge cb02feff1d Add Switches, Fire/Water Collision and Play Menu
* New doodads: Switches.
  * They come in four varieties: wall switch (background element, with
    "ON/OFF" text) and three side-profile switches for the floor, left
    or right walls.
  * On collision with the player, they flip their state from "OFF" to
    "ON" or vice versa. If the player walks away and then collides
    again, the switch flips again.
  * Can be used to open/close Electric Doors when turned on/off. Their
    default state is "off"
  * If a switch receives a power signal from another linked switch, it
    sets its own state to match. So, two "on/off" switches that are
    connected to a door AND to each other will both flip on/off when one
    of them flips.
* Update the Level Collision logic to support Decoration, Fire and Water
  pixel collisions.
  * Previously, ALL pixels in the level were acting as though solid.
  * Non-solid pixels don't count for collision detection, but their
    attributes (fire and water) are collected and returned.
* Updated the MenuScene to support loading a map file in Play Mode
  instead of Edit Mode. Updated the title screen menu to add a button
  for playing levels instead of editing them.
* Wrote some documentation.
2019-07-06 18:30:03 -07:00

23 lines
817 B
Markdown

# Doodad Ideas and Implementation Notes
## Crumbly Floor
A rectangular floor piece with lines indicating cracks. Most similar to:
the break-away floors in Tomb Raider.
Animation frames/states:
* Default: a rectangle with jagged lines through it indicating cracks.
* Rumble: draw little rumble mark lines and maybe shake the segments around.
* Break: the floor breaks apart and pieces fall/shrink into nothing over a few
frames of animation.
Behavior:
* If touched, act as a solid object.
* If touched along its top edge, start the Rumble animation. If touched from
the bottom, don't do anything, just act solid.
* After a moment of rumbling, stop acting solid and play the break animation.
A player standing on top of the floor falls through it now.
* When the broken floor scrolls out of view it resets.