Sure! Here's an example of a simple fighter game implemented as a single HTML file using JavaScript:
Fighter Game
This code sets up a simple fighter game where the player can control a square fighter using touch events on a smartphone. The fighter's position is updated based on the touch input and is constrained within the boundaries of the canvas. The game loop runs at 60 frames per second, redrawing the fighter's position and handling touch input.