With Labels and Buttons so far.
* Labels are pretty much complete, they wrap a render.Text and have a
Compute() method that returns their Width and Height when rendered
onto an SDL Surface.
* Buttons wrap a Label widget and Compute() its size and takes that into
consideration when rendering itself. Buttons render themselves from
scratch in a "Windows 95" themed way, with configurable colors, border
widths and outline.
* 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
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.
Implements the dev console in-game with various commands to start out
with.
Press the Enter key to show or hide the console. Commands supported:
new
Start a new map in Edit Mode.
save [filename.json]
Save the current map to disk. Filename is required unless you
have saved recently.
edit filename.json
Open a map from disk in Edit Mode.
play filename.json
Play a map from disk in Play Mode.
First pass at a level storage format to save and restore maps.
To save a map: press F12. It takes a screenshot PNG into the
screenshots/ folder and outputs a map JSON in the working directory.
To restore a map: "go run cmd/doodle/main.go map.json"