2014-12-27 16:26:33 +01:00
<!DOCTYPE html>
2016-08-27 17:58:27 +02:00
< script src = "./scripts/force-https.js" > < / script >
2017-04-18 03:27:32 +02:00
< meta name = "description" content = "Ebiten - A simple 2D game library in Go" >
2015-01-10 11:18:43 +01:00
< link rel = "shortcut icon" href = "./favicon.png" type = "image/png" >
< link rel = "icon" href = "./favicon.png" type = "image/png" >
2017-04-18 03:27:32 +02:00
< title > Ebiten - A simple 2D game library in Go< / title >
2016-08-27 17:48:15 +02:00
< link rel = "stylesheet" href = "./stylesheets/bootstrap.min.css" >
< link rel = "stylesheet" href = "./stylesheets/highlight-github.css" >
< link rel = "stylesheet" href = "./stylesheets/ebiten.css" >
2016-08-29 02:51:38 +02:00
< script src = "./scripts/googleanalytics.js" > < / script >
2016-08-26 19:28:57 +02:00
< header class = "navbar" > < div class = "container" >
< div class = "navbar-header" >
2016-08-27 17:48:15 +02:00
< a class = "navbar-brand" href = "./" > Ebiten< / a >
2016-08-26 19:28:57 +02:00
< / div >
< nav class = "collapse navbar-collapse" >
2016-08-26 19:37:08 +02:00
< ul class = "nav navbar-nav" >
2016-08-28 00:26:03 +02:00
< li > < a href = "#platforms" > Platforms< / a > < / li >
2016-08-26 19:37:08 +02:00
< li > < a href = "#features" > Features< / a > < / li >
< li > < a href = "#examples" > Examples< / a > < / li >
< li > < a href = "#getting-started" > Getting Started< / a > < / li >
< / ul >
< ul class = "nav navbar-nav navbar-right" >
< li > < a href = "https://github.com/hajimehoshi/ebiten" > GitHub< / a > < / li >
2016-08-27 17:58:27 +02:00
< li > < a href = "https://godoc.org/github.com/hajimehoshi/ebiten" > GoDoc< / a > < / li >
2016-08-26 19:37:08 +02:00
< li > < a href = "https://github.com/hajimehoshi/ebiten/wiki" > Wiki< / a >
< / ul >
2016-08-26 19:28:57 +02:00
< / nav >
< / div > < / header >
< main > < div class = "container" >
2016-08-26 22:33:27 +02:00
< h1 > Ebiten< / h1 >
2017-04-18 03:27:32 +02:00
< p class = "lead" > A simple 2D game library in Go< / p >
2017-06-09 04:43:50 +02:00
< p > Stable version: v1.5.0 / Development version: v1.6.0-alpha< / p >
2016-08-28 00:26:03 +02:00
< h2 id = "platforms" > Platforms< / h2 >
< dl class = "dl-horizontal" >
< dt > Desktops< / dt >
2017-05-14 17:07:13 +02:00
< dd > < a href = "https://github.com/hajimehoshi/ebiten/wiki/Windows" > Windows< / a > , < a href = "https://github.com/hajimehoshi/ebiten/wiki/macOS" > macOS< / a > , < a href = "https://github.com/hajimehoshi/ebiten/wiki/Linux" > Linux< / a > , < a href = "https://github.com/hajimehoshi/ebiten/wiki/FreeBSD" > FreeBSD< / a > < / dd >
2016-08-28 00:26:03 +02:00
< dt > Mobiles< / dt >
< dd > < a href = "https://github.com/hajimehoshi/ebiten/wiki/Android" > Android< / a > , < a href = "https://github.com/hajimehoshi/ebiten/wiki/iOS" > iOS< / a > < / dd >
< dt > Web browsers< / dt >
2016-11-26 16:11:23 +01:00
< dd > < a href = "https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers" > Chrome, Firefox and Safari on desktops< / a > (powered by < a href = "http://gopherjs.org/" > GopherJS< / a > )< / dd >
2016-08-28 00:26:03 +02:00
< / dl >
2016-11-28 19:42:16 +01:00
< p > < small > Note: Gamepads is not available on Safari/Android/iOS. Keyboard is not available on Android/iOS.< / small > < / p >
2016-08-26 19:28:57 +02:00
< h2 id = "features" > Features< / h2 >
2016-08-28 00:20:34 +02:00
< dl class = "dl-horizontal" >
< dt > 2D Graphics< / dt >
< dd > Geometry/Color matrix transformation, Various composition modes, Offscreen rendering< / dd >
< dt > Input< / dt >
< dd > Mouse, Keyboard, Gamepads, Touches< / dd >
< dt > Audio< / dt >
2017-06-18 18:17:12 +02:00
< dd > MP3, Ogg/Vorbis, WAV, PCM< / dd >
2016-08-28 00:20:34 +02:00
< / dl >
2016-08-26 19:28:57 +02:00
< h2 id = "examples" > Examples< / h2 >
< div class = "row" >
2016-08-26 19:37:08 +02:00
< div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/alphablending.html" > < img src = "images/examples/alphablending.png" width = "320" height = "240" alt = "Ebiten example: alphablending" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/audio.html" > < img src = "images/examples/audio.png" width = "320" height = "240" alt = "Ebiten example: audio" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/font.html" > < img src = "images/examples/font.png" width = "320" height = "240" alt = "Ebiten example: font" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/hsv.html" > < img src = "images/examples/hsv.png" width = "320" height = "240" alt = "Ebiten example: hsv" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/hue.html" > < img src = "images/examples/hue.png" width = "320" height = "240" alt = "Ebiten example: hue" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/gamepad.html" > < img src = "images/examples/gamepad.png" width = "320" height = "240" alt = "Ebiten example: gamepad" class = "example" > < / a >
2016-09-02 19:54:17 +02:00
< / div > < div class = "col-md-3" >
< a class = "thumbnail" scrolling = "no" href = "examples/infinitescroll.html" > < img src = "images/examples/infinitescroll.png" width = "320" height = "240" alt = "Ebiten example: infinitescroll" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/keyboard.html" > < img src = "images/examples/keyboard.png" width = "320" height = "240" alt = "Ebiten example: keyboard" class = "example" > < / a >
2016-09-02 19:44:29 +02:00
< / div > < div class = "col-md-3" >
< a class = "thumbnail" scrolling = "no" href = "examples/life.html" > < img src = "images/examples/life.png" width = "320" height = "240" alt = "Ebiten example: life" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/masking.html" > < img src = "images/examples/masking.png" width = "320" height = "240" alt = "Ebiten example: masking" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/mosaic.html" > < img src = "images/examples/mosaic.png" width = "320" height = "240" alt = "Ebiten example: mosaic" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/noise.html" > < img src = "images/examples/noise.png" width = "320" height = "240" alt = "Ebiten example: noise" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/paint.html" > < img src = "images/examples/paint.png" width = "320" height = "240" alt = "Ebiten example: paint" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/perspective.html" > < img src = "images/examples/perspective.png" width = "320" height = "240" alt = "Ebiten example: perspective" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/piano.html" > < img src = "images/examples/piano.png" width = "320" height = "240" alt = "Ebiten example: piano" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/rotate.html" > < img src = "images/examples/rotate.png" width = "320" height = "240" alt = "Ebiten example: rotate" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/sprites.html" > < img src = "images/examples/sprites.png" width = "320" height = "240" alt = "Ebiten example: sprites" class = "example" > < / a >
2017-06-24 17:48:11 +02:00
< / div > < div class = "col-md-3" >
< a class = "thumbnail" scrolling = "no" href = "examples/2048.html" > < img src = "images/examples/2048.png" width = "210" height = "300" alt = "Ebiten example: 2048" class = "example" > < / a >
2016-08-26 19:37:08 +02:00
< / div > < div class = "col-md-3" >
2016-08-26 20:43:55 +02:00
< a class = "thumbnail" scrolling = "no" href = "examples/blocks.html" > < img src = "images/examples/blocks.png" width = "256" height = "240" alt = "Ebiten example: blocks" class = "example" > < / a >
2016-08-26 19:28:57 +02:00
< / div >
< / div >
2016-08-27 17:58:27 +02:00
< p > < a href = "https://blog.golang.org/go-programming-language-turns-two" > The Gopher photographs by Chris Nokleberg< / a > are licensed under < a href = "https://creativecommons.org/licenses/by/3.0/" > the Creative Commons 3.0 Attributions License< / a > .< / p >
2016-08-26 19:28:57 +02:00
< h3 > Execute the examples< / h2 >
2016-10-23 19:17:47 +02:00
< pre > < code class = "language-bash" > :; go get github.com/hajimehoshi/ebiten/...
2016-08-01 18:29:07 +02:00
:; cd $GOPATH/src/github.com/hajimehoshi/ebiten/examples
2016-10-15 18:06:31 +02:00
:; go run -tags=example rotate/main.go< / code > < / pre >
2016-10-15 18:14:22 +02:00
< p > Note that you need to add < code > -tags=example< / code > to run examples.< / p >
2016-08-26 16:33:36 +02:00
2016-08-26 19:28:57 +02:00
< h2 id = "getting-started" > Getting Started< / h2 >
2014-12-27 16:26:33 +01:00
2016-08-26 19:28:57 +02:00
< p > Let's build a simple "Hello world!" game to get started with Ebiten.
2016-06-23 05:16:27 +02:00
First create a new directory (< code > mkdir hello_world< / code > ), and change
into it (< code > cd hello_world< / code > ). Type the following code into
the < code > main.go< / code > file:< / p >
2016-08-27 07:00:06 +02:00
< pre > < code class = "language-go" > package main
2016-06-23 05:16:27 +02:00
import (
2016-08-26 22:36:52 +02:00
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
2016-06-23 05:16:27 +02:00
)
func update(screen *ebiten.Image) error {
2017-03-04 04:04:19 +01:00
ebitenutil.DebugPrint(screen, "Hello world!")
2016-08-26 22:36:52 +02:00
return nil
2016-06-23 05:16:27 +02:00
}
func main() {
2016-08-26 22:36:52 +02:00
ebiten.Run(update, 320, 240, 2, "Hello world!")
2016-06-23 05:16:27 +02:00
}
< / code > < / pre >
2016-08-26 19:28:57 +02:00
< p > Run the < code > go run< / code > command to start the
2016-06-23 05:16:27 +02:00
game. There you have it, your first Ebiten game!< / p >
2016-08-26 19:28:57 +02:00
< / div > < / main >
2015-01-08 15:45:30 +01:00
2016-08-26 19:28:57 +02:00
< footer > < div class = "container" >
< p > © 2013 Hajime Hoshi< / p >
2016-08-28 00:10:41 +02:00
< p > Code is licensed under < a href = "https://github.com/hajimehoshi/ebiten/blob/master/LICENSE" > the Apache License 2.0< / a > .< / p >
2016-08-26 19:28:57 +02:00
< p > The content of this page is licensed under < a href = "https://creativecommons.org/licenses/by/4.0/" > the Creative Commons Attribution 4.0 License< / a > .< / p >
< / div > < / footer >
2016-08-27 07:00:06 +02:00
2016-08-27 17:48:15 +02:00
< script src = "./scripts/highlight.pack.js" > < / script >
2016-08-27 07:00:06 +02:00
< script > hljs . initHighlightingOnLoad ( ) ; < / script >