Sure, here is a simple game that meets your requirements. Please note that the code provided is a basic template and you can customize it further as per your requirements.
This code sets up a basic game environment where you control a player represented by a blue rectangle at the bottom of the screen. The game container uses touch events to move the player horizontally based on your gestures. You can further enhance the game by adding battle droids as enemies and implementing the shooting mechanism with a gun. Remember to add additional logic and styling as per your game requirements.