Releases: oakmound/oak
Oak v3.2.1
This release fixes a bug with the polygon collision utilities introduced in 3.2.0: #178
Oak v3.2.0
This release:
- Enhances floatgeom.Polygon2 with some containment helpers.
- Fixes LastMouseEvent usage to work with relative mouse events.
- Adds render.ColorBoxR, a smaller, theoretically more efficient color box which is not modifiable.
- Adds Driver to oak.Config, to make switching drivers easier.
- Adds a double buffer to oak's standard draw loop. This theoretically should make drawing both more consistent, and enable drivers which directly render the buffer oak sends without copying it.
Oak v3.1.0
This release addresses #13 and #172:
- Oak now supports targeting WASM+JS for most functionality. There is a new example helper,
js-server
, which can be used to host and test running other examples in a web browser. - To answer the question "what consitutes 'most' functionality?", Oak has new documentation for what specifically is not supported on each potential build target.
Oak v3.0.1
Changelog:
- adds support for detecting keyboard changes on windows, although this is only used internally for now
- adds
AllKeys
to thekey
package, a set of all supported keys. - deprecates
render.DefFontGenerator
in favor ofDefaultFontGenerator
. - drops the
keyboard-test
example - adds
debugtools/inputviz
package and corresponding examples #169
Fixes:
- fixes event.CallerMap persistence when using multiple windows #165
- respect the context passed into
debugtools.DebugMouseRelease
- adds support for the
Insert
key on windows (an oversight before) - corrects the drawn location of texts drawn with a zero size font
Oak v3.0.0
This release marks the final, stable release of oak v3.
The below changelog notes the delta between this release and the previous oak v3 beta release. For a complete changelog since 2.5.0, see this link.
Changelog
audio
- The
FontManager
type has been removed. It was not frequently used and can be trivially introduced as a standalone package. - The
Cache
type has been introduced to handle file loading and caching. Several loading functions have changed to work with this new type and theDefaultCache
global variable. GetSounds
has been removed.
oak
Assets
no longer contains anAssetPath
or aFontPath
.- The
Font
config type has been removed. Non-default fonts must be manually loaded outside of a base oak config, with a full asset path. This change emphasizes the built in nature of the default font and the reality of font configuration that the color, dpi, and hinting of a font is not often customizable from an end user's perspective. Screen.Scale
is now afloat64
instead of anint
.- Most
Window
methods are now exposed as package level functions on the default window. SetBinaryPayload(func(...), func(...))
is nowSetFS(fs.FS)
debugtools
- New package, contains common debug helper functions like rendering collision trees and printing mouse position
dlog
Logger.GetLogLevel
has been removed. Its hard to imagine a scenario where you would want to query the current log level other than to update it to be more or less verbose-- just set the desired verbosity.- Log strings used by oak are now exposed as constants in this package.
physics
- All
Vector
methods now modifyVector
s in place. (#115)
entities/x/mods
- Adds the
Lighter
utility to return a lighter version of a color.
entities/x/shake
shake.ShakeScreen
has been renamedshake.Screen
fileutil
- This package has been stripped down to just be an exposed
FS fs.FS
, a couple configuration options, and theOpen
,ReadFile
, andReadDir
functions.
oakerr
- Language constants have been expanded from two characters to three, matching ISO 639-2 (#53)
scene
Context
now contains the currentkey.State
.
render
ParseSubSprite
has been removed.LoadSprites
has been removed.SetFontDefaults
has been removed.LoadSpriteAndDraw
has been removed.Font.DrawString
has been privatized.Font
s now more accurately determine which elements of a font are undefined runes, e.g. a kanji character in a roman alphabet font.Font
andFontGenerator
s have had their interface significantly adjusted to simplify creation and reduce accidental persistence of one font's qualities or pointer to secondary fonts.- The
Cache
type has been introduced to handle file loading and caching. Several loading functions have changed to work with this new type and theDefaultCache
global variable. - Batch loading has been rewritten. Alias json files are no longer supported. Individual file names can now hint to the batch loading system that they are a sheet with a particular sheet size, and this will supercede a hint coming from their containing directory. Directories and files now must end in explicitly %dx%d e.g.
window64x64.png
or/tiles32x32/
to be caught and automatically cached as sheets.
shiny
- The default OSX driver has improved feature parity with windows and linux and is substantially more stable.
Oak v3.0.0-beta.1
This release marks the second release of oak v3, the first beta.
See the 3.0.0 project https://github.com/oakmound/oak/projects/2 for notes and issues to be addressed in beta 2, currently anticipated to be the last prerelease of 3.0.0
Changelog:
general
- reduced verbosity of all libraries
unnecessary logs have been removed throughout the codebase - Several functions which previously logged or ignored errors now return them
audio
- 200sc/klangsynthese is now effectively vendored locally.
this change is primarily intended to speed up development iteration when
working on these dependencies and to make version pinning more straightforward - channels, signals, and channel managers have been removed. They were tricky to
use correctly and designed toward a specific game, not used by any games
since
collision
- Added
PhaseCollisionWithBus
- Moved
CallOnHits
to be a method on aTree
ReactiveSpace
can now take in aTree
, and its methods are concurrent safeNewEmptyReactiveSpace
has been removedCID
is nowIDTypeCID
PID
is nowIDTypePID
Space.String()
has been removedSpace.SetZLayer(float64)
has been added
debugstream
- A new package that contains utilities for adding command line debug commands.
Not intended to be a full-fledged CLI builder, just enough for some helper
tools.
dlog
SetDebugFilter
has been renamedSetFilter
- filter strings are now
func(string) bool
, instead of picking between regex matching and containment. Warn
has been removedSetLogger
has been removed- Exposed
DefaultLogger
, setting this replacesSetLogger
Logger
andFullLogger
interfaces are now combinedCreateLogFile
has been removedSetDebugLevel
has been renamedSetLogLevel
FileWrite
has been removedSetOutput
has been added, replacingFileWrite
andCreateLogFile
entities
- Removed
String
methods from all entities
entities/x/btn
- Added
Destroy
toBtn
DisallowRevert
is now flipped toAllowRevert
entities/x/force
- Now accepts
*scene.Context
s
entities/x/shake
- New package from oak/shake.go, can generically shake screens + anything
event
Bus.ResolvePending
has been renamed toBus.ResolveChanges
- event Busses now take a
CallerMap
reference Enter
events now take anEnterPayload
, containing total frames, time since
last frame, and proportionally how that time compares to the expected
average tick time- Added
TriggerCIDBack
examples
- New example
click-propagation
demoing mouse click layers - New example
clipboard
, usinggithub.com/atotto/clipboard
- New example
svg
demonstrates using svg helper libraries fallback-font
has its dependencies in its own go modulejoystick-viz
now demonstrates joystick deadzonestop-down-shooter
part 6 has been modified to use new event enter frame
details andDoBetweenDraws
- Removed
cliffracers
example
joystick
- Stick changes can be isolated to only propagate if they exceed a deadzone
threshold
mouse
- Mouse bindings now take in a
(*mouse.Event)
instead of a(mouse.Event)
Event
now has aStopPropagation
boolean which, when set, will stop mouse
collision spaces beneath the one triggered on from receiving the event.- Mouse gestures, unused, have been removed, for now.
oak
- Added
SkipRNGSeed
toConfig
, a setting which will skip callingmath/rand.Seed
if set. - debug console functionality has been moved to debugstream
- the default controller is now lazily initialized
Controller
s have been renamed toWindow
s- Added
Window.DoBetweenDraws
, which will confine a function to be called
in between screen draws. Joystick
is nowInputTypeJoystick
KeyboardMouse
is nowInputTypeKeyboardMouse
trackInputChanges
now propagatesInputChange
events- the engine will more reliably exit with a clean error if it cannot proceed
during initialization Shake
functionaltiy has moved toentities/x/shake
oakerr
- Language constants now match ISO 639-1
render
NewStrText
is nowNewText
, the oldNewText
nowNewStringerText
- Added
ToSprite
toCompositeR
- Removed
DrawForTime
(see scene context) - Removed draw polygons
- DrawToScreen now accepts a *intgeom.Point2 for the viewport position
- Removed
FontManager
render/particle
- Allocators can now be stopped
scene
- Added
DoAfter
,DoAfterContext
, andDrawForTime
toContext
shiny
noop
build tag has been renamednooswindow
- Added
GetCursorPos
to windows/osx - Fixed bug where closed windows would stop oak, but not actually close the
window on linux - Fixed potential race on window intialization on linux
timing
- Removed
DynamicTicker
, built in*time.Ticker
s support our use of these since Go 1.15. - Removed
DoAfter
andDoAfterContext
, moved to scene package
Oak v3.0.0-alpha.1
This release marks the first release of oak v3, an early alpha where much but not all of the engine has been overhauled.
The following packages are in a state we are happy with in oak v3, and we do not expect them to change substantially:
render
(and its subpackages)
mouse
collision
shiny
(new, brought in from oakmound/shiny)
alg
event
key
oakerr
physics
scene
shape
timing
The main package, oak
, is in a mostly good place, but some components like the debug console will likely be moved elsewhere before a stable v3 release.
The joystick
package needs to be reevaluated with respect to supporting more controllers before v3 is stable.
The dlog
package will still be significantly adjusted, to emphasize it is not meant to be a one-stop-shop logging solution, but just a 'here's what the engine will log to' destination.
The audio
and entities
packages have not been sufficiently reviewed to where we can say they will not change before v3 is stable.
We currently anticipate an Alpha 2 and Beta 1 release before a final Stable release.
Changelog:
overall
- The Gopkg.lock and Gopkg.toml files, used for dep, have been removed. Dep has been deprecated and archived.
- Throughout the project, tests have been expanded, and use of
github.com/stretchr/testify
has been removed. - Throughout the project, errors returned by packages are more regularly errors from the
oakerr
package.
alg
RemainingWeights
has been renamed toCumulativeWeights
, and the oldCumulativeWeights
function has been removed.
alg/floatgeom
- Added the
Polygon2
type.
alg/range
- New package, a port of github.com/200sc/go-dist, representing ranges of colors, integers, and floats
audio
DefFont
has been renamed toDefaultFont
DefChannel
has been renamed toDefaultChannel
DefActiveChannel
has been renamed toDefaultActiveChannel
DefPlay
has been renamed toDefaultPlay
- Added
FontManager.GetDefault
to get the manager's default channel - Fixed a bug in blank audio loading where the provided "blank" audio was invalid PCM
collision
DefTree
has been renamedDefaultTree
Attach
now takes a*Tree
argument, and no longer binds to priority -1PhaseCollision
now takes a single*Tree
which can benil
instead of a variadic setNewTree
now takes no arguments and cannot error. The oldNewTree
with custom node sizes has been renamed toNewCustomTree
- Fixed a bug where
With
would returnnil
spaces
entities/x/btn
- Added the
Label(collision.Label)
option
event
- Event bindings in the built in bus no longer support priority levels, as they were virtually unused
- Added the
Empty
helper, for when aBindable
does not care about its arguments or return value GlobalBind
andBind
now takestring, Bindable
as their argument order, formerlyBindable, string
- We felt
Bind(EventName, func(){})
read better, especially with larger functions
- We felt
Bindable
s now acceptCID, interface{}
instead ofint, interface{}
- The global caller list is now built into the
CallerMap
type - Many methods that used to be optional in a
Handler
are now required
examples
- Many new examples have been added and most existing examples have been tweaked
key
- Added the
State
type, encompassing key down/up/held states, which used to be global to theoak
package.
mouse
- Added the
Binding
helper, converting a weakly typedinterface{}
payload into amouse.Event
type DefTree
has been renamed toDefaultTree
- Buttons are now strongly typed
oakerr
- Errors now can be formatted to multiple languages
- Several redundant error types have been removed
render
Noisebox
has been removedScrollbox
has been removed- The
Polygon
type now usesfloatgeom.Polygon2
Font
s are now copied several times as they are passed around, to enforce that the same font is not used to draw two pieces of text at once, which can panicDrawOffset
onRenderable
s has been removed andDraw
has taken on its arguments (x and y offsets)Text
s are now drawn from the top left, like all otherRenderable
s.Font
s can now be provided fallback fonts, which they will try to use to render characters that would be rendered as an undefined characterFont.Generate
can now return an errorOverlaySprites
takes a slice of pointers instead of structsShinySet
has been removedShinyOverwrite
has been renamed toOverwriteImage
ShinyDraw
has been renamed toDrawImage
Stackable
s have been changed to an interface that can be externally used, by removing private methodsStackable
s now have aClear
method- FPS types are now
Renderable
s instead ofStackable
s - Deprecated methods have been removed
DefFont
is nowDefaultFont
render/mod
gift.Resampling
is now aliases as the localResampling
type
render/particle
- Added the
Allocator
type to contain particle allocation requests
scene
- Scene start functions now take in
(*scene.Context)
as their only argument, a new struct containing everything a scene should need to render, bind, modify the window, etc
shiny
- New package, brought in from
github.com/oakmound/shiny
- Oak programs shouldn't need to directly interact with
shiny
other than to decide which driver to use, if not using the default
timing
FPSToDuration
has been renamed toFPSToFrameDelay
- Added
FrameDelayToFPS
window
- New package, handling the interface between
scene
andoak.Controller
oak
Setup...
constants have been removed and folded into theConfig
structConfig.EventRefreshRate
can now be properly unmarshaled from JSON- Added
Config.IdleDrawFrameRate
, controlling how often the screen will redraw when it does not have focus - Config creation and loading has been overhauled, using
NewConfig
and functional option loaders,FileConfig
andReaderConfig
- Added the
Controller
type, containing old package globals and enabling running multiple oak windows simultaneously - Most public functions in the package are now methods on
Controller
s, in addition to defaultoak.<Method>
helpers, which will redirect to a default controller - The draw loop has been substantially simplified
- Backgrounds can now be any type that have
GetRGBA() *image.RGBA
, enabling complex or animating backgrounds - Init now takes in a variadic set of
ConfigOption
s, so patterns that used tosetup config, then oak.Init(scene)
now will look likeoak.Init(scene, func() {setup config})
- Shiny gestures are no longer supported at the input loop layer, as they were fundamentally unused. This could be revisited
- We now propagate the
event.FocusLoss
andevent.FocusGain
events on appropriate window changes - Key events now have a
key.Event
payload instead of astring
payload - Mouse events now trigger both an absolute and
Relative
event, the latter taking into account the viewport position - Keybindings have been removed as they did not cooperate well with other key refactoring. This will be revisited
- Language constants have moved to
oakerr
, and are in progress - Added
UpdateViewSize
, to enable resizing the rectangle rendered within the client window - SeedRNG is no longer public, and no longer logs excessively
- Removed
Add
, preferringAddScene
- DefShaker has been renamed to
DefaultShaker
- Added
HideCursor
,ShowNotification
, andSetTrayIcon
window methods
Oak v2.5.0
2.5.0 Changelog:
Debug Console:
- Adds
DisableDebugConsole
configuration option on startup. - Adds the
help
built in debug command to print possible commands. - Adds
oak.RunCommand()
to simulate a debug console instruction.
Event Bus:
- Adds
EventRefreshRate
configuration option on startup. - The
event.Bus
type now supports being given a specific refresh rate, instead of having busy waiting on any pending bind or unbind requests. event.Bus.ResolvePending()
had a goroutine leak, and this has been fixed.
Batch Loading:
- Batch loading can now be configured to replace large images and audio files with blank versions, for faster test iteration in development.
- Batch loading is now parallelized.
Buttons:
- Adds additional text helpers for
entities/x/btn
constructors. - Adds support for cutting buttons into shapes.
Misc:
- Adds
render/mod.CutShape()
. - Adds
oak.SetTitle()
to change the running window title. - Adds
audio.Audio.SetVolume
to change a running audio's underlying volume level. render.Text.ToSprite()
has additional safety. Sometimes if a font or text changes in the middle of aToSprite
call it could panic deep inside of our font dependency. The font is now copied ahead of time to reduce this risk.
Oak v2.4.0
2.4.0 Changelog:
buttons:
- support fitting text within the button
collision:
- added a helper for 2d rectangular spaces.
config:
- added option for targeting a specific screen pixel ratio width/height when not in fullscreen (helps for osx retina displays)
dlog:
- added an example for non-default logger (regex logger)
- small efficiency boost to standard logger
- ErrorCheck now returns the error consumes
oak:
-viewports can now be shifted by a relative amount rather than having to be set to an absolute location with ShiftScreen
- improved screenshake logic
- expose keypress functionality to allow for software simulated keyboard interactions
render:
- our default font is now baked into our binary, to support use while vendoring.
- added
NewStrPtrText
toFont
. - added
Reverting.Get
to support subSwitch
types. - added
Polygon.GetThickOutline
- added
Polygon.GetGradientOutline
- added
Polygon.GetColoredOutline
- added
ParticleLimit
to particle generators - added
particle.InfiniteLifeSpan
generation option - added
NoopStackable
, for tests to disable rendering anything. - added
mod.StripOuterAlpha
- renamed
NewLineColored
toNewColoredLine
. The old name is deprecated for removal in 3.0. - added
Replace
, analogous toDraw
, to replace one renderable with another without dropping frames. - renamed
DrawPolygon.DrawPolygonDim
toDrawPolygonBounds
. The old name is deprecated for removal iun 3.0 - composite updates to allow for subslices of compositeM and have compositeR implement stackable
scene:
- scenes will now use default NOP scene functions for start, loop, and end, if sent
nil
.
timing:
- added
DoAfterContext
dependencies:
- upgrade to use new shiny 0.4.2 https://github.com/oakmound/shiny/releases/tag/v0.4.2
- upgrade to use klangsynthese 2.1.0
https://github.com/200sc/klangsynthese/releases/tag/v0.2.1
examples:
- new examples were added illustrating viewport locked rooms, zooming on renderables, capturing keyboard presses
Oak v2.3.3
Oak v2.3.3 upgrades internal dependencies.