Inspiration

I wanted to build an intense, arena survival shooter, but rather than relying on pre-built physics nodes or commercial engines, I wanted to understand the architecture from the ground up. The inspiration was twofold: to create a chaotic, high-adrenaline rogue-lite experience, and to prove that a locked 60 FPS is achievable in pure Python by engineering a highly decoupled, highly optimized custom game engine.

What it does

Normie Survival is a finite-grid arena shooter where the horde never stops. You are dropped in with a base weapon, a strict timer, and an AI Director that constantly escalates the threat. As you decimate the swarm, you collect experience gems to augment stats, attach retaliation tech, and expand your arsenal.

Beyond standard survival mechanics, it heavily emphasizes "game feel" in v1.3:

  • Active Dodge: A high-risk tactical dash that grants temporary I-Frames and leaves a fading electrical "Ghost Trail."
  • Hit-Stop Mechanics: The engine intentionally freezes for 80ms–150ms during heavy impacts (taking damage, Boss hits) to simulate immense physical friction and weight.
  • Polynomial Scaling: Replaces traditional exponential grind-walls with a smooth polynomial XP curve and time-based enemy scaling.

How I built it

The game was built entirely from scratch using Python 3 and Pygame-CE. Instead of a massive, monolithic while loop, I engineered a bespoke engine designed to squeeze maximum performance out of the language:

  • Custom Entity-Component-System (ECS): I strictly separated data from logic. Systems for movement, collision, combat, and rendering process data arrays independently, allowing for massive scalability without spaghetti code.
  • Flow-Field Pathfinding: Instead of relying on expensive, individual A* calculations for hundreds of enemies, the engine calculates a single, unified "gravity map" once per second. The entire horde navigates perfectly around the player at a fraction of the CPU cost.
  • Two-Pass Rendering: Separated static background elements from dynamic actors to ensure perfect Z-index sorting.

Challenges I ran into

Building an engine in pure Python means constantly fighting performance bottlenecks, particularly when rendering hundreds of entities on screen at once.

  • Collision Complexity: Checking collisions for a massive horde was causing exponential slowdowns. I solved this by implementing Spatial Hashing on a dynamic discrete grid, dropping collision detection time complexity to near constant time.
  • Pixel Fill-Rate Bottlenecks: Rendering 1080p UI elements was taking an unacceptable 40ms per frame. I engineered a Hardware-Accelerated UI Caching system using "Dirty Flags." UI panels are now generated, scaled, and cached into memory, reducing UI rendering to just 0.1ms per frame.
  • Wasted CPU Cycles: Spawning enemies off-screen was taxing the system unnecessarily. I built a "Donut of Death" spawner utilizing Frustum Culling and an aggressive background garbage collector to maintain horde density exactly where the player is looking.

Accomplishments that I'm proud of

I am incredibly proud of achieving a locked 60 FPS in a pure Python environment under heavy simulation load. Profiling the engine with cProfile and systematically hunting down sub-millisecond bottlenecks allowed me to build an architecture that rivals lightweight commercial frameworks. Additionally, nailing the "game feel" through the Hit-Stop time manipulation engine makes the combat incredibly satisfying.

What I learned

This project was a masterclass in low-level systems programming and architecture. I deepened my understanding of data-oriented design through the custom ECS, learned how to manipulate polynomial math for balanced game economies, and mastered aggressive culling and memory caching techniques to bypass language-level performance limits.

What's next for Normie Survival

Moving forward, I want to expand the weapon synergy system, introduce environmental hazards into the infinite grid, and potentially abstract the custom ECS engine so it can be used as a standalone open-source framework for other Python game developers.

Built With

Share this project:

Updates