Brighten Patterns + Update Default Palettes

* The pattern textures for level palettes have been brightened and work
  better with bright colors.
* The three default palettes for new levels now have patterns applied to
  each of their colors.
* Bugfix around resetting keybind states for Zoom In/Out, Scroll to
  Origin and Reset Zoom Level bindings.
This commit is contained in:
Noah 2021-06-20 10:42:51 -07:00
parent 864156da53
commit 386e0b2b0c
7 changed files with 98 additions and 72 deletions

View File

@ -5,8 +5,8 @@
This is the first release of the game where the "free version" drifts meaningfully This is the first release of the game where the "free version" drifts meaningfully
away from the "full version". Free versions of the game will show the label away from the "full version". Free versions of the game will show the label
"(shareware)" next to the game version numbers and will not support embedding "(shareware)" next to the game version numbers and will not support embedding
doodads inside of level files -- for creating them or playing them. Check the doodads inside of level files -- for creating them or playing them.
website for how you can register the full version of the game. Check the website for how you can register the full version of the game.
This release brings several improvements to the game: This release brings several improvements to the game:
@ -22,26 +22,34 @@ This release brings several improvements to the game:
file, it will "just play" on someone else's computer, and they don't need to copy file, it will "just play" on someone else's computer, and they don't need to copy
all your custom doodads for it to work! But, free versions of the game will not all your custom doodads for it to work! But, free versions of the game will not
get to enjoy this feature. get to enjoy this feature.
* **Settings UI**: a "Settings" button on the home screen (or the Edit->Settings
menu in the editor) will open a settings window. Check it out!
* **Horizontal Toolbars option:** if enabled in the Settings window, the toolbar
and palette in the Editor will be horizontal instead of vertical, along the top
and bottom of the screen. This may be better optimized for smartphone-sized
screens like the Pinephone. If the program is started with `-w mobile` the first
time, it will use horizontal toolbars by default.
Some small bits of polish in the game's user interface: Some small bits of polish in the game's user interface:
* Some buttons are more colorful! The "Ok" button in alert boxes is blue and pressing * Some buttons are more colorful! The "Ok" button in alert boxes is blue and pressing
Enter will select the "Ok" button. Enter will select the blue button.
* When opening a Level or Doodad to play or edit, a blue **Browse...** button is * When opening a drawing to play or edit, a blue **Browse...** button is
added so you can more easily find downloaded custom levels and play them. added so you can more easily find downloaded custom levels and play them.
* In the Level Editor, the "Level -> **Attached Files**" menu will let you see * In the Level Editor, the "Level -> **Attached Files**" menu will let you see
and manage files attached to your level, such as its custom wallpaper image or and manage files attached to your level, such as its custom wallpaper image or
any custom doodads that were published with the level. any custom doodads that were published with the level.
* The keyboard shortcut to open the developer console is now the tilde/grave key * The keyboard shortcut to open the developer console is now the tilde/grave key
instead of Enter. (`) instead of Enter.
This release also makes the game a little bit more functional on smartphone-sized Bugs fixed:
devices like the Pine64 Pinephone:
* **Horizontal Toolbars** option for the Level Editor. If the game is started with * The WASD keys to move the player character (as an alternative to the arrow keys)
the `-w mobile` command line option, the game window takes on a mobile form factor now works more reliably. Previously, they were affected by key-repeat so Boy would
and the Horizontal Toolbars are enabled by default. do a quick hop followed by a longer one when pressing W to jump. Also, his
* Alternatively, press the tilde/grave key and type: `boolProp horizontalToolbars true` animation would not update correctly when moving via the WASD keys. Both bugs
are fixed in this release.
* Shortcut keys advertised in the menu, such as Ctrl-N and Ctrl-S, now actually work.
## v0.6.0-alpha (June 6 2021) ## v0.6.0-alpha (June 6 2021)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -215,8 +215,10 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error {
// Undo/Redo key bindings. // Undo/Redo key bindings.
if keybind.Undo(ev) { if keybind.Undo(ev) {
s.UI.Canvas.UndoStroke() s.UI.Canvas.UndoStroke()
ev.ResetKeyDown()
} else if keybind.Redo(ev) { } else if keybind.Redo(ev) {
s.UI.Canvas.RedoStroke() s.UI.Canvas.RedoStroke()
ev.ResetKeyDown()
} }
// Zoom in/out. // Zoom in/out.
@ -224,12 +226,15 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error {
if keybind.ZoomIn(ev) { if keybind.ZoomIn(ev) {
d.Flash("Zoom in") d.Flash("Zoom in")
s.UI.Canvas.Zoom++ s.UI.Canvas.Zoom++
ev.ResetKeyDown()
} else if keybind.ZoomOut(ev) { } else if keybind.ZoomOut(ev) {
d.Flash("Zoom out") d.Flash("Zoom out")
s.UI.Canvas.Zoom-- s.UI.Canvas.Zoom--
ev.ResetKeyDown()
} else if keybind.ZoomReset(ev) { } else if keybind.ZoomReset(ev) {
d.Flash("Reset zoom") d.Flash("Reset zoom")
s.UI.Canvas.Zoom = 0 s.UI.Canvas.Zoom = 0
ev.ResetKeyDown()
} }
} }
@ -237,6 +242,7 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error {
if keybind.Origin(ev) { if keybind.Origin(ev) {
d.Flash("Scrolled back to level origin (0,0)") d.Flash("Scrolled back to level origin (0,0)")
s.UI.Canvas.ScrollTo(render.Origin) s.UI.Canvas.ScrollTo(render.Origin)
ev.ResetKeyDown()
} }
// s.UI.Loop(ev) // s.UI.Loop(ev)

View File

@ -13,85 +13,99 @@ var (
} }
DefaultPalettes = map[string]*Palette{ DefaultPalettes = map[string]*Palette{
"Default": &Palette{ "Default": {
Swatches: []*Swatch{ Swatches: []*Swatch{
&Swatch{ {
Name: "solid", Name: "solid",
Color: render.Black, Color: render.MustHexColor("#777"),
Solid: true, Solid: true,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "decoration", Name: "decoration",
Color: render.Grey, Color: render.MustHexColor("#CCC"),
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "fire", Name: "fire",
Color: render.Red, Color: render.Red,
Fire: true, Fire: true,
Pattern: "marker.png",
}, },
&Swatch{ {
Name: "water", Name: "water",
Color: render.RGBA(0, 0, 255, 180), Color: render.MustHexColor("#09F"),
Water: true, Water: true,
Pattern: "ink.png",
}, },
}, },
}, },
"Colored Pencil": &Palette{ "Colored Pencil": {
Swatches: []*Swatch{ Swatches: []*Swatch{
&Swatch{ {
Name: "grass", Name: "grass",
Color: render.DarkGreen, Color: render.DarkGreen,
Solid: true, Solid: true,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "dirt", Name: "dirt",
Color: render.RGBA(100, 64, 0, 255), Color: render.MustHexColor("#960"),
Solid: true, Solid: true,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "stone", Name: "stone",
Color: render.DarkGrey, Color: render.Grey,
Solid: true, Solid: true,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "fire", Name: "fire",
Color: render.Red, Color: render.Red,
Fire: true, Fire: true,
Pattern: "marker.png",
}, },
&Swatch{ {
Name: "water", Name: "water",
Color: render.RGBA(0, 153, 255, 255), Color: render.RGBA(0, 153, 255, 255),
Water: true, Water: true,
Pattern: "ink.png",
}, },
}, },
}, },
"Blueprint": &Palette{ "Blueprint": {
Swatches: []*Swatch{ Swatches: []*Swatch{
&Swatch{ {
Name: "solid", Name: "solid",
Color: render.RGBA(254, 254, 254, 255), Color: render.RGBA(254, 254, 254, 255),
Solid: true, Solid: true,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "decoration", Name: "decoration",
Color: render.Grey, Color: render.Grey,
Pattern: "noise.png",
}, },
&Swatch{ {
Name: "fire", Name: "fire",
Color: render.RGBA(255, 80, 0, 255), Color: render.RGBA(255, 80, 0, 255),
Fire: true, Fire: true,
Pattern: "marker.png",
}, },
&Swatch{ {
Name: "water", Name: "water",
Color: render.RGBA(0, 153, 255, 255), Color: render.RGBA(0, 153, 255, 255),
Water: true, Water: true,
Pattern: "ink.png",
}, },
&Swatch{ {
Name: "electric", Name: "electric",
Color: render.RGBA(255, 255, 0, 255), Color: render.RGBA(255, 255, 0, 255),
Solid: true, Solid: true,
Pattern: "marker.png",
}, },
}, },
}, },

View File

@ -144,8 +144,6 @@ func saveGameSettings() {
func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame { func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame {
tab := ui.NewFrame("Options Tab") tab := ui.NewFrame("Options Tab")
log.Error("c.Super: %+v", c.Supervisor)
// Common click handler for all settings, // Common click handler for all settings,
// so we can write the updated info to disk. // so we can write the updated info to disk.
onClick := func(ed ui.EventData) error { onClick := func(ed ui.EventData) error {
@ -176,7 +174,7 @@ func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame {
name: "toolbars", name: "toolbars",
}, },
{ {
Header: "Debug Options", Header: "Debug Options (temporary)",
}, },
{ {
Boolean: c.DebugOverlay, Boolean: c.DebugOverlay,