A 2D factory-building game inspired by Factorio, built entirely in Python + Pygame.
Build miners, conveyor belts, smelters, and assemblers to create automated production lines.
Research new technologies, manage power, survive disasters, and ultimately launch a rocket to win.
# Clone the repository
git clone https://github.com/yourusername/factory-automation.git
cd factory-automation
# Install dependencies
pip install pygame
# Run the game
python main.py[Iron Ore Tile] → [Miner] → [Belt →] → [Furnace] → [Belt →] → [Market] → $6
Press 1 → Place a Miner on an iron ore tile
Press 2 → Place Belts pointing toward your factory
Press 3 → Place a Furnace to smelt ore into plates
Press 6 → Place a Market to sell products
Press 8 → Build a Coal Generator for power
Watch your money grow!
Pro tip: Hold Shift + Click on any ore deposit to auto-build a complete Miner → Belt → Furnace → Market chain instantly!
- 18 building types — miners, belts, furnaces, assemblers, generators, splitters, mergers, trains, robots, and more
- Multi-stage production chains — Ore → Plate → Gear → Machine Part
- Smooth item transport — visible items moving along conveyor belts
- Click-to-inspect buildings — detailed popup showing status, efficiency, inputs, outputs, and progress bars
- Deposit depletion — resources run out over time, forcing expansion and logistics planning
- Coal Generators — 100 MW power production
- Solar Panels — passive generation affected by weather
- Power management — buildings shut down when demand exceeds supply
- Visual indicators — green / yellow / red status dots
- 10 technologies including faster miners, better furnaces, trains, robots
- Passive research point generation
- Visual tech tree overlay
- Rail network system
- Autonomous locomotives
- Train stations
- Splitters, mergers, underground belts
- Autonomous item transport
- Robot ports with battery system
- Flying logistics without belts
- Biomes: Grassland, Desert, Forest
- Rare resources: Titanium, Uranium, Gold
- Seed-based generation
- Weather system affecting solar output
- Pollution mechanics
- Market price fluctuations
- Random disasters and events
- AI competitors
- 12 quests
- 10 achievements
- Rocket launch endgame
- WASD / Arrow Keys — Move camera
- Right-click + drag — Pan
- Scroll — Zoom
- F11 — Fullscreen
- 1 Miner
- 2 Belt
- 3 Furnace
- 4 Inserter
- 5 Storage
- 6 Market
- 7 Assembler
- 8 Coal Generator
- 9 Solar Panel
- 0 Splitter
- Left click — Place
- Right click — Remove
- Shift + click — Auto-build chain
- ESC — Menu
Iron Ore → Furnace → Iron Plate → Market ($6)
Iron Plate + Copper Wire → Circuit
Circuit + Gear → Machine Part
- Coal Generator: +100 MW
- Solar Panel: +40 MW
- Miner: -10 MW
- Furnace: -20 MW
If demand exceeds supply → buildings stop working.
Fast Miners → Better Furnace → Assembly Mk2 → Robots → Trains
- Normal — balanced
- Archipelago — islands
- Desert — copper rich
- Rich Resources — easy mode
- Hardcore — scarce resources
- First Ore
- Tycoon
- Automation Master
- To The Stars (rocket launch)
factory_automation/
├── main.py
├── constants.py
├── entities/
├── systems/
├── world/
├── ui/
├── utils/
└── save/
- Entity-based architecture
- 19 independent systems
- Chunk-based world optimization
- Delta-time simulation
- Modular UI system
- Build power early
- Automate iron first
- Copper is a bottleneck
- Use shift-click auto-build
- Watch pollution levels
MIT License
Credits
Inspired by Factorio by Wube Software Ltd. Built using Python + Pygame.