Galactic Crafters: Factory Simulation & Grid Logistics
Over 2,000 lines of modular Python and Pygame powering a 2D factory automation game. Players route ores across a 40x40 directional grid, assemble hardware, and trade on a dynamic market.
Watch the full gameplay demonstration on YouTube or download the playable build on itch.io.
Overview
An automated factory simulation built as an A-Level Computer Science NEA project, published on itch.io and demonstrated on YouTube.
The Problem
Designing a responsive grid-based automation game requires clean directional handoffs between machines, persistent save states, and collision logic that does not stall when players drag whole machine clusters at once.
Architecture & Implementation
Written in Python 3.12 with Pygame across modular object-oriented machine classes. A 40x40 grid stores directional vectors, machine tiers, and inventories, while binary pickle files persist full factory layouts and fluctuating market revenue metrics.
Key Challenges Solved
- Fixing a multi-select drag bottleneck where moving 20 machines across 10 tiles ran 200+ collision checks and collided with group members, solved by treating the cluster as one mask checked once at landing.
- Handling smooth 90-degree conveyor corner transfers so items never pile up or vanish between ticks.
- Serializing interdependent machine inventories, upgrade levels, and revenue history cleanly with Python pickle.
Outcomes & Verification
- Shipped a standalone Windows build with PyInstaller and published playable builds on amin9127.itch.io.
- Recorded and published a full gameplay walkthrough on YouTube.
- Documented full requirements, system design, and test evidence across a formal coursework specification.