doodle/pkg/balance/numbers.go
Noah Petherbridge af6b8625d6 Flood Tool, Survival Mode for Azulian Tag
New features:
* Flood Tool for the editor. It replaces pixels of one color with another,
  contiguously. Has limits on how far from the original pixel it will color,
  to avoid infinite loops in case the user clicked on wide open void. The
  limit when clicking an existing color is 1200px or only a 600px limit if
  clicking into the void.
* Cheat code: 'master key' to play locked Story Mode levels.

Level GameRules feature added:
* A new tab in the Level Properties dialog
* Difficulty has been moved to this tab
* Survival Mode: for silver high score, longest time alive is better than
  fastest time, for Azulian Tag maps. Gold high score is still based on
  fastest time - find the hidden level exit without dying!

Tweaks to the Azulians' jump heights:
* Blue Azulian:  12 -> 14
* Red Azulian:   14 -> 18
* White Azulian: 16 -> 20

Bugs fixed:
* When editing your Palette to rename a color or add a new color, it wasn't
  possible to draw with that color until the editor was completely unloaded
  and reloaded; this is now fixed.
* Minor bugfix in Difficulty.String() for Peaceful (-1) difficulty to avoid
  a negative array index.
* Try and prevent user giving the same name to multiple swatches on their
  palette. Replacing the whole palette can let duplication through still.
2022-03-26 13:55:06 -07:00

115 lines
3.0 KiB
Go

package balance
import (
"time"
"git.kirsle.net/go/render"
)
// Numbers.
var (
// Window dimensions.
Width = 1024
Height = 768
// Title screen height needed for the main menu. Phones in landscape
// mode will switch to the horizontal layout if less than this height.
TitleScreenResponsiveHeight = 600
// Speed to scroll a canvas with arrow keys in Edit Mode.
CanvasScrollSpeed = 8
FollowActorMaxScrollSpeed = 64
// Window scrolling behavior in Play Mode.
ScrollboxOffset = render.Point{ // from center of screen
X: 60,
Y: 60,
}
// Player speeds
PlayerMaxVelocity float64 = 7
PlayerJumpVelocity float64 = -23
PlayerAcceleration float64 = 0.12
Gravity float64 = 7
GravityAcceleration float64 = 0.1
SlopeMaxHeight = 8 // max pixel height for player to walk up a slope
// Default chunk size for canvases.
ChunkSize = 128
// Default size for a new Doodad.
DoodadSize = 100
// Size of Undo/Redo history for map editor.
UndoHistory = 20
// Options for brush size.
BrushSizeOptions = []int{
0,
1,
2,
4,
8,
16,
24,
32,
48,
64,
}
DefaultEraserBrushSize = 8
MaxEraserBrushSize = 32 // the bigger, the slower
// Default font filename selected for Text Tool in the editor.
// TODO: better centralize font filenames, here and in theme.go
TextToolDefaultFont = SansSerifFont
// Interval for auto-save in the editor
AutoSaveInterval = 5 * time.Minute
// Default player character doodad in Play Mode.
PlayerCharacterDoodad = "boy.doodad"
// Levelpack and level names for the title screen.
DemoLevelPack = "assets/levelpacks/001000-TUTORIAL.levelpack"
DemoLevelName = []string{
"Tutorial 1.level",
"Tutorial 2.level",
"Tutorial 3.level",
}
// Level attachment filename for the custom wallpaper.
// NOTE: due to hard-coded "assets/wallpapers/" prefix in uix/canvas.go#LoadLevel.
CustomWallpaperFilename = "custom.b64img"
CustomWallpaperEmbedPath = "assets/wallpapers/custom.b64img"
// Publishing: Doodads-embedded-within-levels.
EmbeddedDoodadsBasePath = "assets/doodads/"
EmbeddedWallpaperBasePath = "assets/wallpapers/"
// File formats: save new levels and doodads gzip compressed
CompressDrawings = true
// Play Mode Touchscreen controls.
PlayModeIdleTimeout = 2200 * time.Millisecond
PlayModeAlphaStep = 8 // 0-255 alpha, steps per tick for fade in
PlayModeAlphaMax = 220
// Invulnerability time in seconds at respawn from checkpoint, in case
// enemies are spawn camping.
RespawnGodModeTimer = 3 * time.Second
// GameController thresholds.
GameControllerMouseMoveMax float64 = 20 // Max pixels per tick to simulate mouse movement.
GameControllerScrollMin float64 = 0.3 // Minimum threshold for a right-stick scroll event.
// Limits on the Flood Fill tool so it doesn't run away on us.
FloodToolVoidLimit = 600 // If clicking the void, +- 1000 px limit
FloodToolLimit = 1200 // If clicking a valid color on the level
)
// Edit Mode Values
var (
// Number of Doodads per row in the palette.
UIDoodadsPerRow = 2
)