Ebitengine 2.3 Release Notes
Ebiten was renamed to Ebitengine on May 25, 2022.
v2.3.0
DirectX on Windows
(#1007)
Ebitengine now supports DirectX on Windows. This is a preparation to support more environments like Arm Windows by Ebitengine.
Native compile for Nintendo Switch™
(#1900)
In the previous version, Ebitengine supported Nintendo Switch by go2cpp
by converting Go program to C++ via the WebAssembly format. This was a portable and simple solution. However, an application was single-threaded and not performant due to the WebAssembly restriction. Compiling time for bunch of C++ files was also problematic.
In order to resolve these problems, Ebitengine now supports a native compiling for Nintendo Switch by Hitsumabushi, which replaces system calls in the Go runtime with C function calls. For more technical details, see a blog article about Hitsumabushi.
In order to support this, Ebitengine introduced a new build tag ebitencbackend
.
An environment variable EBITEN_GRAPHICS_LIBRARY
You can specify an underlying graphics library for Ebitengine by an environment variable EBITEN_GRAPHICS_LIBRARY
.
auto
(default): Ebitengine chooses a graphics library automatically.opengl
: OpenGL, OpenGL ES, or WebGL is used.metal
: Metal is used.directx
: DirectX is used.
A build tag ebitengl
was removed.
A build tag ebitenexternaldll
(#1832)
Ebitengine embeds DLL files for a Windows executable, and the executable extracts them on the fly. However, this can be problematic as the application might be unexpectdly recognized as a virus by some virus checkers.
A new build tag ebitenexternaldll
stops embedding DLL file in a Windows executable. The executable will require a DLL file at the working directory. Copy them from Ebitengine repository's internal/glfw
directory:
glfw_windows_386.dll
for Windows GOARCH=386glfw_windows_amd64.dll
for Windows GOARCH=amd64
This is not a perfect solution yet, but should mitigate the false positives.
Vibration
(#1452)
Ebitengine introduced new APIs to vibrate mobile devices, browsers, and game controllers:
ebiten.Vibrate
vibrates the device with the specified options. Vibrate works on mobiles and browsers.ebiten.VibrateGamepad
vibrates the specified gamepad with the specified options. This works only on browsers and Nintendo Switch so far.
Window-resizing mode
(#1819)
Ebitengine introduced new APIs for various modes of resizing a window:
ebiten.WindowResizingModeType
represents a mode in which a user resizes the window.WindowResizingModeDisabled
indicates the mode to disallow resizing the window by a user.WindowResizingModeOnlyFullscreenEnabled
indicates the mode to disallow resizing the window, but allow to make the window fullscreen by a user. This works only on macOS so far.WindowResizingModeEnabled
indicates the mode to allow resizing the window by a user.
ebiten.SetWindowResizingMode
sets the mode in which a user resizes the window.
ebiten.IsWindowResizable
and ebiten.SetWindowResizable
was now deprecated.
Real-time PCM
(#2026)
Ebitengine introduced a new API for real-time PCM by adjusting an audio player's buffer size:
(*audio.Player).SetBufferSize
adjusts the buffer size of the player. A small buffer size is useful if you want to play a real-time PCM for example.
For an actual usage, see the new example realtimepcm
.
Other new features
- Gamepad support for iOS (#1105)
- The standard gamepad layout for mobiles (#1722)
ebiten.SetScreenFilterEnabled
(#1772)text.AppendGlyphs
(#1871)(*ebiten.ColorM).ScaleWithColor
(#1944)
Bug fix
This release includes all the bug fixes in v2.2.x.
- Slight noises for a looped audio stream (#1888)
- Bunch of bug fixes in Kage like wrong type checkings
- Other small fixes
Performance
v2.3.1
Bug fix
- An app froze when manipulating images at a game's
Layout
function (#2079). - An app sometimes crashed when resizing a window on Windows (#2081).
v2.3.2
Bug fix
- An old Metal shading language version could be used unexpectedly on macOS (#2086).
- Calling
Image.Fill
andImage.Set
and resizing the window broke the rendering (#2089).
v2.3.3
Bug fix
- Android NDK 24 is supported (#2085).
- An application might crash just by importing
inpututil
(#2103).
v2.3.4
Bug fix
- A non-existing returing value was handled in the DirectX driver (#2115).
- An application crashes with a gamepad on 32bit Linux (#2122).
- An application crashes with pressing Alt + Enter on Windows (#2123).
v2.3.5
Bug fix
- An application crashed when
MaximizeWindow
was called before the main loop started (#2137). - The screen unexpectedly blinked with the
EvenOdd
mode on Windows (#2138). - Debug warnings were shown after resizing the window on Windows (#2151).
ReplacePixels
sometimes failed on macOS (#2154).
v2.3.6
Bug fix
- A memory allocation error sometimes happened on browsers (#2156).
- An application might crash with some inputting devices on Linux (#2169).
- A big screen might flicker on macOS (#2174).
- An applicaiton crashed when going to a lock screen on Windows (#2179).
v2.3.7
Bug fix
ebitenmobile
for iOS didn't work with a case-sensitive file system (#2192).- There were wrong memory usages in the DirectX driver (#2201, #2202, #2204).
- There was a memory leak when disconnecting a gamepad on Windows (#2205).