Ashura’s Revengence (2025)
- Vichakshana Arangala
- Jun 27, 2025
- 3 min read

Ashura’s Revengence is a 2D Shooter I made in SFML in in a span of a few weeks.The goal of this project was to teach myself complex collision checking and procedural generation algorithms. As such I’ve used Wave Function Collapse to randomly generate backgrounds, and a Quadtree to optimize collision checking.
WASD: Movement
Space: Shoot
Q: Toggle Quadtree visibility
Introduction
Ashura’s Revengence was a fun learning experience for me. I started by creating my own ECS, following Dave Churchill’s COMP 4300-Game Programming lectures.
I was fascinated by the theory of Wave Function Collapse, as it is derived from quantum mechanics. I did a lot of research on the theory behind Wave Function Collapse and it’s implementation before I started implementing my own version of WFC.
When it came to implementing collision detection, I opted to implement Quadtrees for spatial partitioning as they seemed to be the optimal way to handle collisions checking on a game of this nature.
Working on a project by myself was a fun and educational experience, as I was able to fully focus on the development process and learn a lot during the process. However, I prefer working with a team as it allows for a more dynamic and collaborative work environment, where I can bounce ideas off of others and learn from their diverse perspectives and expertise.
I took my own approach to wave function collapse. Instead of standard valid neighbours that is common in the tile model, I gave each tile socket IDs. I use the standard 14 tiles from the circuit model, then I implemented a function to create rotational values for each tile (The rotation angles and the new rules upon rotation), resulting in 50 different tiles. Once entropy was calculated, an appropriate tile was collapsed onto that position.
The following are few examples of the kind of patterns possible through Wave Function Collapse, once the rules are properly establish.


I set about implementing Quadtrees following the information on the Wikipedia page. The information on the page comes with a pseudocode, which sped up the implementation process. While the Quadtrees functioned as intended, I feel that there is room for improvement.
Dave Churchill’s lectures were instrumental in setting up the ECS, and the ECS lies at the heart of the game. This was my first attempt at settin up and ECS. Understanding ECS and building my own from scratch gave me an understanding of Game Engines as a whole, and increased my understanding of Unreal and Unity. I learned a lot of transferable skills by setting up the ECS.
What I learned
This was my first time working on a game on my own. While it is always nice to be part of a team, and have designers lay down many of the ground rules, I was able to take full creative control in this project. This project placed a huge emphasis on optimisation, something which personally interests me. It also gave me an understanding of wave function collapse, and I hope to experiment with this formula and experiment with this in the future.
Working on this project helped me understand why game engines function the way they do and why certain approaches are preferred over others. As a result, my code became more compartmentalised and modular, allowing for far easier scalability.

Future Plans...
From a gameplay standpoint, I feel that there is much to be achieved in this project alone, specifically in implementing the generated background into the gameplay, instead of it being mere window dressing. My current setup allows for 8000 simultaneous game objects on screen, while maintaining 60 FPS. At around 16000 game objects, the FPS drops to 25 FPS, and single digits at around 30000. I have seen implementations where better performance can be achieved, and I intend to pursue such an implementation and update this project accordingly.
Play The Game or View the Github Repo.
Comments