Rodolfo's Website

4096 Game

Last project update June 08, 2019
Published on December 22, 2025
Status archived
Author: Rodolfo Matta

The 4096 Game is a version of the famous 2048 video game that I built following Emanuele Feronato’s “HTML5 Cross Platform Game Development Using Phaser 3” book. The project uses the Phaser 3 framework for 2D video games and runs entirely in the browser (HTML, CSS, and JS). By that time, I was already familiar with building simple native apps with Apache Cordova and some Electron; I just had to learn how to make more complex ones with web technologies, and I could then port them to native apps using the Apache Cordova framework. From this project, I was trying to learn how to develop complete software, more than apps that achieve a single goal very simply.

Back then, although I was gaining a good understanding of the development process (e.g., requirements, design, production), I had a vague idea of software architecture and its role in the big picture. Of course, the book is not about those topics, but the step-by-step nature of it felt like a journey through a developer’s mind as they tackle a big project. The process did teach me some things:

  • Build on one small feature at a time (iterations and minor improvements).
  • Refactoring is not only ok but desired in the development process.

There are many ways to develop an application. Nowadays, I feel this journey taught me more of an informal, iterative development methodology, with the intent of reaching a working solution at the end. I loosely followed that approach in later informal projects.

A strategy I kept from this project, and I have re-learned it recently, is to build the functions that the software needs; don’t over-optimize from the start. That is a concept I also grasp from “Clean Architecture: A Craftsman’s Guide to Software Structure and Design” by Robert Martin. Have two or three instances of a functionality you need in the code before creating a class or function that you can reuse. Otherwise, you may end up writing many functions for a simple task; of course, this is not a hard rule, but a guide. Ultimately, it is better to follow the critical mind of a good engineer.

The game still runs on modern browsers. Wanna give it a try?