Ebiten 1.11 Release Notes
v1.11.0
New features
Game interface and RunGame
Game interface and RunGame function are introduced. These are new API to run a game.
Run function is not deprecated and will remain for a while, but it is recommended to use Game interface and RunGame function for new usages.
These are ncessary to make the window resizable instead of Run (Issue 943).
Resizable window
For more details about a resizable window, see the blog article.
IsWindowResizable/SetWindowResizableare introduced (Issue 320).WindowSize/SetWindowSizeare introduced (Issue 320).MaximizeWindow/IsWindowMaximizedare introduced (Issue 994).MinimizeWindow/IsWindowMinimizedare introduced (Issue 994).RestoreWindowis introduced (Issue 994).
type Game struct{}
func (g *Game) Update(screen *ebiten.Image) error {
// Update the game state
return nil
}
func (g *Game) Draw(screen *ebiten.Image) {
// Draw the current game state
}
func (g *Game) Layout(outsideWidth, outsideHeight int)
(screenWidth, screenHeight int) {
// Accepts the outside size (e.g., window size), and
// returns the game screen size.
// The game screen scale is automatically adjusted.
return 320, 240
}
func main() {
g := &Game{}
if err := ebiten.RunGame(g); err != nil {
panic(err)
}
}
Window position
WindowPosition/SetWindowPositionare introduced (Issue 936).
Transparent screen
SetScreenTransparent/IsScreenTransparentare introduced (Issue 1001).
Floating window
SetWindowFloating/IsWindowFloatingare introduced (Issue 880).
You can develop a desktop mascot application with these API. See the mascot example.
Capturing cursor
CursorModeType/CursorMode/SetCursorModeare introduced (Issue 1016).
Misc.
SetWindowDecoratedbeforeRun/RunGameis allowed (Issue 556).ReplacePixelson a sub-image is allowed (Issue 980).- Go modules are supported at
ebitenmobilecommand (Issue 1055). - Keyboards are supported on Android and iOS (Issue 237).
- Gamepads are supported on Android (Issue 1083).
Performance improvement
- Creating images and replacing pixels are faster by using PBO (Pixel Buffer Object) (Issue 988).
- Other small optimizations (Issue 976, Issue 981, Issue 990, Issue 1101).
Deprecated API
SetScreenSize: UseGameinterface andRunGamefunction instead.ScreenScale: UseWindowSizeinstead.SetScreenScale: UseSetWindowSizeinstead.IsCursorVisible: UseCursorModeinstead.SetCursorVisible: UseSetCursorModeinstead.IsRunnableInBackground: UseIsRunnableOnUnfocusedinstead.SetRunnableInBackground: UseSetRunnableOnUnfocusedinstead.
Bug fix
- This release includes all the bug fixes in v1.10.x.
- Enlarging an image failed on Android Huawei ALE-L02 (Issue 1044).
- Blinking edges on iPad (Issue 1019).
v1.11.1
Bug fix
- Improve the performance when using
Gameinterface'sDrawfunction (Issue 1134, Issue 1140). (*Image).Atcould be unnecessarily slow (Issue 1137).ebitenmobilewith specifying archtectures at-targetdid not work (Issue 1142).
v1.11.2
Bug fix
- A possible freeze on browsers (Issue 1161).
- An image rendered by
Fillmay be failed to restore correctly after context-lost (Issue 1170).
v1.11.3
Bug fix
- Ensured that
Updatemust be called at least once beforeDrawin the first frame (Issue 1155). - Crashed when an input device is detached on Android (Issue 1185).
SetVsyncEnabled(false)beforeRun/RunGamedidn't work (Issue 1197).
v1.11.4
Bug fix
- Mitigated the crashes when launching an application on macOS (Issue 1237).
v1.11.5
Bug fix
- Broken graphics on Raspberry Pi 4 (Issue 1208).
- Delayed audio after sleeping on macOS (Issue 1259).
v1.11.6
Bug fix
- Build error for Android (Issue 1266).
v1.11.7
Bug fix
- Delayed audio after 1 minute sleeping on macOS (Issue 1280).
v1.11.8
Bug fix
- Freeze on Pixel 4 and Pixel 4a (Issue 1322, Issue 1332).
ebitenmobiledid not work with Go 1.15 (Issue 1336).
v1.11.9
Bug fix
- Vsync didn't work in fullscreen mode on Windows (Issue 1363).