ebiten/_docs/index.tmpl.html
2019-01-03 16:04:46 +09:00

157 lines
7.3 KiB
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<meta property="og:image" itemprop="image primaryImageOfPage" content="{{.URL}}images/logo.png">
<meta name="description" content="Ebiten - A dead simple 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 dead simple 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">
<script src="./scripts/googleanalytics.js"></script>
<nav class="navbar"><div class="container">
<div class="d-flex flex-row" style="width: 100%;">
<div class="nav mr-auto"><a class="navbar-brand" href="./"><img src="images/logo_white.svg" alt="EBITEN"></a></div>
<ul class="nav">
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten">GitHub</a></li>
<li class="nav-item"><a class="nav-link" href="https://godoc.org/github.com/hajimehoshi/ebiten">API Document</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten/wiki/Cheat-Sheet">Cheat Sheet</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten/wiki">Wiki</a></li>
</ul>
</div>
</div></nav>
<header class="jumbotron jumbotron-fluid"><div class="container text-center">
<h1><img src="images/logo.svg" alt="EBITEN" style="width: 220px; height: 242px;"></h1>
<p class="lead">A dead simple 2D game library in Go</p>
</div></header>
<main><div class="container">
<dl class="row">
<dt class="col-3 text-right">Stable Version</dt>
<dd class="col-9">{{.StableVersion}}</dd>
{{if .RCVersion}}
<dt class="col-3 text-right">Release Candidate Version</dt>
<dd class="col-9">{{.RCVersion}}</dd>
{{end}}
<dt class="col-3 text-right">Development Version</dt>
<dd class="col-9">{{.DevVersion}}</dd>
</dl>
<h2 id="platforms">Platforms</h2>
<dl class="row">
<dt class="col-3 text-right">Desktops</dt>
<dd class="col-9"><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>
<dt class="col-3 text-right">Mobiles</dt>
<dd class="col-9"><a href="https://github.com/hajimehoshi/ebiten/wiki/Android">Android</a>, <a href="https://github.com/hajimehoshi/ebiten/wiki/iOS">iOS</a></dd>
<dt class="col-3 text-right">Web browsers</dt>
<dd class="col-9">Chrome, Firefox, Safari and Edge (<a href="https://github.com/hajimehoshi/ebiten/wiki/GopherJS">GopherJS</a> and <a href="https://github.com/hajimehoshi/ebiten/wiki/WebAssembly">WebAssembly (Experimental)</a>)</dd>
</dl>
<p><small>Note: Gamepads and keyboard are not available on Android/iOS.</small></p>
<h2 id="features">Features</h2>
<dl class="row">
<dt class="col-3 text-right">2D Graphics</dt>
<dd class="col-9">Geometry/Color matrix transformation, Various composition modes, Offscreen rendering, Fullscreen, Text rendering, Automatic batches, Automatic texture atlas</dd>
<dt class="col-3 text-right">Input</dt>
<dd class="col-9">Mouse, Keyboard, Gamepads, Touches</dd>
<dt class="col-3 text-right">Audio</dt>
<dd class="col-9">Ogg/Vorbis, MP3, WAV, PCM</dd>
</dl>
<h2 id="examples">Examples</h2>
<h3>Games</h3>
<div class="row">
{{range .GamesExamples -}}
<div class="col-3">
<a href="./examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail"></a>
</div>
{{- end}}
</div>
<h3>Graphics</h3>
<div class="row">
{{range .GraphicsExamples -}}
<div class="col-3">
<a href="./examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail"></a>
</div>
{{- end}}
</div>
<h3>Input</h3>
<div class="row">
{{range .InputExamples -}}
<div class="col-3">
<a href="./examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail"></a>
</div>
{{- end}}
</div>
<h3>Audio</h3>
<div class="row">
{{range .AudioExamples -}}
<div class="col-3">
<a href="./examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail"></a>
</div>
{{- end}}
</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</h3>
<div class="card"><pre class="card-body"><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></div>
<p>Note that you need to add <code>-tags=example</code> to run examples.</p>
<h2 id="projects-with-ebiten">Projects with Ebiten</h2>
<div class="row">
<div class="col-3">
<a href="https://github.com/hajimehoshi/go-inovation"><img src="images/projects/inovation.png" width="1024" height="500" alt="Inovation 2007" class="img-thumbnail"></a>
</div>
<div class="col-3">
<a href="http://blockbros.net/tsugunai/"><img src="images/projects/clock_of_atonement.png" width="480" height="480" alt="Clock of Atonement" class="img-thumbnail"></a>
</div>
<div class="col-3">
<a href="http://blockbros.net/bluebird/"><img src="images/projects/bluebird_of_happiness.png" width="540" height="540" alt="Bluebird of Happiness" class="img-thumbnail"></a>
</div>
</div>
<p><a href="https://github.com/hajimehoshi/ebiten/wiki/Works">Find more nice works with Ebiten!</a></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>
<div class="card"><pre class="card-body"><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></div>
<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>{{.Copyright}}</p>
<p>Code is licensed under <a href="https://github.com/hajimehoshi/ebiten/blob/master/LICENSE">the 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>