Colliding Doodads #1

Closed
kirsle wants to merge 6 commits from dev into master

6 Commits (master)

Author SHA1 Message Date
Noah f473609bb5 Add build time, hash and version info to binaries
Add urfave/cli to the doodle.exe binary to add a --version command. Both
doodle.exe and doodad.exe will now print their git commit hash and build
date along with their version number when asked.

% ./bin/doodle --version
doodle version 0.0.7-alpha build a316baf. Built on 2018-12-30T14:44:43-08:00
2018-12-30 14:46:29 -08:00
Noah a316bafb12 Reorganize the package layout
Move all Doodle source code into the src/ subpackage and move the
publicly shareable stuff into lib/, for example lib/ui and lib/render.

This cleans up the git root and helps make the Doodle UI library more
easily publishable as a separate open source project. Currently both
lib/ui and lib/render import one or two things from doodle/src that need
to be broken apart.
2018-12-30 14:22:50 -08:00
Noah b58976527a Add test wallpaper and minor code tweaks 2018-12-30 13:50:24 -08:00
Noah 6713dd7bfc Play: Autoscrolling and Bounded Level Support
Implement scrolling behavior in Play Mode by allowing the Canvas to
follow a specific actor and keep it in view. The Canvas has a
FollowActor property which holds an ID of the actor to follow (if blank,
no actor is being followed).

In Play Mode the Player is followed and when they get too close to the
left or right edges of the screen, the level will scroll to try and
catch them. If the player is moving very fast they can outrun the
camera.

The bounded levels are enforced in Play Mode and the camera won't scroll
to view pixels out-of-bounds and the Doodad actors inside the level
aren't allowed to exit its boundaries. This is global, not only for the
Player doodad but any Doodad that came with the level as well.

Other changes:

- Restructured Canvas widget code into many new files. The Canvas widget
  is shaping up to be where most of the magic happens, which is okay
  because it's close to the action and pulling the strings from outside
  would be harder, even tho as a UI element you think it should be
  lightweight.
- Debug Overlay: added room for Scenes to insert their own custom Debug
  Overlay key/value pairs (the values are string pointers so the Scene
  can update them freely):
  - The core labels are FPS, Scene and Mouse. The Pixel (world
    coordinate under cursor) is removed from the core labels.
  - Edit Scene provides Pixel, Tool and Swatch
  - Play Scene provides Pixel, Player, Viewport, Scroll
2018-10-28 17:52:45 -07:00
Noah 93bdaa0c43 Merge branch 'master' into dev 2018-10-28 12:50:48 -07:00
Noah 5b3e679b2a WIP 2018-10-20 19:49:59 -07:00