mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
253 lines
11 KiB
HTML
253 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
Copyright 2013 Hajime Hoshi
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<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>
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
}
|
|
img.example {
|
|
background-color: #000;
|
|
border-color: #999;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
image-rendering: crisp-edges;
|
|
image-rendering: pixelated;
|
|
}
|
|
pre {
|
|
background: #eee;
|
|
padding: 1em;
|
|
}
|
|
</style>
|
|
<a href="https://github.com/hajimehoshi/ebiten"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
|
|
<h1>Ebiten (海老天)</h1>
|
|
<p>Stable version: v1.4.0-alpha / Development version: v1.4.0-alpha</p>
|
|
<ul>
|
|
<li>A simple SNES-like 2D game library in Go</li>
|
|
<li>Works on
|
|
<ul>
|
|
<li>Web browsers (powered by <a href="http://gopherjs.org/">GopherJS</a>)
|
|
<ul>
|
|
<li>Supported browsers: Chrome and Firefox on desktops</li>
|
|
</ul>
|
|
</li>
|
|
<li>Windows</li>
|
|
<li>Mac OS X</li>
|
|
<li>Linux</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="http://godoc.org/github.com/hajimehoshi/ebiten"><img src="https://godoc.org/github.com/hajimehoshi/ebiten?status.svg" alt="GoDoc Reference"></a></li>
|
|
</ul>
|
|
|
|
<h2>Features</h2>
|
|
<ul>
|
|
<li>2D Graphics</li>
|
|
<li>Input (Mouse, Keyboard, Gamepad)</li>
|
|
<li>Audio (Ogg/Vorbis, WAV, and PCM)</li>
|
|
</ul>
|
|
|
|
<h2>Example</h2>
|
|
<p>
|
|
<a href="examples/alphablending.html"><img src="images/examples/alphablending.png" width="320" height="240" alt="Ebiten example: alphablending" class="example"></a><a href="examples/audio.html"><img src="images/examples/audio.png" width="320" height="240" alt="Ebiten example: audio" class="example"></a><a href="examples/font.html"><img src="images/examples/font.png" width="320" height="240" alt="Ebiten example: font" class="example"></a><a href="examples/hsv.html"><img src="images/examples/hsv.png" width="320" height="240" alt="Ebiten example: hsv" class="example"></a><a href="examples/hue.html"><img src="images/examples/hue.png" width="320" height="240" alt="Ebiten example: hue" class="example"></a><a href="examples/gamepad.html"><img src="images/examples/gamepad.png" width="320" height="240" alt="Ebiten example: gamepad" class="example"></a><a href="examples/keyboard.html"><img src="images/examples/keyboard.png" width="320" height="240" alt="Ebiten example: keyboard" class="example"></a><a href="examples/masking.html"><img src="images/examples/masking.png" width="320" height="240" alt="Ebiten example: masking" class="example"></a><a href="examples/mosaic.html"><img src="images/examples/mosaic.png" width="320" height="240" alt="Ebiten example: mosaic" class="example"></a><a href="examples/noise.html"><img src="images/examples/noise.png" width="320" height="240" alt="Ebiten example: noise" class="example"></a><a href="examples/paint.html"><img src="images/examples/paint.png" width="320" height="240" alt="Ebiten example: paint" class="example"></a><a href="examples/perspective.html"><img src="images/examples/perspective.png" width="320" height="240" alt="Ebiten example: perspective" class="example"></a><a href="examples/piano.html"><img src="images/examples/piano.png" width="320" height="240" alt="Ebiten example: piano" class="example"></a><a href="examples/rotate.html"><img src="images/examples/rotate.png" width="320" height="240" alt="Ebiten example: rotate" class="example"></a><a href="examples/sprites.html"><img src="images/examples/sprites.png" width="320" height="240" alt="Ebiten example: sprites" class="example"></a><a href="examples/blocks.html"><img src="images/examples/blocks.png" width="256" height="240" alt="Ebiten example: blocks" class="example"></a>
|
|
</p>
|
|
|
|
<h2>Install on Mac OS X or Windows</h2>
|
|
<p>Compilation requires a C compiler like GCC to compile third party libaries used by Ebiten. You would need <a href="http://www.mingw.org/">MinGW</a> on Windows, and would need Xcode on Mac OS X.</p>
|
|
<p>Let's get the Ebiten source code and compile it.</p>
|
|
<pre><code>:; go get github.com/hajimehoshi/ebiten</code></pre>
|
|
<p>If you want to run your game on a web browser, execute this:</p>
|
|
<pre><code>:; go get github.com/gopherjs/gopherjs
|
|
:; go get github.com/gopherjs/webgl</code></pre>
|
|
|
|
<h2>Install on Linux</h2>
|
|
<p>Before installing Ebiten, you might need these libraries:</p>
|
|
<ul>
|
|
<li>libglu1-mesa-dev</li>
|
|
<li>libgles2-mesa-dev</li>
|
|
<li>libxrandr-dev</li>
|
|
<li>libxcursor-dev</li>
|
|
<li>libxinerama-dev</li>
|
|
<li>libxi-dev</li>
|
|
</ul>
|
|
<p>Ebiten is tested on Ubuntu Linux x64.</p>
|
|
|
|
<h2>Execute the example</h2>
|
|
<pre><code>:; cd $GOPATH/src/github.com/hajimehoshi/ebiten/examples
|
|
:; go run rotate/main.go</code></pre>
|
|
|
|
<h2>Run your game on a desktop</h2>
|
|
<p>Just execute your Go program. That's it!</p>
|
|
|
|
<h2>Run your game on a web browser</h2>
|
|
<p>Compile your game with <a href="http://gopherjs.org/">GopherJS</a>:</p>
|
|
<pre><code>:; gopherjs build -o yourgame.js path/to/yourgame</code></pre>
|
|
<p>Then, open the below HTML on your HTTP server:</p>
|
|
<pre><code><!DOCTYPE html>
|
|
<script src="yourgame.js"></script></code></pre>
|
|
<p>NOTE: <code>file://</code> URL may not work with Ebiten. Execute your game on a HTTP server.</p>
|
|
|
|
<h2>Apps created with Ebiten</h2>
|
|
<ul>
|
|
<li><a href="https://github.com/peterhellberg/plasma">Plasma</a> by Peter Hellberg</li>
|
|
<li><a href="https://github.com/hajimehoshi/go-inovation">go-inovation</a> by Hajime Hoshi</li>
|
|
<li><a href="https://github.com/martinkirsche/wired-logic">Wired Logic</a> by Martin Kirsche</li>
|
|
<li><a href="https://github.com/DrJosh9000/awakengine">AwakEngine</a> by Josh Deprez</li>
|
|
</ul>
|
|
|
|
<h2>Change Log</h2>
|
|
<h3>2016-05-14</h3>
|
|
<ul>
|
|
<li>v1.3.0 released.
|
|
<ul>
|
|
<li>Fixed some bugs</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2016-04-23</h3>
|
|
<ul>
|
|
<li>v1.3.0-rc1 released.
|
|
<ul>
|
|
<li>Added new platforms
|
|
<ul>
|
|
<li>Windows</li>
|
|
<li>Linux</li>
|
|
</ul>
|
|
</li>
|
|
<li>Graphics
|
|
<ul>
|
|
<li>Added CompositeMode to change composite mode (e.g. masking or additive drawing)</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="https://godoc.org/github.com/hajimehoshi/ebiten/audio">Audio</a>
|
|
<ul>
|
|
<li>Moved from exp/audio to audio: No more experimental package!</li>
|
|
<li>Changed APIs (almost fixed)</li>
|
|
<li>Added <a href="https://godoc.org/github.com/hajimehoshi/ebiten/audio/vorbis">exp/audio/vorbis</a> to decode Ogg/Vorbis stream</li>
|
|
<li>Added <a href="https://godoc.org/github.com/hajimehoshi/ebiten/audio/wav">exp/audio/wav</a> to decode Wav stream</li>
|
|
</ul>
|
|
</li>
|
|
<li>Others
|
|
<ul>
|
|
<li>Made most of functions concurrent-safe</li>
|
|
<li>Bug fix</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2016-02-28</h3>
|
|
<ul>
|
|
<li>v1.2.0 released.
|
|
<ul>
|
|
<li>Fixed some bugs.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2016-02-17</h3>
|
|
<ul>
|
|
<li>v1.2.0-rc1 released.
|
|
<ul>
|
|
<li>Added support for gamepads on desktops and browsers</li>
|
|
<li>Added support for touch events on browsers</li>
|
|
<li>Added new functions for image rendering:
|
|
<ul>
|
|
<li>Image.ReplacePixels</li>
|
|
<li>GeoM.Rotate</li>
|
|
<li>ColorM.RotateHue</li>
|
|
</ul>
|
|
</li>
|
|
<li>Added some experimental packages:
|
|
<ul>
|
|
<li>exp/audio: Play music and sound</li>
|
|
<li>exp/gamepad: Useful functions to configure gamepads</li>
|
|
<li>These packages are experimental and we don't guarantee backward compatibility.</li>
|
|
</ul>
|
|
</li>
|
|
<li>Deprecated some APIs:
|
|
<ul>
|
|
<li>TranslateGeo (Use GeoM's Translate instead)</li>
|
|
<li>ScaleGeo (Use GoeM's Scale instead)</li>
|
|
<li>RotateGeo (Use GoeM's Rotate instead)</li>
|
|
<li>TranslateColor (Use ColorM's Translate instead)</li>
|
|
<li>ScaleColor (Use ColorM's Scale instead)</li>
|
|
<li>RotateHue (Use ColorM's RotateHue instead)</li>
|
|
</ul>
|
|
</li>
|
|
<li>Fixed some bugs</li>
|
|
<li>Performance optimization</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2015-01-25</h3>
|
|
<ul>
|
|
<li>v1.1.0 released.
|
|
<ul>
|
|
<li>Fixed some bugs.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2015-01-10</h3>
|
|
<ul>
|
|
<li>v1.1.0-rc1 released.
|
|
<ul>
|
|
<li>Support for web browsers: Ebiten now includes support for web browsers with GopherJS.</li>
|
|
<li>Some API has changed:
|
|
<ul>
|
|
<li>ImagePart is deprecated. Use ImageParts interface instead.</li>
|
|
<li>ColorM.Element and GeoM.Element's recievers changed from structs to pointers.</li>
|
|
<li>A lot of keyboard keys have been added. KeyMax and MouseButtonMax were removed.</li>
|
|
</ul>
|
|
</li>
|
|
<li>The game is stopped when the window is not active.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2015-01-04</h3>
|
|
<ul>
|
|
<li>v1.0.0 released.
|
|
<ul>
|
|
<li>Nothing has changed from v1.0.0-rc1.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3>2014-12-29</h3>
|
|
<ul>
|
|
<li>v1.0.0-rc1 released.</li>
|
|
</ul>
|
|
|
|
<h2>License</h2>
|
|
<h3>Ebiten</h3>
|
|
<pre>Copyright 2013 Hajime Hoshi
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.</pre>
|
|
<h3>Go Gopher photograph</h3>
|
|
<p><a href="http://blog.golang.org/go-programming-language-turns-two">The original photograph of Go gophers by Chris Nokleberg</a> is licensed under the Creative Commons 3.0 Attributions license.</p>
|
|
|
|
<footer>© 2013 Hajime Hoshi</footer>
|