Case study · Tuwaiq Academy
Piece By Piece
A Breakout-style game in plain JavaScript, with sign-up, a leaderboard and a Saudi National Day edition.
- My role
- Design and code
- Team
- Solo
- Timeline
- Sep 2024, 5 days
- Context
- Tuwaiq Academy
- Platform
- Web game on GitHub Pages

01 Overview
Piece By Piece is a small games site. Its first game is Breakout: move the paddle to bounce the ball and break the bricks. Players register to save their scores to a leaderboard, and a National Day edition themes the game for Saudi National Day.
02 Problem
A Tuwaiq Academy exercise in plain JavaScript: no framework, so the game loop, the collisions and the state are all written by hand.
03 My role
- GameWrote the game as classes: Ball, Paddle, Brick, BrickWall and Settings
- PagesBuilt the home, game, register and about pages
- ScoresSaved players and scores through MockAPI
- DesignDesigned the logo and the National Day theme
- Game
JavaScript
HTML
CSS
- Build and data
ViteMockAPI
- Hosting
GitHub Pages
04 Key decisions
A class per game object
What we chose
Plain JavaScript classes for the ball, the paddle, the bricks, the wall and the settings
Why
Each object owns its position and drawing, so the game loop stays short.
Trade-off
Collisions and the game state are all written by hand.
Leaderboard on MockAPI
What we chose
MockAPI for players and their scores
Why
A shared leaderboard without writing a server.
Trade-off
The data is public, so anyone with the URL could edit a score.
05 Result
Live on GitHub Pages since September 2024, in time for Saudi National Day 94.

What I learned
Writing a game without a framework taught me object-oriented programming, the physics of a bouncing ball and how to shape the game experience.
With thanks to
Next project: Messgestix
A two-phone chat demo in React: name two users, then send messages and emoji between the screens.

Questions