Isometric 3D Rendering
Custom canvas-based renderer with layered visualization
A browser-based factory automation game built with React and vanilla JavaScript.
Play Now →FactoryForge is an isometric factory simulation game where you build automated production systems. Design efficient supply chains, manage resources, and optimize production through research and smart logistics.
Isometric View
┌─────────┐
/ Forge /│
├─────────┤ │
│ ▓▓▓▓▓▓▓ │ │
│ ▓ Supply▓ │/
│ ▓▓▓▓▓▓▓ │/
└─────────┘
Custom canvas-based renderer with layered visualization
Build production chains with inserters, power systems, and logistics
Unlock new technologies and building types
Tick-based game engine with bottleneck detection
Built-in FPS tracking and optimization tools
Local save/load via IndexedDB with import/export functionality
Full keyboard control support
Isometric Projection
// Convert grid to isometric screen
function toScreen(x, y) {
return {
sx: (x - y) * TILE_WIDTH / 2,
sy: (x + y) * TILE_HEIGHT / 2
};
}
Game Loop
const TICK_RATE = 60;
let accumulator = 0;
function gameLoop(timestamp) {
const delta = timestamp - lastTime;
accumulator += delta;
while (accumulator >= TICK_RATE) {
update(TICK_RATE);
accumulator -= TICK_RATE;
}
render();
requestAnimationFrame(gameLoop);
}
EventBus
class EventBus {
listeners = {};
on(event, callback) {
(this.listeners[event] ||= [])
.push(callback);
}
emit(event, data) {
this.listeners[event]?.forEach(
cb => cb(data));
}
}
Clone the repository and start building your factory empire:
$ npm install$ npm run dev
Open your browser to start building your factory empire!