Sure! Here's an example of a simple game called "Farlight 87" implemented in a single HTML file using JavaScript. This game assumes smartphone operation and uses pictograms for a better user experience. Remember to enclose the code within script tags in your HTML file.
This simple game sets up a canvas element where a blue square (player) can be moved on a touch-enabled device. The objective is to collide with the red squares (targets) to increase the score. Player movement is determined by touch events. The game loop continuously updates and renders the game elements, and the score is displayed at the top left corner of the canvas.