ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
333 stars 90 forks source link

Creating virtual joysticks. #326

Closed ryzom-pipeline closed 4 years ago

ryzom-pipeline commented 6 years ago

Original report by Krzysztof Klinikowski (Bitbucket: kkszysiu, GitHub: kkszysiu).


Hey guys,

In my spare time I'm working a bit on Ryzom port to Android.

Thanks to OpenGL 3 branch I was able to rewrite all GL3 parts to EGL + GLES31. It seems to be working just fine.

I also handled the input and window handles for Android together with implementation of NativeActivity main loop.

Thanks to that I can easily log in to the game and have around 60 fps on my OnePlus3 on 1080x1920 resolution, which is pretty nice (In comparision to OpenGL ES 1 implementation when I had like 8 fps, seriously OpenGL 2 is not even performant on my GTX970 on Linux :P).

So now I need to prepare mobile inputs.

I'm thinking about little redesign of widgets. Making a chat as an icon, which would be opened fullscreen. And basically all widgets would be implemented fullscreen.

But as a start I want to prepare two joysticks on left and right screen edges - one to move the character around and second one to look around by the camera.

Do you have any ideas how I can achieve that? Would current widgets implementation could be used to create simple "joystick" widgets and use them to control character?

Thanks for any advices!

ryzom-pipeline commented 6 years ago

Original comment by Krzysztof Klinikowski (Bitbucket: kkszysiu, GitHub: kkszysiu).


BTW. Here is the sneakpeak: https://www.youtube.com/watch?v=YZeaCuTX8fU

ryzom-pipeline commented 6 years ago

Original comment by Jan Boon (Bitbucket: [Jan Boon](https://bitbucket.org/Jan Boon), ).


You may want to do one joystick for moving, and swiping the visual view for rotating the camera. Try out some other mobile MMOs to get a feel for control systems

I think it's doable with the current UI system, but not sure about handling multi-touch

ryzom-pipeline commented 6 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Wow ! That's so stunning :) Great job !

I wonder if the game will be more playable by implementing a simple "point and click" approach instead of using virtual gamepad. There already have some methods to manage the conversion of screen coordinates to 3D coordinates. For the path finding, I suppose that a simple line should be enough, but I suspect there will be more to implement to send intermediate coordinates to server.

ryzom-pipeline commented 6 years ago

Original comment by Krzysztof Klinikowski (Bitbucket: kkszysiu, GitHub: kkszysiu).


This weekend I want to clean up the code and open source everything I have now.

Then I want to add support for bluetooth connected mouse/keyboard and maybe data downloader. Because as for now I need to manually copy data from PC to Android sdcard... As a next phase I would love to implement simple widget to draw virtual joystick and move the character by using that.

The "point and click" approach sounds awesome, but I don't think I don't have enough knowledge about codebase to implement it and it sounds a bit complicated in comparision to other ideas (but I agree that is a cool idea!) :)

Thanks guys! I'm really appreciating your help!

ryzom-pipeline commented 6 years ago

Original comment by Dan V (Bitbucket: [Dan V](https://bitbucket.org/Dan V), ).


I am very interested in this port of the code.

I typically am on the Discord chat I made for Ryzom.