Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/v4 examples #205

Merged
merged 7 commits into from May 21, 2022
Merged

Feature/v4 examples #205

merged 7 commits into from May 21, 2022

Conversation

200sc
Copy link
Contributor

@200sc 200sc commented May 17, 2022

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2022

Codecov Report

Merging #205 (ba70b4a) into release/v4.0.0 (8607bae) will not change coverage.
The diff coverage is 100.00%.

❗ Current head ba70b4a differs from pull request most recent head ba8c6a0. Consider uploading reports for the commit ba8c6a0 to get more accurate results

@@               Coverage Diff               @@
##           release/v4.0.0     #205   +/-   ##
===============================================
  Coverage           95.01%   95.01%           
===============================================
  Files                 143      143           
  Lines                6344     6344           
===============================================
  Hits                 6028     6028           
  Misses                285      285           
  Partials               31       31           
Impacted Files Coverage Δ
window.go 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@200sc
Copy link
Contributor Author

200sc commented May 21, 2022

High level changelog:

Oak 4 Changelog

Overall

  • Bump from Go 1.17 to 1.18
  • Operations that would previously fail on an oak window because they were not supported on a specific OS will now fail at compile time instead.
  • Windows, Linux, and OSX have had their window functionality standardized.
  • Examples have been trimmed down and compressed.

Testing

  • Added Linux AMD64 and Windows AMD64 automated test agents

Alg Package

  • alg/range has been replaced by alg/span, a genericized version of the package.
  • Intgeom rectangles now implement the alg/span interface. In other words, rectangles can be queries for arbitrary points within them and have points clamped to their boundaries.

Audio Package

  • The audio and pcm packages have been rewritten from scratch.
  • A program can now select a specific audio driver for a platform. There are minimal options currently, but this can be extended in the future.
  • The pcm package now defines the audio interface in a streamable fashion, and audio defines options for playing back pcm streams.
  • Some functionality has been removed with no current replacement, e.g. Ears, positional filters. They can be re-added in the future.
  • Streaming enables new functionality like FadeIn and FadeOut stream wrappers.
  • Audio format packages can now be compiled in at request instead of always compiled into programs. This should decrease binary sizes of most programs, particularly those not using audio or only using one format.
  • The synth package has additional functionality for manipulating generated waveforms like detuning, combining waveforms, and detecting a waveform's pitch.

Entities Package

  • This package has been rewritten from scratch to use optional constructors instead of a series of scaling types with additional functionality. entities/x/move has been moved to entities itself.
  • entities/x/btn has been trimmed down to use entities internally instead of its own structures.
  • entities/x/force and entities/x/stat have been removed.
  • entities/x/shake has been promoted to oak/shake.

Event Handling

  • Event handling has been augmented to support type safe argument handling via generics.
  • The interface for binding and unbinding events, and the internal logic for processing requests, has been overhauled.
  • Example: previously to unbind a specific known binding in collision.Detach, we did this:
if _, ok := en.(attachSpace); ok { 
event.UnbindBindable(
	event.UnbindOption{
		Event: event.Event{
			Name:     event.Enter,
			CallerID: s.CID,
		},
		Fn: attachSpaceEnter,
	},
)
}

Now, bindings return a value that can be explicitly used to unbind themselves later:

if as, ok := en.(attachSpace); ok {
    as.getAttachSpace().binding.Unbind()
}
  • These rewrites eliminate the need for oak.Config.EventRefreshRate.

Render

  • The build tag nogift can be added to exclude the disintegration/gift dependency and its helper functions.
  • The build tag noimages can be added to exclude registering the standard library's built in image support.

Scene Handling

  • Scenes no longer have a Loop function. For operations that should happen every frame, the event package is preferred, with helpers like scene.Context.DoEachFrame added. scene.Context.GoToScene and its like are preferred for handling when a scene ends.
  • Scene contexts embed most of their component constructs, and can be provided to the event and render packages as appropriate.

200sc and others added 3 commits May 21, 2022 09:04
writer_js is being removed because it is not functional yet.
README: Update the readme to have a few more points added
@200sc 200sc merged commit d02801f into release/v4.0.0 May 21, 2022
@200sc 200sc deleted the feature/v4-examples branch June 11, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants