pixel
pixel copied to clipboard
Mobile (Android) support
Hi,
there will be any mobile (Android at least) support?
I tryed to execute "gomobile install github.com/my/awesome/game" with the code similar to the one below :
...
func main() {
app.Main(func(a app.App) {
for e := range a.Events() {
switch e := a.Filter(e).(type) {
case lifecycle.Event:
...
case size.Event:
...
case paint.Event:
pixelgl.Run(myGame.Run) // Where myGame.Run executes the pixelgl game and draws stuff with "window, err := pixelgl.NewWindow(cfg)" object
case touch.Event:
...
}
}
})
}
...
This generates the following error:
` gomobile: go build -buildmode=c-shared -o /var/folders/sv/v711qrdx14vbpq03112_llx40000gn/T/gomobile-work-227749453/lib/armeabi-v7a/libmobile.so github.com/my/awesome/game/src/game/mobile failed: exit status 2 # github.com/my/awesome/game/vendor/github.com/go-gl/glfw/v3.2/glfw In file included from vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4: In file included from ./glfw/src/context.c:28: In file included from ./glfw/src/internal.h:169: ./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found #include <X11/Xlib.h> ^~~~~~~~~~~~ 1 error generated. # github.com/my/awesome/game/vendor/github.com/go-gl/gl/v3.3-core/gl vendor/github.com/go-gl/gl/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found #include <GL/glx.h> ^~~~~~~~~~ 1 error generated.
` At this moment I guess I need xquarz in order to avoid this problem.
Anyhow, I'd like to know what I need to do in order to run my game on android (or iOS).
Hi! Currently, there is no Android or iOS support, Pixel is desktop only. The support may come one day, but I can't guarantee. If you want a game library that already has mobile support I can recommend Ebiten.
@faiface This feature will put PixelGL way ahead of every other library. I love Pixel :)