Sure! Here's an example of a simple spaceship game implemented as a single HTML file with JavaScript:
This game creates a canvas element where the spaceship is drawn as a rectangle. The spaceship can be controlled using the left and right arrow keys. The game loop continuously redraws the spaceship and checks for movement inputs from the player. You can further enhance the game by adding enemies, projectiles, and scoring mechanisms if desired.