Skip to content

Releases: oakmound/oak

Oak v3.2.1

20 Dec 15:03
7cdacfd
Compare
Choose a tag to compare

This release fixes a bug with the polygon collision utilities introduced in 3.2.0: #178

Oak v3.2.0

11 Dec 18:58
6a1342f
Compare
Choose a tag to compare

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

30 Oct 20:25
789f997
Compare
Choose a tag to compare

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

09 Oct 17:06
7d343c4
Compare
Choose a tag to compare

Changelog:

  • adds support for detecting keyboard changes on windows, although this is only used internally for now
  • adds AllKeys to the key package, a set of all supported keys.
  • deprecates render.DefFontGenerator in favor of DefaultFontGenerator.
  • 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

18 Sep 22:15
314b923
Compare
Choose a tag to compare

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 the DefaultCache global variable.
  • GetSounds has been removed.

oak

  • Assets no longer contains an AssetPath or a FontPath.
  • 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 a float64 instead of an int.
  • Most Window methods are now exposed as package level functions on the default window.
  • SetBinaryPayload(func(...), func(...)) is now SetFS(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 modify Vectors 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 renamed shake.Screen

fileutil

  • This package has been stripped down to just be an exposed FS fs.FS, a couple configuration options, and the Open, ReadFile, and ReadDir functions.

oakerr

  • Language constants have been expanded from two characters to three, matching ISO 639-2 (#53)

scene

  • Context now contains the current key.State.

render

  • ParseSubSprite has been removed.
  • LoadSprites has been removed.
  • SetFontDefaults has been removed.
  • LoadSpriteAndDraw has been removed.
  • Font.DrawString has been privatized.
  • Fonts now more accurately determine which elements of a font are undefined runes, e.g. a kanji character in a roman alphabet font.
  • Font and FontGenerators 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 the DefaultCache 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

06 Jul 01:12
a950e70
Compare
Choose a tag to compare
Oak v3.0.0-beta.1 Pre-release
Pre-release

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 a Tree
  • ReactiveSpace can now take in a Tree, and its methods are concurrent safe
  • NewEmptyReactiveSpace has been removed
  • CID is now IDTypeCID
  • PID is now IDTypePID
  • Space.String() has been removed
  • Space.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 renamed SetFilter
  • filter strings are now func(string) bool, instead of picking between regex matching and containment.
  • Warn has been removed
  • SetLogger has been removed
  • Exposed DefaultLogger, setting this replaces SetLogger
  • Logger and FullLogger interfaces are now combined
  • CreateLogFile has been removed
  • SetDebugLevel has been renamed SetLogLevel
  • FileWrite has been removed
  • SetOutput has been added, replacing FileWrite and CreateLogFile

entities

  • Removed String methods from all entities

entities/x/btn

  • Added Destroy to Btn
  • DisallowRevert is now flipped to AllowRevert

entities/x/force

  • Now accepts *scene.Contexts

entities/x/shake

  • New package from oak/shake.go, can generically shake screens + anything

event

  • Bus.ResolvePending has been renamed to Bus.ResolveChanges
  • event Busses now take a CallerMap reference
  • Enter events now take an EnterPayload, 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, using github.com/atotto/clipboard
  • New example svg demonstrates using svg helper libraries
  • fallback-font has its dependencies in its own go module
  • joystick-viz now demonstrates joystick deadzones
  • top-down-shooter part 6 has been modified to use new event enter frame
    details and DoBetweenDraws
  • 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 a StopPropagation 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 to Config, a setting which will skip calling math/rand.Seed if set.
  • debug console functionality has been moved to debugstream
  • the default controller is now lazily initialized
  • Controllers have been renamed to Windows
  • Added Window.DoBetweenDraws, which will confine a function to be called
    in between screen draws.
  • Joystick is now InputTypeJoystick
  • KeyboardMouse is now InputTypeKeyboardMouse
  • trackInputChanges now propagates InputChange events
  • the engine will more reliably exit with a clean error if it cannot proceed
    during initialization
  • Shake functionaltiy has moved to entities/x/shake

oakerr

  • Language constants now match ISO 639-1

render

  • NewStrText is now NewText, the old NewText now NewStringerText
  • Added ToSprite to CompositeR
  • 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, and DrawForTime to Context

shiny

  • noop build tag has been renamed nooswindow
  • 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.Tickers support our use of these since Go 1.15.
  • Removed DoAfter and DoAfterContext, moved to scene package

Oak v3.0.0-alpha.1

23 May 04:20
4933876
Compare
Choose a tag to compare
Oak v3.0.0-alpha.1 Pre-release
Pre-release

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 to CumulativeWeights, and the old CumulativeWeights 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 to DefaultFont
  • DefChannel has been renamed to DefaultChannel
  • DefActiveChannel has been renamed to DefaultActiveChannel
  • DefPlay has been renamed to DefaultPlay
  • 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 renamed DefaultTree
  • Attach now takes a *Tree argument, and no longer binds to priority -1
  • PhaseCollision now takes a single *Tree which can be nil instead of a variadic set
  • NewTree now takes no arguments and cannot error. The old NewTree with custom node sizes has been renamed to NewCustomTree
  • Fixed a bug where With would return nil 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 a Bindable does not care about its arguments or return value
  • GlobalBind and Bind now take string, Bindable as their argument order, formerly Bindable, string
    • We felt Bind(EventName, func(){}) read better, especially with larger functions
  • Bindables now accept CID, interface{} instead of int, 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 the oak package.

mouse

  • Added the Binding helper, converting a weakly typed interface{} payload into a mouse.Event type
  • DefTree has been renamed to DefaultTree
  • 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 removed
  • Scrollbox has been removed
  • The Polygon type now uses floatgeom.Polygon2
  • Fonts 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 panic
  • DrawOffset on Renderables has been removed and Draw has taken on its arguments (x and y offsets)
  • Texts are now drawn from the top left, like all other Renderables.
  • Fonts can now be provided fallback fonts, which they will try to use to render characters that would be rendered as an undefined character
  • Font.Generate can now return an error
  • OverlaySprites takes a slice of pointers instead of structs
  • ShinySet has been removed
  • ShinyOverwrite has been renamed to OverwriteImage
  • ShinyDraw has been renamed to DrawImage
  • Stackables have been changed to an interface that can be externally used, by removing private methods
  • Stackables now have a Clear method
  • FPS types are now Renderables instead of Stackables
  • Deprecated methods have been removed
  • DefFont is now DefaultFont

render/mod

  • gift.Resampling is now aliases as the local Resampling 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 to FPSToFrameDelay
  • Added FrameDelayToFPS

window

  • New package, handling the interface between scene and oak.Controller

oak

  • Setup... constants have been removed and folded into the Config struct
  • Config.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 and ReaderConfig
  • 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 Controllers, in addition to default oak.<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 ConfigOptions, so patterns that used to setup config, then oak.Init(scene) now will look like oak.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 and event.FocusGain events on appropriate window changes
  • Key events now have a key.Event payload instead of a string 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, preferring AddScene
  • DefShaker has been renamed to DefaultShaker
  • Added HideCursor, ShowNotification, and SetTrayIcon window methods

Oak v2.5.0

25 Feb 04:51
b80723a
Compare
Choose a tag to compare

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 a ToSprite 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

15 Aug 18:14
828120f
Compare
Choose a tag to compare

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 to Font.
  • added Reverting.Get to support sub Switch 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 to NewColoredLine. The old name is deprecated for removal in 3.0.
  • added Replace, analogous to Draw, to replace one renderable with another without dropping frames.
  • renamed DrawPolygon.DrawPolygonDim to DrawPolygonBounds. 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:

examples:

  • new examples were added illustrating viewport locked rooms, zooming on renderables, capturing keyboard presses

Oak v2.3.3

11 Mar 21:15
bdd7fa7
Compare
Choose a tag to compare

Oak v2.3.3 upgrades internal dependencies.