Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile (Android) support #179

Open
alejandro-a opened this issue Apr 14, 2019 · 2 comments
Open

Mobile (Android) support #179

alejandro-a opened this issue Apr 14, 2019 · 2 comments
Labels

Comments

@alejandro-a
Copy link

alejandro-a commented Apr 14, 2019

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).

@faiface
Copy link
Owner

faiface commented Apr 14, 2019

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.

@steelx
Copy link

steelx commented Jan 5, 2020

@faiface This feature will put PixelGL way ahead of every other library. I love Pixel :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants