mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
158 lines
8.0 KiB
HTML
158 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<script src="./scripts/force-https.js"></script>
|
|
<meta name="description" content="Ebiten - A simple SNES-like 2D game library in Go">
|
|
<link rel="shortcut icon" href="./favicon.png" type="image/png">
|
|
<link rel="icon" href="./favicon.png" type="image/png">
|
|
<title>Ebiten - A simple SNES-like 2D game library in Go</title>
|
|
<link rel="stylesheet" href="./stylesheets/bootstrap.min.css">
|
|
<link rel="stylesheet" href="./stylesheets/highlight-github.css">
|
|
<link rel="stylesheet" href="./stylesheets/ebiten.css">
|
|
|
|
<header class="navbar"><div class="container">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand" href="./">Ebiten</a>
|
|
</div>
|
|
<nav class="collapse navbar-collapse">
|
|
<ul class="nav navbar-nav">
|
|
<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>
|
|
<li><a href="https://godoc.org/github.com/hajimehoshi/ebiten">GoDoc</a></li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki">Wiki</a>
|
|
</ul>
|
|
</nav>
|
|
</div></header>
|
|
|
|
<main><div class="container">
|
|
<h1>Ebiten</h1>
|
|
<p class="lead">A simple SNES-like 2D game library in Go</p>
|
|
<p>Stable version: v1.3.0 / Development version: v1.4.0-alpha</p>
|
|
<ul>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Web browsers (Chrome and Firefox on desktops)</a> (powered by <a href="http://gopherjs.org/">GopherJS</a>)</li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/Windows">Windows</a></li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/Mac-OS-X">Mac OS X</a></li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/Linux">Linux</a></li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/Android">Android</a></li>
|
|
<li><a href="https://github.com/hajimehoshi/ebiten/wiki/iOS">iOS</a></li>
|
|
</ul>
|
|
|
|
<h2 id="features">Features</h2>
|
|
<ul>
|
|
<li>2D Graphics
|
|
<ul>
|
|
<li>Geometry/Color matrix transformation</li>
|
|
<li>Various composition modes</li>
|
|
<li>Offscreen rendering</li>
|
|
</ul>
|
|
</li>
|
|
<li>Input
|
|
<ul>
|
|
<li>Mouse</li>
|
|
<li>Keyboard</li>
|
|
<li>Gamepads</li>
|
|
<li>Touches</li>
|
|
</ul>
|
|
</li>
|
|
<li>Audio
|
|
<ul>
|
|
<li>Ogg/Vorbis</li>
|
|
<li>WAV</li>
|
|
<li>PCM</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h2 id="examples">Examples</h2>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div><div class="col-md-3">
|
|
<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>
|
|
</div>
|
|
</div>
|
|
<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>
|
|
|
|
<h3>Execute the examples</h2>
|
|
<pre><code class="language-bash">:; go get github.com/hajimehoshi/ebiten
|
|
:; cd $GOPATH/src/github.com/hajimehoshi/ebiten/examples
|
|
:; go run -tags example rotate/main.go</code></pre>
|
|
<p>Note that you need to specify <code>example</code> tag.</p>
|
|
|
|
<h2 id="getting-started">Getting Started</h2>
|
|
|
|
<p>Let's build a simple "Hello world!" game to get started with Ebiten.
|
|
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>
|
|
|
|
<pre><code class="language-go">package main
|
|
|
|
import (
|
|
"github.com/hajimehoshi/ebiten"
|
|
"github.com/hajimehoshi/ebiten/ebitenutil"
|
|
)
|
|
|
|
func update(screen *ebiten.Image) error {
|
|
ebitenutil.DebugPrint(screen, "Hello world!")
|
|
return nil
|
|
}
|
|
|
|
func main() {
|
|
ebiten.Run(update, 320, 240, 2, "Hello world!")
|
|
}
|
|
</code></pre>
|
|
|
|
<p>Run the <code>go run</code> command to start the
|
|
game. There you have it, your first Ebiten game!</p>
|
|
|
|
</div></main>
|
|
|
|
<footer><div class="container">
|
|
<p>© 2013 Hajime Hoshi</p>
|
|
<p>Code is licensed under <a href="https://github.com/hajimehoshi/ebiten/blob/master/LICENSE">Apache License 2.0</a>.</p>
|
|
<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>
|
|
|
|
<script src="./scripts/highlight.pack.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-83252440-1', 'auto');
|
|
ga('send', 'pageview');
|
|
</script>
|