faiface / pixel
- четверг, 27 апреля 2017 г. в 03:12:22
Go
A hand-crafted 2D game library in Go
A hand-crafted 2D game library in Go. Take a look into the features to see what it can do.
go get github.com/faiface/pixel
See requirements for the list of libraries necessary for compilation.
The Wiki of this repo contains an extensive tutorial covering several topics of Pixel. Here's the content of the tutorial parts so far:
The examples directory contains a few examples demonstrating Pixel's functionality.
To run an example, navigate to it's directory, then go run
the main.go
file. For example:
$ cd examples/platformer
$ go run main.go
Here are some screenshots from the examples!
Lights | Platformer |
---|---|
Smoke | Xor |
---|---|
Here's the list of the main features in Pixel. Although Pixel is still under heavy development, there should be no major breakage in the API. This is not a 100% guarantee, though.
sprite.Draw(window)
+
and -
operators... how?window.Bounds().Center()
"image"
package for loading pictures"time"
package for measuring delta time and FPS"image/color"
for colors, or use Pixel's own color.Color
format, which supports easy
multiplication and a few more featuresfloat64
throughout the library, compatible with "math"
packageClose
or Dispose
methodsPixel is in development and still missing few critical features. Here're the most critical ones.
Implementing these features will get us to the 1.0 release. Contribute, so that it's as soon as possible!
PixelGL backend uses OpenGL to render graphics. Because of that, OpenGL development libraries are needed for compilation. The dependencies are same as for GLFW.
xcode-select --install
) for required
headers and libraries.libgl1-mesa-dev
and xorg-dev
packages.libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel
packages.Pixel is in, let's say, mid-stage of development. Many of the important features are here, some are missing. That's why contributions are very important and welcome! All alone, I will be able to finish the library, but it'll take a lot of time. With your help, it'll take much less. I encourage everyone to contribute, even with just an idea. Especially welcome are issues and pull requests.
However, I won't accept everything. Pixel is being developed with thought and care. Each component was designed and re-designed multiple times. Code and API quality is very important here. API is focused on simplicity and expressiveness.
When contributing, keep these goals in mind. It doesn't mean that I'll only accept perfect pull requests. It just means that I might not like your idea. Or that your pull requests could need some rewriting. That's perfectly fine, don't let it put you off. In the end, we'll just end up with a better result.
Don't start working on a pull request before submiting an issue or commenting on one. Proposals also take the form of issues.
For any kind of discussion, feel free to use our Gitter community.