doodle/balance
Noah 20771fbe13 Draw Actors Embedded in Levels in Edit Mode
Add the JSON format for embedding Actors (Doodad instances) inside of a
Level. I made a test map that manually inserted a couple of actors.

Actors are given to the Canvas responsible for the Level via the
function `InstallActors()`. So it means you'll call LoadLevel and then
InstallActors to hook everything up.

The Canvas creates sub-Canvas widgets from each Actor.

After drawing the main level geometry from the Canvas.Chunker, it calls
the drawActors() function which does the same but for Actors.

Levels keep a global map of all Actors that exist. For any Actors that
are visible within the Viewport, their sub-Canvas widgets are presented
appropriately on top of the parent Canvas. In case their sub-Canvas
overlaps the parent's boundaries, their sub-Canvas is resized and moved
appropriately.

- Allow the MainWindow to be resized at run time, and the UI
  recalculates its sizing and position.
- Made the in-game Shell properties editable via environment variables.
  The kirsle.env file sets a blue and pink color scheme.
- Begin the ground work for Levels and Doodads to embed files inside
  their data via the level.FileSystem type.
- UI: Labels can now contain line break characters. It will
  appropriately render multiple lines of render.Text and take into
  account the proper BoxSize to contain them all.
- Add environment variable DOODLE_DEBUG_ALL=true that will turn on ALL
  debug overlay and visualization options.
- Add debug overlay to "tag" each Canvas widget with some of its
  details, like its Name and World Position. Can be enabled with the
  environment variable DEBUG_CANVAS_LABEL=true
- Improved the FPS debug overlay to show in labeled columns and multiple
  colors, with easy ability to add new data points to it.
2018-10-19 13:32:25 -07:00
..
README.md Draw Actors Embedded in Levels in Edit Mode 2018-10-19 13:32:25 -07:00
debug.go Draw Actors Embedded in Levels in Edit Mode 2018-10-19 13:32:25 -07:00
numbers.go WIP Finishing Up Texture Caching System 2018-10-17 23:01:21 -07:00
shell.go Draw Actors Embedded in Levels in Edit Mode 2018-10-19 13:32:25 -07:00
theme.go Menu Toolbar for Editor + Shell Prompts + Theme 2018-08-11 17:30:00 -07:00

README.md

balance

Constants and settings for the Doodle app.

Environment Variables

Some runtime settings can be configured in the environment. Here they are with their default values.

Most colors work with alpha channels; just provide an 8 hex character code, like #FF00FF99 for 153 ($99) on the alpha channel.

  • Application Windw Size (ints):
    • DOODLE_W=1024
    • DOODLE_H=768
  • Shell settings:
    • D_SHELL_BG=#001428C8: shell background color.
    • D_SHELL_FG=#0099FF: shell text color.
    • D_SHELL_PC=#FFFFFF: shell prompt color.
    • D_SHELL_LN=8: shell history line count (how tall the shell is in lines)
    • D_SHELL_FS=16: font size for both the shell and on-screen flashed messages.
  • Debug Colors and Hitboxes (default invisible=off):
    • DOODLE_DEBUG_ALL=false: turn on all debug colors and hitboxes to their default colors and settings.
    • DEBUG_CHUNK_COLOR=#FFFFFF: background color when caching a chunk to bitmap. Helps visualize where the chunks and caching are happening.
    • DEBUG_CANVAS_BORDER: draw a border color around every uix.Canvas widget. This effectively draws the bounds of every Doodad drawn on top of a level or inside a button and the bounds of the level space itself.
    • DEBUG_CANVAS_LABEL=false: draw a label in the corner of every Canvas with details about the Canvas.
  • Tuning constants (may not be available in production builds):
    • D_SCROLL_SPEED=8: Canvas scroll speed when using the keyboard arrows in the Editor Mode, in pixels per tick.
    • D_DOODAD_SIZE=100: Default size when creating a new Doodad.