Ebitengine - A dead simple 2D game engine for Go
Go to file
corfe83 a18cddb39f
Reduce heap allocations in thread.go and input.go (#1085)
I've been doing some profiling of a very simple ebiten project, and noticed that thread.go was doing a bunch of unnecessary allocations to accomplish its work. This change seeks to reduce GC work.

Input.go was also doing some unnecessary allocations.

The thread.go change reduces the total number of allocations per frame from 1342 to 852 (~36% reduction). The input.go change reduces it further to 752 (~44% total reduction). Perf tests were done on windows.
2020-02-21 09:59:45 +09:00
.github Add FUNDING.yml 2019-12-07 19:00:46 +09:00
audio audio: Remove duplicate check for io.Seeker (#1051) 2020-01-10 19:37:31 +09:00
cmd/ebitenmobile mobile/ebitenmobileview: Handle keyboard keys on Android (ebitenmobile) 2020-02-20 01:53:51 +09:00
docs docs: Remove unused contents 2019-03-22 03:23:48 +09:00
ebitenutil ebitenutil: Cache sub images for debug print 2019-11-24 20:30:54 +09:00
event event: Add doc.go 2020-01-12 18:08:59 +09:00
examples Revert "ui: Add SetInitFocused" 2020-02-10 01:10:40 +09:00
inpututil inpututil: Package inpututil is no longer experimental 2018-05-14 01:32:55 +09:00
internal Reduce heap allocations in thread.go and input.go (#1085) 2020-02-21 09:59:45 +09:00
mobile mobile/ebitenmobileview: Handle keyboard keys on Android (ebitenmobile) 2020-02-20 01:53:51 +09:00
text Add linebreak support to text.Draw (#1075) 2020-02-12 23:15:57 +09:00
vector vector: Rename functions 2019-12-30 16:14:49 +09:00
.gitattributes Add .gitattributes for GitHub Linguist 2020-01-30 21:06:50 +09:00
.gitignore Add new example: squirals (#952) 2019-10-09 00:54:23 +09:00
.travis.yml Update Go version in .travis.yml (Go 1.14) 2020-02-09 01:47:55 +09:00
AUTHORS Add corfe83 to AUTHORS 2020-02-16 02:03:32 +09:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md 2020-01-08 11:30:57 +09:00
colorm_test.go affine: Bug fix: ColorM.Apply was wrong when alpha is 0 2018-02-27 12:16:16 +09:00
colorm.go graphics: Marks ColorM as non-comparable explicitly 2019-10-31 01:55:59 +09:00
CONTRIBUTING.md docs: Update the links 2020-01-20 01:18:05 +09:00
copy_test.go graphics: Move functions to the package ebiten 2019-06-26 22:23:09 +09:00
copy.go graphics: Move functions to the package ebiten 2019-06-26 22:23:09 +09:00
cursormode.go ui: Rename files 2019-12-14 12:35:35 +09:00
debug_ebitendebug.go Add 'ebitendebug' build tag 2018-06-25 23:59:32 +09:00
debug_notebitendebug.go Add 'ebitendebug' build tag 2018-06-25 23:59:32 +09:00
doc.go Fix doc (#1046) 2020-01-06 19:43:29 +09:00
export_test.go mipmap: Create mipmap package and bufferd.Image uses it 2020-01-08 02:06:01 +09:00
gamepad.go input: Move MouseButton and GamepadButton to driver package 2019-03-30 23:19:52 +09:00
generate.go event: Auto-generate event definitions (#935) 2019-09-12 11:32:20 +09:00
genevents.go Fix misspellings 2019-10-12 01:10:53 +09:00
genkeys.go mobile/ebitenmobileview: Handle keyboard keys on Android (ebitenmobile) 2020-02-20 01:53:51 +09:00
geom_test.go affine: Add TestGeoMEquals 2019-06-09 06:56:25 +09:00
geom.go affine: Add Skew function to GeoM 2018-08-01 14:15:30 +09:00
go.mod graphicsdriver/opengl: Leave comments why we don't use PBO on Android 2020-01-19 17:02:34 +09:00
go.sum graphicsdriver/opengl: Leave comments why we don't use PBO on Android 2020-01-19 17:02:34 +09:00
goversion.go Force to use Go 1.12 or later 2019-05-01 17:43:38 +09:00
graphics.go graphics: Move const definitions to driver package 2019-06-26 01:05:13 +09:00
image_test.go graphics: Allow ReplacePixels on a sub-image 2020-02-16 22:18:07 +09:00
image.go graphics: Fix comments on ReplacePixels 2020-02-16 22:25:32 +09:00
imagedumper_desktop.go input: Refactoring: Rename variables 2020-02-19 10:52:58 +09:00
imagedumper_notdesktop.go Remove dependency on internal/png on mobiles and browsers 2018-11-14 00:37:51 +09:00
imageparts.go graphics: Experimental: (*image.Image).SubImage 2018-10-28 02:19:14 +09:00
init.go Refactoring: Add init.go 2020-02-11 11:14:19 +09:00
input.go Reduce heap allocations in thread.go and input.go (#1085) 2020-02-21 09:59:45 +09:00
keys.go input: Refactoring: Rename variables 2020-02-19 10:52:58 +09:00
LICENSE Adjust LICENSE file 2017-01-30 18:57:49 +09:00
mousebuttons.go input: Move MouseButton and GamepadButton to driver package 2019-03-30 23:19:52 +09:00
README.md docs: Update the links 2020-01-20 01:18:05 +09:00
run.go driver: Remove the return value from RunWithoutMainLoop 2020-02-11 23:56:53 +09:00
uicontext.go mobile/ebitenmobileview: Use the common uiContext for layouting 2020-02-11 19:40:47 +09:00
uidriver_glfw.go Remove driver getters for the playground 2019-09-03 01:47:48 +09:00
uidriver_js.go Move back driver getters to ebiten package 2019-09-03 01:46:11 +09:00
uidriver_mobile.go Move back driver getters to ebiten package 2019-09-03 01:46:11 +09:00
window.go ui: Remove the unused function setWindowResizable 2020-02-12 20:58:25 +09:00

Ebiten

Build Status Go Report Card

A dead simple 2D game library in Go

Ebiten is an open-source game library, with which you can develop 2D games with simple API for multi platforms in the Go programming language.

Overview

Platforms

  • Windows (No Cgo!)
  • macOS
  • Linux
  • FreeBSD
  • Android
  • iOS
  • Web browsers (Chrome, Firefox, Safari and Edge)

Note: Gamepad and keyboard are not available on Android/iOS.

For installation on desktops, see the installation instruction.

Features

  • 2D Graphics (Geometry/Color matrix transformation, Various composition modes, Offscreen rendering, Fullscreen, Text rendering, Automatic batches, Automatic texture atlas)
  • Input (Mouse, Keyboard, Gamepads, Touches)
  • Audio (Ogg/Vorbis, MP3, WAV, PCM)

Packages

Community

Slack

#ebiten channel in Gophers Slack

License

Ebiten is licensed under Apache license version 2.0. See LICENSE file.