Before you start
A coding agent, LÖVE and Lua installed using their official instructions, and a practice folder.
Why this lesson exists
The original Pong game in LÖVE and Lua added menus and sound only after a full match worked, then power-ups one at a time. This lab stops at a restartable match with deterministic scoring, because more effects will not fix the physics.
Do the exercise
Set your boundary
Start with paddles, a ball, movement, collision, scoring and a serve state. Leave power-ups and particles until a match works.
Draw paddles and a ball
Draw two paddles and a ball.
Move with delta time
Update positions using delta time.
Handle collisions
Handle wall and paddle collisions.
Add scoring and a serve
Add scoring and a serve state. Each point counts exactly once.
Make restart reset score and ball state
Make restart reset score and ball state, so a new match starts clean.
Next sessions, not today
- AI opponent Add one predictable AI opponent.
- Menus and sound Add menus and sound only after a full match works.
- Power-ups Add power-ups one at a time with expiration rules.
A prompt to adapt
Replace the bracketed parts with your own details.
Help me build Pong in LÖVE and Lua in a new practice folder, without giving me the whole solution at once. First version only: paddles, a ball, movement, collision, scoring and a serve state, until one match works. No AI opponent, menus, sound, power-ups or particles yet. List the setup commands before changing any files. Then work in five checkpoints; at each, explain the math, give a small code target and a manual test before continuing: 1. Two paddles and a ball. 2. Positions updated using delta time. 3. Wall and paddle collisions. 4. Scoring and a serve state, with each point counted exactly once. 5. A restart that resets score and ball state. Paddle keys: [keys for each player]. Winning score: [a number].
Once it runs, paste your code and ask:
Review this Pong collision logic for tunneling, repeated collisions, frame-rate dependence, incorrect bounce angles and runaway ball speed. Recommend deterministic tests.
Run this experiment
Test a wall bounce, paddle bounce, missed ball, score increase and reset. Try a slow frame rate to look for tunneling and speed changes.
Check your result
Use evidence from your output. A confident explanation from the AI is not enough.
If it isn’t working
If the ball passes through a paddle, inspect collision timing and step size. More visual effects will not repair the physics.
Optional. Progress stays in this browser.
Where this came from
Public project repository ↗. The practice lesson is an adaptation, not a verbatim transcript. About the sources.
Prepared September 2026. Tools and interfaces change; use current official setup instructions. Session lengths are estimates.
patrickz