https://github.com/ryosama/go-sprite
A simple library to animate sprite in Golang with Ebiten 2D engine
https://github.com/ryosama/go-sprite
2d-game-engine game go golang lib library sprite
Last synced: 10 months ago
JSON representation
A simple library to animate sprite in Golang with Ebiten 2D engine
- Host: GitHub
- URL: https://github.com/ryosama/go-sprite
- Owner: ryosama
- Created: 2018-08-30T10:23:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-15T13:17:04.000Z (over 5 years ago)
- Last Synced: 2024-06-19T23:13:30.909Z (about 2 years ago)
- Topics: 2d-game-engine, game, go, golang, lib, library, sprite
- Language: Go
- Size: 48.8 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Go-sprite
=======
A simple library for playing with sprites and animations
It use the [Ebiten](https://github.com/hajimehoshi/ebiten) library for the 2D graphics engine
Install
=======
```bash
$ go get -u github.com/hajimehoshi/ebiten
$ go get -u github.com/ryosama/go-sprite
```
Screenshot
===========

Quick Start
===========
```Go
import "github.com/ryosama/go-sprite"
mySprite = sprite.NewSprite()
mySprite.AddAnimation("walk-right", "walk_right.png", 700, 6, ebiten.FilterDefault)
mySprite.Position(WINDOW_WIDTH/2, WINDOW_HEIGHT/2)
mySprite.CurrentAnimation = "walk-right"
mySprite.Speed = 2
mySprite.Start()
```
Documentation
=============
The documentation can be found here : https://godoc.org/github.com/ryosama/go-sprite
Or export with this command
```bash
$ godoc github.com/ryosama/go-sprite
```
TODO
====
- Add a video