Two new tools added to the Level Editor:
* Pan Tool: left-click to scroll the level around safely.
* Text Tool: write text onto your level.
Features of the Text Tool:
* Can choose from the game's built-in fonts, size and enter the message
you want to write.
* The mouse cursor previews the text when hovered over the level.
* Click to "stamp" the text onto your level. The currently selected
color swatch will be used to color the text in.
* Adds two new fonts: Azulian.ttf and Rive.ttf that can be selected in
the Text Tool.
Some implementation notes:
* Added package native/engine_sdl.go that handles the lower-level
SDL2_TTF logic to rasterize the text into a black&white image.
* WASM not supported yet (if the game even still built for WASM);
native/engine_wasm.go stubs out the TextToImage() call with a "not
supported" error just in case.
Other changes:
* New Toolbar icons: they are 24x24 instead of 32x32 to make more room
for more tools.
* The toolbar now shows two buttons per row for a more densely packed
layout. For very narrow screen widths (< 600px) the default Vertical
Toolbar layout will use one-button-per-row to not eat too much screen
real estate.
* In the Horizontal Toolbars layout there are 2 buttons per column.
* When playing as the Bird, the dive attack is able to destroy other
mobile doodads such as Azulians and Thieves.
* The Box has been made invulnerable so it can't be destroyed by Anvils
or player-controlled Birds.
* Bugfixes with pop-up modals:
* The quit game confirm modal doesn't appear if another modal is
already active on screen.
* The Escape key can dismiss Alert and Confirm modals.
* Add "Level" menu items to Play Mode to restart the level or retry from
the last checkpoint (in case of softlocks, etc.)
* The title screen now loads the default maps from a LevelPack. The game
no longer ships with the Tutorial levels in the "levels" folder as
default; they are in the LevelPack so the "Edit Drawing" screen begins
as a blank slate for only user levels.
* Add the Zoo level to the Tutorial levelpack
* Bugfixes around changing the player character to work around clipping
issues if the character has changed height drastically.
If the Azulians aren't hostile to the player character (e.g. you are
playing as a Thief or Azulian or you are invulnerable because you're the
Anvil), the Azulians won't aggro and pathfind to you either.
* Add methods `Invulnerable() bool` and `SetInvulnerable(bool)` to the
Actor API accessible in JavaScript (e.g. `Self.SetInvulnerable(true)`)
* The Anvil is invulnerable - when played as, it can crush other mobs by
jumping on them but is not defeated by those mobs at the same time.
* Anvils don't destroy invulnerable mobs, such as other Anvils.
* Bugfix: the Electric Door is considered to be opened from the first
frame of animation when the door begins opening, and remains opened
until the final frame of animation when it is closing.
* New cheat code: `megaton weight` to play as the Anvil by default.
* Fix the Doodad Dropper and Registration windows not stealing the focus
when they are opened via menu bars.
* Bugfixes in gamepad support: stop at the first controller found,
Draw() to handle controllers going away and hide the mouse cursor
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.
Link a Doodad to a Checkpoint Flag (like you would a Start Flag) and
crossing the flag will replace the player with that doodad. Multiple
checkpoint flags like this can toggle you between characters.
* Azulians are now friendly to player characters who have the word
"Azulian" in their title.
* Improve Bird as the playable character:
* Dive animation if the player flies diagonally downwards
* Animation loop while hovering in the air instead of pausing
* Checkpoint flags don't spam each other on PubSub so much which could
sometimes lead to deadlocks!
SetPlayerCharacter added to the JavaScript API. The Checkpoint Flag
(not the region) can link to a doodad and replace the player character
with that linked doodad when you activate the checkpoint:
Actors.SetPlayerCharacter(filename string): like "boy.doodad"
Add various panic catchers to make JavaScript safer and log issues
to console.
* Respawning from a checkpoint grants 3 seconds of immunity in case
enemies are spawn camping.
* Add the white Azulian as an even faster and harder enemy than the red
Azulian: twice as fast, jumps higher, and can detect the player from
further away.
New functions are available on the JavaScript API for doodads:
* Actors.At(Point) []*Actor: returns actors intersecting a point
* Actors.FindPlayer() *Actor: returns the nearest player character
* Actors.New(filename string): create a new actor (NOT TESTED YET!)
* Self.Grounded() bool: query the grounded status of current actor
With this the game's built-in doodads have been revised:
* Bird: will now scan 240 pixels diagonally searching for the player
character and will dive if seen. The Bird is dangerous while
diving. It will return to its original altitude once it touches
the ground.
* Azulians: the Azulians are now dangerous to player characters but
not to the Thief. Azulians will begin to follow the player when
they are within the aggro range and will hop if the player is
above them to try and overcome obstacles.
* Blue Azulian: aggro is (250, 100) jump speed 12 movement 2
* Red Azulian: aggro is (250, 200) jump speed 14 movement 4
* magicform is a helper package that may eventually be part of the go/ui
library, for easily creating structured form layouts.
* The Level Publisher UI is the first to utilize magicform.
Refactor how level publishing works:
* Level data now stores SaveDoodads and SaveBuiltins (bools) and when
the level editor saves the file, it will attach custom and/or builtin
doodads just before save.
* Move the menu item from the File menu to Level->Publish
* The Publisher UI just shows the checkboxes to toggle the level
settings and a convenient Save button along with descriptive text.
* Free versions get the "Register" window popping up if they click the
Save Now button from within the publisher window.
Note: free versions can still toggle the booleans on/off but their game
will not attach any new doodads on save.
* Free games which open a level w/ embedded doodads will get a pop-up
warning that the doodads aren't available.
* If they DON'T turn off the SaveDoodads option, they can still edit and
save the level and keep the existing doodads attached.
* If they UNCHECK the option and save, all attached doodads are removed
from the level.
* Switch from otto to goja for JavaScript engine.
* goja supports many ES6 syntax features like arrow functions,
const/let, for-of with more coming soon.
* Same great features as otto, more modern environment for doodads!
* Clean up unused msgpack code for levels and doodads
* Fix the cosmetic bug where actors in your level would display wrongly
when scrolling off the top/left edges of the screen: they used to
anchor at their own 0,0 coordinate and crop their width/height leading
to a 'scrolling' effect that didn't happen on the right/bottom edges.
The Default handler of the developer command shell now calls out to
RiveScript to match the user's message to a friendly reply. If
RiveScript returns NoReplyMatched then give the "command not found"
error.
* If the player runs the PlayAsBird cheat they shouldn't be able to win
a high score on a level, so at level startup it detects whether the
DefaultPlayerCharacterDoodad has changed from default on a level that
doesn't use the Start Flag to set a specific doodad - and immediately
marks the session as cheated
* New doodad: Invisible Warp Door
* All warp doors require the player to be grounded (if affected by
gravity) to open them. No jumping or falling thru and opening
a warp door mid-air!
* Title Screen now randomly selects from a couple of levels.
* Title Screen: if it fails to load a level it sets up a basic
blank level with a wallpaper instead.
* New developer shell command: titlescreen <level>
Opens the MainScene with a custom user level as the background.
* Add Auto-save to the Editor to save your drawing every 5 minutes
* Add a MenuBar to the Play Scene for easier navigation to other
features of the game.
* Doodad JS API: time.Since() now available.
* Adds pkg/savegame to store user progress thru Level Packs.
* The savegame.json is mildly tamper resistant by including a checksum
along with the JSON body.
* The checksum combines the JSON string + an app secret (in savegame.go)
+ user specific entropy (stored in their settings.json). If the user
modifies their save file and the checksum becomes invalid the game
will not load the save file, acting like it didn't exist, resetting
all their high scores.
Updates to the Story Mode window:
* On the LevelPacks list: shows e.g. "[completed 0 of 3 levels]" showing
a user's progress thru the level pack.
* Below the levels on the Detail screen:
* Shows an indicator whether the level is completed or not.
* Shows high scores (fastest times beating the level)
* Shows a padlock icon if levels are locked and the player hasn't
reached them yet. Pops up an Alert modal if a locked level is
clicked on.
Scoring is based around your fastest time elapsed to finish the level.
* Perfect Time (gold coin): player has not died during the level.
* Best Time (silver coin): player has continued from a checkpoint.
In-game an elapsed timer is shown in the top left corner along with the
gold or silver coin indicating if your run has been Perfect.
If the user enters any Cheat Codes during gameplay they are not eligible
to win a high score, but the level will still be marked as completed.
The icon next to the in-game timer disappears when a cheat code has been
entered.
* SDL2 builds of the game now set their app window icon.
* Create/Edit Level window is updated to show a tabbed UI to create a
new Level or a new Doodad. The dedicated main menu button to create a
new doodad (which immediately prompted for its size) is replaced by
this new tab's UI.
* Edit Drawing/Play Level window is more responsive to smaller screen
sizes by drawing fewer columns of filenames.
* Bugfix: the Alert and Confirm modals always re-center themselves on
screen, especially to adapt between Portrait or Landscape mode on a
mobile device.
* The "Story Mode" button on the MainScene opens the levelpacks window.
* Levelpacks from all places are shown (built-in and user files), basic
level picker works.
* When playing a level out of a levelpack: the PlayScene gets the file
data from the zipfile and plays it OK.
* When a levelpack level is solved, the "Next Level" button appears on
the success modal and hitting Return will advance to the next level in
the pack. The final level doesn't show this button.
* The user can edit levelpack levels! Clicking the "Edit" button on the
Play Mode moves the loaded level over to the EditScene and the user
could save it to disk or edit/playtest it perfectly OK! The link to
the levelpack is lost upon opening in the editor, so the "Next Level"
victory button doesn't appear.
The title screen is now responsive to landscape mode. If the window is
not tall enough to show all the menu buttons (~600px) it will switch to
a horizontal layout with the title on the left and buttons on the right.
WIP "Story Mode" button that brings up a Level Packs selection window.
Adds `doodad levelpack create` and `doodad levelpack show` commands to
the CLI tool to create levelpacks.
A levelpack is a ZIP file containing a descriptive index.json and
directories for levels and doodads.
* The Red Bird now records its original altitude on the level and will
try and return there should it accidentally climb up or down a wall.
Sometimes goes into a wavy pattern surrounding its original altitude.
* Editor UI: in the default (vertical) toolbar, the Palette now has a
two column view to show more color choices on screen at once.
* User setting added: hide the touch control hints.
* The level scroll logic was getting a null pointer crash if you open a
doodad rather than a level file.
* Add a crosshair option to the level editor, configurable in the Game
Settings window.
- Fix a memory sharing bug in the Giant Screenshot feature.
- Main Menu to eagerload chunks in the background to make scrolling less
jittery. No time for a loadscreen!
- Extra script debugging: names/IDs of doodads are shown when they send
messages to one another.
- Level Properties: you can edit the Bounded max width/height values for
the level.
Doodad changes:
- Buttons: fix a timing bug and keep better track of who is stepping on it,
only popping up when all colliders have left. The effect: they pop up
immediately (not after 200ms) and are more reliable.
- Keys: zero-qty keys will no longer put themselves into the inventory of
characters who already have one except for the player character. So
the Thief will not steal them if she already has the key.
Added to the JavaScript API:
* time.Hour, time.Minute, time.Second, time.Millisecond, time.Microsecond
* Recolor some of the region doodads
* Add command: `doodad edit-level --remove-actor` to remove actors from
your level.
* Tweak the player jump velocity from playtesting levels.
* Tweak max gravity speed to match player max velocity.
* Boy's script watches for his velocity to flip suddenly and stops
animations, limiting the moonwalking a bit.
* JS API: Self.GetVelocity() added.
* The "Giant Screenshot" feature takes a very long time, so it is made
asynchronous. If you try and run a second one while the first is busy,
you get an error flash. You can continue editing the level, even
playtest it, or load a different level, and it will continue crunching
on the Giant Screenshot and flash when it's finished.
* Updated the player physics to use proper Velocity to jump off the
ground rather than the hacky timer-based fixed speed approach.
* FlashError() function to flash "error level" messages to the screen.
They appear in orange text instead of the usual blue, and most error
messages in the game use this now. The dev console "error <msg>"
command can simulate an error message.
* Flashed message fonts are updated. The blue font now uses softer
stroke and shadow colors and the same algorithm applies to the orange
error flashes.
Some other changes to player physics:
* Max velocity, acceleration speed, and gravity have been tweaked.
* Fast turn-around if you are moving right and then need to go left.
Your velocity resets to zero at the transition so you quickly get
going the way you want to go.
Some levels that need a bit of love for the new platforming physics:
* Tutorial 3.level
* New keybind: 'v' to open a new Viewport in the Level Editor.
* New keybind: Backspace to close the topmost UI window,
and Shift+Backspace to close them all.
* Zoom has graduated out of experimental feature status. Still a bit
buggy but workable.
* Viewport windows now copy the Tool and BrushSize of the toplevel
editor, so drawing in and out of viewports works well.
* Viewport window UI improved: buttons to grow or shrink the window
size, refresh the actors, etc.
Add multi-touch gesture support so that the player can scroll the level
in the editor (and title screen) by treating a two finger swipe to be
equivalent to a middle click drag.
Fun quirks found with SDL2's MultiGestureEvent:
* They don't begin sending us the event until motion is detected after
two fingers have touched the screen; not the moment the second finger
touches it.
* It spams us with events when it detects any tiny change and a lot of
cool details like rotate/pinch deltas, but it never tells us when the
multitouch STOPS! The game has to block left clicks while multitouch
happens so the user doesn't draw all over their level, so it needs to
know when touch has ended.
* The workaround is to track the mouse cursor position at the first
touch and each delta thereafter; if the deltas stop changing tick to
tick, unset the "is touching" variable.
In the level editor, the "Play (P)" button has a new feature: Play
From Here. On mouse down you begin dragging a silhouette of Boy or
whoever the default player character is, as if you were dragging a
doodad onto your level.
Drop the silhouette on your level and enter Play Mode from that
location instead of the Start Flag.
Release your cursor over the Play button or press the "P" key to
spawn at the Start Flag as usual.
In the editor, clicking and dragging with the middle mouse button
will scroll the view of the editor in place of the arrow keys.
When entering Play Mode, the original scroll position in the level
editor is remembered for when you come back - no more having to
scroll from 0,0 each time to get back to where you were working!