After the game loop is finished, any goroutines should not exist.
Otherwise, 'Go program has already exited' error can happen on
Wasm.
This change ensures that the goroutines are finished when the game
is finished. Note that time.Sleep was required to ensure that the
(*time.Ticker) ends.
Fixes#1027
This adds hooks on resuming/suspending the application, and
switches the foreground state there. This change also updates
the logic to suspend the game loop to be clearer.
Fixes#1037
Unfotunately, PBO might slow Android applications expecially when
coming back from context lost. Ebiten sends a lot of draw calls to
replace pixels in such case.
Until we find a good solution, let's not use PBO on Android.
Fixes#988
Now grpahicscommand saves the error and shows the error after a
while. This was good to simplify the API but was the cause to hide
some issues.
This change fixes all the errors to be returned immediately, and
buffer this in the ebiten package instead.
Fixes#971
Gamepad GUID is a SDL specific notion and, strictly speaking,
they are not GUID (UUID) since they don't follow UUID's
specifications.
Renaming the function makes the situation clearer.
Updates #1048
Mipmap calculation must be executed after the main loop starts
because the graphics driver's HasHighPrecisionFloat is needed.
Then, operations on mipmap images must be called from images in
buffered package.
Updates #1044
Because golang executes the init function after establishing
the variables in the var block, the random number seed wasn't
initializing until after the initial world state had gotten
established (leading to an identical game of Life on every run).
To fix this, we establish an empty world in the var block,
and then populate it in the init function after the random
number generator has been seeded.