Search code examples
android

"drag control" for Android games


I am not very familiar with android development so maybe question will be not really about development process.

I noticed control in a bunch of different games where i can drag circle and in this way unit will move.

This is default control from some library or every developer just writes something similar?

Any examples or tutorials where i can get it?

enter image description here


Solution

  • This is called an Analogue controller and most game development frameworks like AndEngine and LibGDX offer it. Both such Engines are open source, and the code for this component in the AndEngine framework can be found here.

    However, you might want to consider using the game engine itself in your app, instead of picking up bits of it and writing your own.