Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

It's finished. And it works rather well on a galaxy. And on my cheap walmart go edition tablet it also works rather well.





I put the rotation control on the left and directionals on the right, to me it feels better that way.
This controller is now also part of my open source tabageos library, the source code for this demo is the best place as of now,
to see how to use it in a real life example. 

The middle of the circle is the controller rotation point, and the circle is in a html div that gets touched,
and that div is inside of a whole controller div that gets resized to the screen, and therefore all divs inside it automatically resize.
Touch move events are captured and then the points translated to the game size points,
so i'm able to calculate things from my graphics editor as if the game is always the width and height made in the graphics.

Then its basic geometry,  Math.atan2(), to get the rotation  in the circle, then that rotation value is applied to the players ship.