mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
Simplify readme
This commit is contained in:
parent
c71f55a7a7
commit
cf5bf94d47
72
readme.md
72
readme.md
@ -15,76 +15,10 @@
|
|||||||
* 2D Graphics
|
* 2D Graphics
|
||||||
* Input (Mouse, Keyboard)
|
* Input (Mouse, Keyboard)
|
||||||
|
|
||||||
## Example
|
## Documentation
|
||||||
|
|
||||||
* example/blocks - Puzzle game you know
|
http://hajimehoshi.github.io/ebiten/
|
||||||
* example/hue - Changes the hue of an image
|
|
||||||
* example/mosaic - Mosaics an image
|
|
||||||
* example/perspective - See an image in a perspective view
|
|
||||||
* example/rotate - Rotates an image
|
|
||||||
* etc.
|
|
||||||
|
|
||||||
## Install on Mac OS X
|
|
||||||
|
|
||||||
```
|
|
||||||
:; brew install glew
|
|
||||||
:; brew install glfw3 # or homebrew/versions/glfw3
|
|
||||||
:; go get -u github.com/hajimehoshi/ebiten
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to use GopherJS, execute this:
|
|
||||||
|
|
||||||
```
|
|
||||||
:; go get -u -tag=js github.com/hajimehoshi/ebiten
|
|
||||||
```
|
|
||||||
|
|
||||||
## Execute the example
|
|
||||||
|
|
||||||
```
|
|
||||||
:; cd $GOPATH/src/github.com/hajimehoshi/ebiten/example
|
|
||||||
:; go run blocks/main.go
|
|
||||||
```
|
|
||||||
|
|
||||||
## Execute the example on a web browser
|
|
||||||
|
|
||||||
```
|
|
||||||
:; go get github.com/gopherjs/gopherjs
|
|
||||||
:; 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``).
|
|
||||||
|
|
||||||
## Run your game on a web browser
|
|
||||||
|
|
||||||
Compile your game with GopherJS:
|
|
||||||
|
|
||||||
```
|
|
||||||
:; go get github.com/gopherjs/gopherjs
|
|
||||||
:; gopherjs build -o yourgame.js path/to/yourgame
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, open the below HTML on your HTTP server:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<script src="yourgame.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Benchmark the example
|
|
||||||
|
|
||||||
```
|
|
||||||
:; cd $GOPATH/src/github.com/hajimehoshi/ebiten/example
|
|
||||||
:; go build -o=example blocks/main.go
|
|
||||||
:; ./example -cpuprofile=cpu.out
|
|
||||||
:; go tool pprof ./example cpu.out
|
|
||||||
```
|
|
||||||
|
|
||||||
## Versioning
|
|
||||||
|
|
||||||
* We obey [Semantic Versioning](http://semver.org/) basically.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
See license.txt.
|
Ebiten is licensed under Apache license version 2.0. See license.txt.
|
||||||
|
Loading…
Reference in New Issue
Block a user