A real-time OpenGL action scene built in C++, combining gameplay systems with stylised rendering techniques including toon shading, shadow mapping, and post-processing effects.
This project is a small-scale arena game built using OpenGL, extending a basic coursework scene into a fully interactive gameplay experience. The focus was to integrate gameplay systems such as combat, AI, and resource management with a multi-pass rendering pipeline, combining stylised shading techniques with real-time effects. The final result demonstrates how rendering techniques can support gameplay presentation rather than existing purely as isolated visual features.
Implemented a set of gameplay systems including player movement, combat, and resource management. The player can move freely within the arena, jump, sprint, and attack using fireball projectiles. Fireballs consume mana, introducing a resource constraint that influences gameplay decisions.
Developed a projectile-based combat system where fireballs are spawned, updated, and interact with enemies. Particle effects are used to enhance visual feedback, including fire trails and explosion effects upon impact.
Built a multi-stage rendering pipeline using OpenGL:
This separation allows multiple visual effects to be layered while maintaining a structured rendering flow.
Implemented a toon shading model by quantising lighting into discrete bands, creating a stylised, non-photorealistic look. Shadow information is integrated into the toon shader, allowing the scene to maintain depth while preserving the stylised aesthetic.
Shadows are generated using a depth pass rendered from the light’s perspective. Percentage-closer filtering (PCF) is applied to smooth shadow edges and reduce aliasing artefacts.
A post-processing pipeline applies multiple screen-space effects:
These effects are combined in a final composition pass before presenting the frame.
Implemented a HUD system displaying gameplay information including:
The HUD is rendered as a screen overlay after the main scene rendering pass.
The project is structured to separate gameplay logic, rendering, and UI systems. This modular approach allows features such as rendering effects and gameplay mechanics to be developed and modified independently.
One of the main challenges was integrating multiple rendering techniques into a single pipeline without conflicts, particularly when combining shadow mapping, toon shading, and post-processing. Managing OpenGL state and debugging shader interactions required careful sequencing of rendering passes. Another challenge was balancing gameplay systems with rendering performance, ensuring that visual effects did not negatively impact responsiveness.
This project significantly improved my understanding of:
It also reinforced the importance of structuring projects to support both visual and gameplay features effectively.