Commit Graph

23 Commits (master)

Author SHA1 Message Date
Noah c4456ac51b Scripting: Bring Self API up to Actor API parity
Updates the Self API to expose more uix.Actor fields:

* Doodad()
* GetBoundingRect()
* HasGravity()
* IsFrozen()
* IsMobile()
* LayerCount()
* ListItems()
* SetGrounded()
* SetWet()
* Velocity() - note: it was Self.GetVelocity() before.

Self.GetVelocity is deprecated and made an alias to Velocity.
2024-04-26 22:34:13 -07:00
Noah 6631d8d11c Open Source Release 2022-09-24 16:17:30 -07:00
Noah 4de0126b19 Game Controller Support
Adds support for Xbox and Nintendo style game controllers. The gamepad
controls are documented on the README and in the game's Settings window.

The buttons are not customizable yet, except that the player can choose
between two button styles:

* X Style (default): "A" button is on the bottom and "B" on the right.
* N Style: swaps the A/B and the X/Y buttons to use a Nintendo-style
  layout instead of an Xbox-style.
2022-02-19 18:31:22 -08:00
Noah dc1f0721c2 Update README file for 0.5.0 2021-03-31 19:35:32 -07:00
Noah 6e40d58010 WIP Zoom Tool
* Added Feature Flag support, run doodle with --experimental to enable
  all flags. Eraser Tool is behind a feature flag now.
* + and - on the top row of keyboard keys will zoom the drawing in and
  out in Edit Mode. The wallpaper zooms nicely enough, but level
  chunkers need work.
* A View menu is added with Zoom in/out, reset zoom, and scroll to
  origin options. The whole menu is behind the Zoom feature flag.
* Update README with lots of details for fun debug mode options to play
  around with.
2020-11-19 20:09:15 -08:00
Noah 44788e8032 Prepare v0.1.0-alpha for release 2020-04-12 17:23:04 -07:00
Noah 329adb76d9 Add Open Source Licenses 2019-07-08 19:12:25 -07:00
Noah 5a1ec156ca Editor Mode: Line Tool and Rectangle Tool
* Add support for the LineTool and RectTool while in the EditorMode to
  easily draw straight lines and rectangle outlines.
* Key bindings were added to toggle tools in lieu of a proper UI to
  select the tool from a toolbar.
  * "F" for Pencil (Freehand) Tool (since "P" is for "Playtest")
  * "L" for Line Tool
  * "R" for Rectangle Tool
2019-07-03 17:19:25 -07:00
Noah 8d855582ed Clean up documentation 2019-06-25 18:58:48 -07:00
Noah 52a2545692 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 5bf7d554f7 Add doodad.exe binary and PNG to Drawing Converter
Adds the `doodad` binary which will be a command line tool to work with
Doodads and Levels and assist with development.

The `doodad` binary has subcommands like git and the first command is
`convert` which converts between image files (PNG or BMP) and Doodle
drawing files (Level or Doodad). You can "screenshot" a level into a PNG
or you can initialize a new drawing from a PNG.
2018-10-16 12:26:41 -07:00
Noah cfe26cb964 Add configdir and unify file loading/saving
* Create a configuration directory to store the user's local levels
  and doodads. On Linux this is at ~/.config/doodle
* Unify the file loading and saving functions: you can type into the
  console "edit example" and it will open `example.level` from your
  levels folder or else `example.doodad` from the doodads folder, in the
  appropriate mode.
* You can further specify the file extension: `edit example.doodad` and
  it will load it from the doodads folder only.
* Any slash characters in a file name are taken literally as a relative
  or absolute path.
* The UI Save/Load buttons now share the same code path as the console
  commands, so the `save` command always saves as a Doodad when the
  EditorScene is in Doodad Mode.
2018-10-02 10:11:38 -07:00
Noah 90a4859326 Check in updated docs before break 2018-08-22 10:01:02 -07:00
Noah 5956863996 Menu Toolbar for Editor + Shell Prompts + Theme
* Added a "menu toolbar" to the top of the Edit Mode with useful buttons
  that work: New Level, New Doodad (same thing), Save, Save as, Open.
* Added ability for the dev console to prompt the user for a question,
  which opens the console automatically. "Save", "Save as" and "Load"
  ask for their filenames this way.
* Started groundwork for theming the app. The palette window is a light
  brown with an orange title bar, the Menu Toolbar has a black
  background, etc.
* Added support for multiple fonts instead of just monospace. DejaVu
  Sans (normal and bold) are used now for most labels and window titles,
  respectively. The dev console uses DejaVu Sans Mono as before.
* Update ui.Label to accept PadX and PadY separately instead of only
  having the Padding option which did both.
* Improvements to Frame packing algorithm.
* Set the SDL draw mode to BLEND so we can use alpha colors properly,
  so now the dev console is semi-translucent.
2018-08-11 17:30:00 -07:00
Noah 248fa10a5f Update notes and feature ideas 2018-08-10 19:37:01 -07:00
Noah 41e1838549 Add JS + History to Shell, Add Main Scene
* The shell now supports an "eval" command, or "$" for short.
  * Runs it in an Otto JavaScript VM.
  * Some global variables are available, like `d` is the Doodle object
    itself, `log`, `RGBA()` and `Point()`
* The shell supports paging through input history using the arrow keys.
* Added an initial Main Scene
2018-07-25 19:38:54 -07:00
Noah 94c1df050b Add initial User Interface Toolkit
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.
2018-07-25 09:03:49 -07:00
Noah e13dd62309 Clean up old SDL refs in render package 2018-07-21 20:57:41 -07:00
Noah a4fc6ec231 Update README 2018-06-17 14:15:59 -07:00
Noah 407ef7f455 Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
Noah b7751507e4 Stabilize frame rate, add debug overlay 2018-06-16 19:59:23 -07:00
Noah a8e82f4dd2 Initial milestone ideas 2017-10-26 19:32:07 -07:00
Noah 8c884d4cab Initial commit 2017-10-26 18:03:11 -07:00