Sure, here's an example of a simple cube game implemented as a single HTML file using JavaScript:
This game simulates controlling a cube using left and right arrow keys on a smartphone or computer. The cube can move left and right within the window boundaries. You can customize the game further, such as adding platforms, enemies, or collecting items, to make it more similar to Super Mario Bros 2 if desired.