darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
https://comfyengine.org
Apache License 2.0
678 stars 28 forks source link

Support for mobile #82

Open opensourcegeek opened 7 months ago

opensourcegeek commented 7 months ago

I'm just playing with examples at the moment and I'm enjoying it. Thanks for your efforts in getting it to where it is.

I'm just wondering if you'd end up supporting mobile in the future, I did see the other issue you've closed for Android support. None of the engines do a great job at supporting mobile, including macroquad. If comfy can ease the game dev for mobile platforms that'd be amazing.

darthdeus commented 6 months ago

I'm not opposed to it, but personally I don't create mobile games, and have no intention of doing so in the near future, so it's not likely I'd get around to doing it myself. But if someone else who's working on a mobile game wants to contribute support for their mobile platform I'm happy to take it in, and we can find a good way of integrating this with the rest of the engine.

I'd expect the main problematic part being input handling, since we'd probably want something higher level than just exposing the multitouch events. AFAIK winit already provides all the necessary low level stuff, and wgpu does work on mobile, so unless there is some other dependency we have that prevents compiling for the right platforms things might "just work".

But again, I have more than enough other stuff to work on. I'm happy to help the person who wants to implement this, but unless someone wants to pick up an Android/iOS phone and do the testing & figuring out bits on their own it's likely not going to happen any time soon.

If someone does want to start with this, I'd suggest maybe taking one of the winit/wgpu demos and building them for their mobile platform of choice, figuring out what input events they get and thinking about it a bit, and at that point probably decide how much there'd be actually needed. If that works and they're not put off by the necessary setup, try compiling one of the Comfy examples, and if it at least runs we can start thinking about how to do the input handling and other stuff.

Sigmoidle commented 4 months ago

This pull request should provide a starting-ground for touch/multi-touch support: https://github.com/darthdeus/comfy/pull/93