The Joys of Alternate Control Methods
This is a repost from the devblog here
Currently Recharged’s only control scheme was with a keyboard. While this was fine at first, the game’s needs have evolved since then.
Firstly, having just keyboard input meant porting to mobile (Android and iOS) would be impossible. Someone playing on a phone can’t use a keyboard to play. Enter the on-screen controller. Right now it’s a simple quad-directional d-pad but it get’s the job done. Here’s what it currently looks like (Looks will definitely change in final versions)

(Ignore the debug lines around the player and batteries)
The on-screen controller wasn’t too hard to implement, it just checks if any of the buttons have been hit and moves the player accordingly. With this it means that porting the game to mobile is just about complete.
I also wanted to give the game support for controllers. It wasn’t necessarily needed but it was just something I wanted to add.
Adding support proved a bit harder than expected, seeing as I’ve never used LibGDX’s Controller library before. Unfortunately LibGDX doesn’t support the Xbox controller (the first controller I’ve added support for) out of the box, luckily the internet came to the rescue. I was able to come across this thread which contained the Xbox 360 controller mappings (The Xbox One and 360 controllers have the same mappings on PC). Adding those into a class allowed me the ability to easily access any of the controller’s buttons. After that it was a simple matter of polling which button (or analog stick) was hit and perform the appropriate action.
As of now the game now has keyboard/mouse, controller, and touchscreen controls. Right now the only supported controllers are the Xbox 360 controller and Xbox One controller (as I mentioned before they have the same key mappings). I’m hoping to add Playstation controller support if I can get my hands on one.