ThreeJam example games
Seven 2D games made with ThreeJam, a game engine on Three.js where your coding agent proves what its game does. Each one is a single HTML file from threejam export.
These games need a keyboard. On a phone or tablet without one, only Asteroids plays: tap to start, then hold a finger where you want to shoot.
-
Pong: two players at one keyboard, first to 7 points.
W and S move the left paddle, Up and Down the right; Space starts. Code:
games/pong -
Breakout: clear every brick with three lives.
Left and Right, or A and D, move the paddle; Space serves. Code:
games/breakout -
Snake: eat apples to grow, and don't hit a wall or yourself.
An arrow key starts the snake, and the arrow keys turn it; Space plays again. Code:
games/snake -
Flappy: flap through the gaps between the pipes.
Space starts a run, and each press flaps. Code:
games/flappy -
Invaders: clear the wave before the invaders reach the bottom.
Left and Right move the cannon; Space starts and fires, and holding it keeps firing. Code:
games/invaders -
Tetris: fill rows to clear them, until a new piece has no room.
Left and Right move the piece, Up rotates it, and Down drops it faster; Space starts. Code:
games/tetris -
Asteroids: shoot the rocks, which split when hit, and don't let them hit you.
Left and Right turn, Up thrusts, and Space fires; or hold the mouse to aim and fire, and the right button to thrust. Space or a click starts. Code:
games/asteroids