Ebitengine - A dead simple 2D game engine for Go
Go to file
divVerent 62229e82a6
Pre-failing test for color interpolation during rendering. (#2001)
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.
2022-02-24 03:12:33 +09:00
.builds .build: bug fix: remove an unused template parameter 2021-12-15 03:08:19 +09:00
.github .github/workflow: fix syntax error 2022-02-13 17:09:52 +09:00
audio internal/cbackend: simplify the audio API 2021-12-23 22:20:04 +09:00
cmd/ebitenmobile internal/gamepaddb: implement the mappings for Android 2022-01-09 03:29:19 +09:00
docs docs: Remove unused contents 2019-03-22 03:23:48 +09:00
ebitenutil all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
examples ebiten: add WindowResizingModeType and its constants and functions 2022-02-11 04:59:04 +09:00
inpututil inpututil: Add APIs for the standard gamepad layout 2021-07-20 02:37:12 +09:00
internal internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. (#1996) 2022-02-24 02:27:50 +09:00
misc misc: English 2022-01-27 15:49:09 +09:00
mobile internal/driver: move the key definitions to internal/ui 2022-02-06 19:14:18 +09:00
text ebiten: add ColorM.ScaleWithColor 2022-01-10 17:36:46 +09:00
vector vector: Fix comments 2021-09-26 01:13:00 +09:00
.gitattributes Update .gitattributes 2021-10-09 19:17:52 +09:00
.gitignore audio/internal/readdriver: Implement a driver for Android with Oboe 2021-05-04 23:51:36 +09:00
AUTHORS add Elias Daler to AUTHORS 2022-01-17 00:29:24 +09:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md 2020-01-08 11:30:57 +09:00
colorm_test.go Remove dot imports from tests - Remove dot imports (#1837) 2021-10-02 19:58:48 +09:00
colorm.go ebiten: add ColorM.ScaleWithColor 2022-01-10 17:36:46 +09:00
CONTRIBUTING.md direct users to the readme in the docs repo (#1912) 2021-12-24 23:50:40 +09:00
cursor.go internal/driver: move some definitions to internal/ui 2022-02-06 18:13:45 +09:00
debug_ebitendebug.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
debug_notebitendebug.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
doc.go ebiten: Update doc 2021-10-21 01:28:07 +09:00
export_test.go ebiten: Bug fix: Wrong uniform type was used 2020-09-17 20:52:32 +09:00
gameforui.go ebiten: move comments 2022-02-23 02:54:14 +09:00
gamepad.go internal/gamepaddb: move driver.StandardGamepadButton to gamepaddb.StandardButton 2022-02-05 23:11:09 +09:00
generate.go Bug fix: some generators did not work due to a lacked package 2020-03-23 01:36:21 +09:00
genevents.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
genkeys.go all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
geom_test.go Remove dot imports from tests - Remove dot imports (#1837) 2021-10-02 19:58:48 +09:00
geom.go ebiten: fixes a typo (#1930) 2022-01-05 15:06:41 +09:00
go.mod update Oto to v2.1.0-alpha.6 2022-02-18 01:19:22 +09:00
go.sum update Oto to v2.1.0-alpha.6 2022-02-18 01:19:22 +09:00
graphics.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
image_test.go Pre-failing test for color interpolation during rendering. (#2001) 2022-02-24 03:12:33 +09:00
image.go internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. (#1996) 2022-02-24 02:27:50 +09:00
imagedumper_desktop.go all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
imagedumper_notdesktop.go all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
imagetobytes_test.go Remove dot imports from tests - Remove dot imports (#1837) 2021-10-02 19:58:48 +09:00
imagetobytes.go ebiten: Remove copying pixels from ReplacePixels and copyImage (renamed to imageToBytes) 2020-07-03 03:01:48 +09:00
input.go internal/driver: move the key definitions to internal/ui 2022-02-06 19:14:18 +09:00
keys.go internal/driver: move the key definitions to internal/ui 2022-02-06 19:14:18 +09:00
LICENSE Adjust LICENSE file 2017-01-30 18:57:49 +09:00
mousebuttons.go internal/driver: remove Input 2022-02-06 18:34:31 +09:00
README.md rfemove the link to the report card 2022-01-30 02:43:56 +09:00
run_mobile.go internal/ui: remove RunWithoutMainLoop in non-mobile environments 2022-02-13 22:31:48 +09:00
run.go ebiten: remove RunOnMainThread 2022-02-14 01:49:42 +09:00
shader_test.go internal/shader: ban the operator div on a matrix 2022-01-21 03:37:34 +09:00
shader.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
vibrate.go internal/ui: separate 'vibrate' part to internal/vibrate 2022-02-08 14:48:55 +09:00
window.go ebiten: fix a wrong comment about deprecations 2022-02-11 05:21:58 +09:00

Ebiten (v2)

Go Reference Build Status

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.

Overview

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

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.