doodle/pkg/balance/numbers.go
Noah Petherbridge c8620f871e Drawing Strokes and Undo/Redo Functionality
* Add new pkg/drawtool with utilities to abstract away drawing actions
  into Strokes and track undo/redo History for them.
* The freehand Pencil tool in EditorMode has been refactored to create a
  Stroke of Shape=Freehand and queue up its world pixels there instead
  of directly modifying the level chunker in real time. When the mouse
  button is released, the freehand Stroke is committed to the level
  chunker and added to the UndoHistory.
* UndoHistory is (temporarily) stored with the level.Level so it can
  survive trips to PlayScene and back, but is not stored as JSON on
  disk.
* Ctrl-Z and Ctrl-Y in EditorMode for undo and redo, respectively.
2019-07-03 16:25:23 -07:00

37 lines
714 B
Go

package balance
// Numbers.
var (
// Window dimensions.
Width = 1024
Height = 768
// Speed to scroll a canvas with arrow keys in Edit Mode.
CanvasScrollSpeed int32 = 8
// Window scrolling behavior in Play Mode.
ScrollboxHoz = 256 // horizontal px from window border to start scrol
ScrollboxVert = 128
ScrollMaxVelocity = 8 // 24
// Player speeds
PlayerMaxVelocity = 8
PlayerAcceleration = 2
Gravity = 2
// 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
)
// Edit Mode Values
var (
// Number of Doodads per row in the palette.
UIDoodadsPerRow = 2
)