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
/SetWindowResizable
are introduced (Issue 320).WindowSize
/SetWindowSize
are introduced (Issue 320).MaximizeWindow
/IsWindowMaximized
are introduced (Issue 994).MinimizeWindow
/IsWindowMinimized
are introduced (Issue 994).RestoreWindow
is 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
/SetWindowPosition
are introduced (Issue 936).
Transparent screen
SetScreenTransparent
/IsScreenTransparent
are introduced (Issue 1001).
Floating window
SetWindowFloating
/IsWindowFloating
are introduced (Issue 880).
You can develop a desktop mascot application with these API. See the mascot example.
Capturing cursor
CursorModeType
/CursorMode
/SetCursorMode
are introduced (Issue 1016).
Misc.
SetWindowDecorated
beforeRun
/RunGame
is allowed (Issue 556).ReplacePixels
on a sub-image is allowed (Issue 980).- Go modules are supported at
ebitenmobile
command (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
: UseGame
interface andRunGame
function instead.ScreenScale
: UseWindowSize
instead.SetScreenScale
: UseSetWindowSize
instead.IsCursorVisible
: UseCursorMode
instead.SetCursorVisible
: UseSetCursorMode
instead.IsRunnableInBackground
: UseIsRunnableOnUnfocused
instead.SetRunnableInBackground
: UseSetRunnableOnUnfocused
instead.
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
Game
interface'sDraw
function (Issue 1134, Issue 1140). (*Image).At
could be unnecessarily slow (Issue 1137).ebitenmobile
with specifying archtectures at-target
did not work (Issue 1142).
v1.11.2
Bug fix
- A possible freeze on browsers (Issue 1161).
- An image rendered by
Fill
may be failed to restore correctly after context-lost (Issue 1170).
v1.11.3
Bug fix
- Ensured that
Update
must be called at least once beforeDraw
in the first frame (Issue 1155). - Crashed when an input device is detached on Android (Issue 1185).
SetVsyncEnabled(false)
beforeRun
/RunGame
didn'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).
ebitenmobile
did not work with Go 1.15 (Issue 1336).
v1.11.9
Bug fix
- Vsync didn't work in fullscreen mode on Windows (Issue 1363).