Here's an example of a simple game implemented as a single HTML file, using JavaScript and enclosed in script tags. This game can be played on a smartphone and uses pictograms for visual representation:
To play the game on a smartphone, open this HTML file in a web browser or run it on a web server. You can move the player (rocket icon) left or right by swiping on the canvas. Dodge the enemies (explosion icon) and touch the yellow line (checkered flag icon) to win. If you touch an enemy, you lose. The game will display alerts for game over and winning conditions.