Sure! Here's an example of a simple 2D platformer game about a dog collecting treats. The game is implemented as a single HTML file, containing JavaScript code enclosed in script tags:
Dog Treats Game
To play the game, you can save the above code into a file with a .html extension and open it in a web browser on your smartphone. The game will display a canvas where you can control the dog using the left and right arrow keys. The objective is to collect as many treats as possible by colliding with them. The score will be displayed on the top left corner of the canvas. Have fun collecting treats with the dog!