mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
Ebitengine - A dead simple 2D game engine for Go
ebitenebitenginegamegame-2dgame-developmentgame-enginegame-engine-2dgame-librarygamedevgogolanggolang-library
62229e82a6
Before #1996, this failed with: image_test.go:1997: At(1, 0): got: {64 64 128 255}, want: {0 128 128 255} The difference is: - Before, colors were interpolated in straight-color space: - Background: {0 0 255 255} - Vertex A: {255 0 0 0} - Vertex B: {0 255 0 255} - Interpolated: {128 128 0 128} - Premultiplied: {64 64 0 128} - Onto Background: {64 64 128 255} - After, colors are interpolated in premultiplied space: - Background: {0 0 255 255} - Vertex A: {255 0 0 0} - Vertex A premultiplied: {0 0 0 0} - Vertex B: {0 255 0 255} - Vertex B premultiplied: {0 255 0 255} - Interpolated: {0 128 0 128} - Onto Background: {0 128 128 255} This DIFFERS from the sample fragment shader, which returns the color as is (Kage allows vertex color values to be used for arbitrary purposes and interpolates independently): - Shader sample: - Background: {0 0 255 255} - Vertex A: {255 0 0 0} - Vertex B: {0 255 0 255} - Interpolated: {128 128 0 128} - Onto Background: {128 128 128 255} as the blend function is `GL_ONE` / `GL_ONE_MINUS_SRC_ALPHA`. This shader behavior is unchanged but has been documented by #1996. |
||
---|---|---|
.builds | ||
.github | ||
audio | ||
cmd/ebitenmobile | ||
docs | ||
ebitenutil | ||
examples | ||
inpututil | ||
internal | ||
misc | ||
mobile | ||
text | ||
vector | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CODE_OF_CONDUCT.md | ||
colorm_test.go | ||
colorm.go | ||
CONTRIBUTING.md | ||
cursor.go | ||
debug_ebitendebug.go | ||
debug_notebitendebug.go | ||
doc.go | ||
export_test.go | ||
gameforui.go | ||
gamepad.go | ||
generate.go | ||
genevents.go | ||
genkeys.go | ||
geom_test.go | ||
geom.go | ||
go.mod | ||
go.sum | ||
graphics.go | ||
image_test.go | ||
image.go | ||
imagedumper_desktop.go | ||
imagedumper_notdesktop.go | ||
imagetobytes_test.go | ||
imagetobytes.go | ||
input.go | ||
keys.go | ||
LICENSE | ||
mousebuttons.go | ||
README.md | ||
run_mobile.go | ||
run.go | ||
shader_test.go | ||
shader.go | ||
vibrate.go | ||
window.go |
Ebiten (v2)
A dead simple 2D game library for Go
Ebiten is an open source game library for the Go programming language. Ebiten's simple API allows you to quickly and easily develop 2D games that can be deployed across multiple platforms.
Platforms
Note: External (bluetooth) keyboards are not available on iOS yet.
For installation on desktops, see the installation instruction.
Features
- 2D Graphics (Geometry and color transformation by matrices, Various composition modes, Offscreen rendering, Text rendering, Automatic batches, Automatic texture atlas, Custom shaders)
- Input (Mouse, Keyboard, Gamepads, Touches)
- Audio (Ogg/Vorbis, MP3, WAV, PCM)
Packages
Community
- Discord
#ebiten
channel in Gophers Slack- GitHub Discussion
r/ebiten
in Reddit
License
Ebiten is licensed under Apache license version 2.0. See LICENSE file.
The Ebiten logo by Hajime Hoshi is licensed under the Creative Commons Attribution-NoDerivatives 4.0.