Socket
Socket
Sign inDemoInstall

github.com/sam-anthony/ebiten/v2

Package Overview
Dependencies
18
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/sam-anthony/ebiten/v2

Package ebiten provides graphics and input API to develop a 2D game. You can start the game by calling the function RunGame. In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go' statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions (e.g., DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame is called). `EBITEN_SCREENSHOT_KEY` environment variable specifies the key to take a screenshot. For example, if you run your game with `EBITEN_SCREENSHOT_KEY=q`, you can take a game screen's screenshot by pressing Q key. This works only on desktops. `EBITEN_INTERNAL_IMAGES_KEY` environment variable specifies the key to dump all the internal images. This is valid only when the build tag 'ebitendebug' is specified. This works only on desktops. `ebitendebug` outputs a log of graphics commands. This is useful to know what happens in Ebiten. In general, the number of graphics commands affects the performance of your game. `ebitengl` forces to use OpenGL in any environments. `ebitenwebgl1` forces to use WebGL 1 on browsers. `ebitensinglethread` disables Ebiten's thread safety to unlock maximum performance. If you use this you will have to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag. They must be called from the main thread or the same goroutine as the given game's callback functions like Update to RunGame. `ebitenexternaldll` stops embedding DLL file in a Windows executable. `ebitenexternaldll` works only for Windows. The executable will require a DLL file at the working directory. Copy them from Ebiten repository's `internal/glfw`: The directory path can be obtained by Go commands. For example, on PowerShell: and on shell: Embedding a DLL and extracting it on the fly might be problematic on Windows since the application might be unexpectedly recognized as a virus by some virus checkers. `ebitenexternaldll` is useful for such cases. See #1832 for the discussion.


Version published

Readme

Source

Ebiten (v2)

Go Reference Build Status Go Report Card

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

  • 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.

FAQs

Last updated on 12 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc