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
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
doodads inside of level files -- for creating them or playing them. Check the
website for how you can register the full version of the game.
doodads inside of level files -- for creating them or playing them.
Check the website for how you can register the full version of 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
all your custom doodads for it to work! But, free versions of the game will not
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 buttons are more colorful! The "Ok" button in alert boxes is blue and pressing
Enter will select the "Ok" button.
* When opening a Level or Doodad to play or edit, a blue **Browse...** button is
Enter will select the blue button.
* 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.
* 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
any custom doodads that were published with the level.
* 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
devices like the Pine64 Pinephone:
Bugs fixed:
* **Horizontal Toolbars** option for the Level Editor. If the game is started with
the `-w mobile` command line option, the game window takes on a mobile form factor
and the Horizontal Toolbars are enabled by default.
* Alternatively, press the tilde/grave key and type: `boolProp horizontalToolbars true`
* The WASD keys to move the player character (as an alternative to the arrow keys)
now works more reliably. Previously, they were affected by key-repeat so Boy would
do a quick hop followed by a longer one when pressing W to jump. Also, his
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)

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.
if keybind.Undo(ev) {
s.UI.Canvas.UndoStroke()
ev.ResetKeyDown()
} else if keybind.Redo(ev) {
s.UI.Canvas.RedoStroke()
ev.ResetKeyDown()
}
// Zoom in/out.
@ -224,12 +226,15 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error {
if keybind.ZoomIn(ev) {
d.Flash("Zoom in")
s.UI.Canvas.Zoom++
ev.ResetKeyDown()
} else if keybind.ZoomOut(ev) {
d.Flash("Zoom out")
s.UI.Canvas.Zoom--
ev.ResetKeyDown()
} else if keybind.ZoomReset(ev) {
d.Flash("Reset zoom")
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) {
d.Flash("Scrolled back to level origin (0,0)")
s.UI.Canvas.ScrollTo(render.Origin)
ev.ResetKeyDown()
}
// s.UI.Loop(ev)

View File

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

View File

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