Ebitengine - A dead simple 2D game engine for Go
Go to file
divVerent 10c1b56e62
cmd/ebitenmobile: fix Xbox-ish gamepad axis assignment (#2596)
This commit mirrors https://github.com/libsdl-org/SDL/pull/7405
(6f1f586086).

Note that for SDL, this code is used a lot less than for Ebitengine, as SDL
mostly migrated to HIDAPI and direct USB device access rather than using
Android's APIs. For Bluetooth devices, however, the Java APIs are used the
same way.

This was the remaining problem to be solved to automatically support standard
layout on most standard gamepads (this should cover most Xbox-ish and PS-ish
gamepads on the market).

In particular this covers gamepads with the following assignment:

- Left stick = X/Y, right stick = Z/RZ, triggers = LEFTTRIGGER/RIGHTTRIGGER
  (which basically is what Android docs say and some PS gamepads do)

- Left stick = X/Y, right stick = RX/RY, triggers = Z/RZ
  (Xbox gamepad style, apparently)

- Left stick = X/Y, right stick = RX/RY, triggers = LEFTTRIGGER/RIGHTTRIGGER
  (Not sure if this exists, but it's conceivable)

As we found on the SDL pull request discussion, gamepads that offer flight
controls (e.g. THROTTLE and RUDDER) will likely not work well, before and
after this change.

Closes #2557
2023-03-12 22:32:30 +09:00
.builds examples: remove example build tag (#2433) 2022-11-03 20:24:09 +09:00
.github .github/workflows: remove unnecessary file 2023-03-09 17:47:59 +09:00
audio all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
cmd/ebitenmobile cmd/ebitenmobile: fix Xbox-ish gamepad axis assignment (#2596) 2023-03-12 22:32:30 +09:00
colorm all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
ebitenutil ebitenutil: remove whiteImage 2023-03-01 15:23:19 +09:00
examples examples/subimage: add a comment 2023-02-17 02:06:40 +09:00
inpututil ebiten: add additional MouseButtons (#2467) 2022-11-23 04:28:34 +09:00
internal cmd/ebitenmobile: fix Xbox-ish gamepad axis assignment (#2596) 2023-03-12 22:32:30 +09:00
misc misc: update README 2022-05-26 00:05:31 +09:00
mobile internal/ui: freeze the input state for each frame 2022-12-18 23:54:43 +09:00
text all: update comments 2023-02-07 12:05:43 +09:00
vector internal/ui: bug fix: a big-offscreen size could be 0 2023-03-03 22:34:43 +09:00
.gitignore all: add .idea in .gitignore (#2432) 2022-11-03 16:14:37 +09:00
blend.go ebiten: bug fix: wrong BlendDestinationOut behaviour (#2561) 2023-02-06 03:28:58 +09:00
CODE_OF_CONDUCT.md updated an outdated URL in CoC 2022-08-27 13:26:52 +09:00
colorm.go ebiten: remove ColorM.ReadElements 2023-03-07 00:07:08 +09:00
colorscale.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
CONTRIBUTING.md examples: remove example build tag (#2433) 2022-11-03 20:24:09 +09:00
cursor.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
doc.go internal/ui: use a separate render thread for Nintendo Switch 2023-01-03 21:12:18 +09:00
export_test.go internal/ui: move the error handlings to the ui package 2022-03-20 16:26:26 +09:00
gameforui.go ebiten: bug fix: updating the input state must be protected by a mutex 2023-01-22 01:49:43 +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 all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
genkeys.go all: fix typos (#2558) 2023-01-28 19:06:38 +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 dependencies 2023-03-10 22:37:55 +09:00
go.sum update dependencies 2023-03-10 22:37:55 +09:00
graphics.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
image_test.go internal/graphicsdriver/directx: reduce memory usages when reading pixels 2023-02-28 22:55:21 +09:00
image.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
imagedumper.go ebiten: add RunGameOptions.ScreenTransparent 2022-12-09 22:50:57 +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 all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
keys.go ebiten: add Key.MarshalText and Key.UnmarshalText 2022-06-24 03:13:13 +09:00
LICENSE Adjust LICENSE file 2017-01-30 18:57:49 +09:00
mousebuttons.go ebiten: swap the definition MouseButtonMiddle and MouseButtonRight 2022-11-27 13:51:09 +09:00
README.md update README 2023-02-23 23:23:19 +09:00
run_mobile.go ebiten: add RunGameOptions.ScreenTransparent 2022-12-09 22:50:57 +09:00
run.go run: update comments at IsScreenFilterEnabled 2023-03-08 02:16:44 +09:00
shader_test.go ebiten: skip tests with dfdx and dfdy 2023-02-28 03:30:37 +09:00
shader.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
vibrate.go ebiten: typo 2022-09-24 09:37:59 +09:00
window.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00

Ebitengine (v2)

Go Reference Build Status

A dead simple 2D game engine for Go

Ebitengine (formerly known as Ebiten) is an open source game engine for the Go programming language. Ebitengine'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

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

The Ebitengine logo by Hajime Hoshi is licensed under the Creative Commons Attribution-NoDerivatives 4.0.