Sure, here's an example of a simple game where you can tap to control a ball and avoid obstacles. The game is implemented as a single HTML file and uses JavaScript for the game logic. It is designed to be played on a smartphone.
To play the game, you can copy the above code into a new HTML file (e.g., `game.html`) and open it in a web browser on your smartphone. When you tap the screen, the ball will move up, and your goal is to avoid the obstacles by tapping at the right moment. If the ball collides with an obstacle, the game will end, and you can restart by tapping the "Game Over" alert box.
Please note that the styling and visual assets of the game can be improved based on your specific requirements and preferences.