My roleTeam member responsible for UI and gameplay modules, battle scenes and platform adaptation

StageCompleted course project with Windows and Android versions

Tools & methodsC++ / Cocos2d-x / MVC / Android

Village interface from the Clash of Clans course project
Village interface from the Clash of Clans course project

From village building to a battle

I built this Clash of Clans gameplay recreation with two classmates for our Programming Paradigms course. Using C++ and Cocos2d-x, we implemented village building, resource management, troop training and upgrades, and connected them to battles and replays.

Players collect resources, purchase and place buildings, and train troops before entering a randomly generated opponent village. A battle progresses through scouting, troop deployment, automated combat and a results screen. The project also includes defenses, traps, flying units, saved games and battle replays, with versions for Windows and Android.

How the systems fit together

The project follows a Model–View–Controller structure. Village state and building and troop configurations hold data; scenes and UI layers handle presentation and input; controllers coordinate construction, map interactions and battle progression. Separate modules manage resources, animation, persistence and replays.

These parts need a consistent view of state: troops shown in the training interface must be available in battle, upgrades must feed into troop attributes, and purchases must respect resource and construction conditions. My work included both the interfaces and their connections to this data and behavior.

My contribution

Shop, training camp and laboratory

I developed the shop, training camp and laboratory modules. The shop groups purchasable items and connects purchases to construction; the training camp presents troop information, training actions and army capacity; the laboratory provides troop upgrades.

I also worked on troop information and upgrade configurations. These configurations connect the information used by training, upgrades and combat, while each interface retains its own interaction responsibilities.

Training interface showing the army, available troops and capacity
Training interface showing the army, available troops and capacity

Battle maps, scenes and health indicators

I implemented random battle-map generation, assembled the battle scene and developed the health-bar component. This brought the map, buildings and units into a playable scene with visible feedback about unit state. I also developed debugging helpers and a developer interface for integration work.

One teammate mainly handled the overall architecture, village resources, construction, animation, persistence and replays. The other mainly handled battle progression, pathfinding, defenses and traps. My map, scene and UI modules worked with their systems to form the game loop.

Android port and screen adaptation

I handled the Android port, bringing the desktop project to a phone build and adapting it to different screen sizes and aspect ratios. Later iterations addressed black borders on Android and wide-screen presentation so that the shared game content could work on both platforms.

The game running on an Android device
The game running on an Android device

Collaboration and result

We used Git feature branches to develop the battle scene, training camp, laboratory and Android port before integrating them into the team project. I also participated in later code cleanup and debugging.

This project gave me practical experience connecting multiple interfaces to shared state and gameplay, and adapting a desktop application to phone screens. The team repository includes the source, feature descriptions, additional screenshots and release downloads.

This is an educational gameplay recreation. The Clash of Clans name and original game artwork belong to Supercell.

Repository ↗