{{comment .License}}
v{{.StableVersion}}
|
{{if eq .Name "blocks"}}
Click to play! |
{{else}}
{{end}} |
:; brew install glew
:; brew install glfw3 # or homebrew/versions/glfw3
:; go get github.com/hajimehoshi/ebiten
If you want to run your game on a web browser, execute this:
:; go get github.com/gopherjs/gopherjs
:; go get github.com/gopherjs/webgl
:; cd $GOHOME/src/github.com/hajimehoshi/ebiten/example
:; go run rotate/main.go
If you can the example screens above, Ebiten is working on your browser! Each example above works as an independent html in an iframe. If you want to execute the examples apart from this site, execute this:
:; go run $GOPATH/src/github.com/hajimehoshi/ebiten/example/server/main.go
Then, open localhost:8000
on your browser.
localhost:8000/?EXAMPLE_NAME
shows other examples (e.g. localhost:8000/?rotate
).
Of cource, you can execute gopherjs yourself. Please see GopherJS site for more detail.
Compile your game with GopherJS:
:; gopherjs build -o yourgame.js path/to/yourgame
Then, open the below HTML on your HTTP server:
<!DOCTYPE html>
<script src="yourgame.js"></script>
{{.License}}
The original photograph of Go gophers by Chris Nokleberg is licensed under the Creative Commons 3.0 Attributions license.