A flexible, data-driven idle game engine built with React and TypeScript. Define your game content in simple data files and let the engine handle the rest.
- Resources: Basic currencies, stat bars, hidden flags, passive generation, and dynamic capacity modifiers.
- Tasks: Time-based activities with leveling, progress bars, loops, item drops, and yield scaling.
- Actions: Instant purchases, upgrades, unlocks, and crafting with configurable costs and effects.
- Converters: Background machines that transform resources over time.
- Equipment: Slot-based gear providing passive bonuses. Unlock new slots via progression.
- Modular Content: Organize game data into themed modules or seasonal content packs.
- Save System: Auto-saves to LocalStorage. Import/Export as Base64 strings for sharing.
- Node.js v16+
- npm
git clone https://github.com/simonfruehauf/OpenIdle-Engine.git
cd OpenIdle-Engine
npm install
npm run devOpen http://localhost:3000 in your browser.
npm run buildOutput goes to dist/.
./
├── components/ # UI components (TaskCard, ActionCard, etc.)
├── context/ # Core engine logic (reducer, game loop, save/load)
├── gameData/ # Your game content lives here
│ ├── resources.ts
│ ├── tasks.ts
│ ├── actions.ts
│ ├── equipment.ts
│ ├── converters.ts
│ ├── categories.ts
│ └── index.ts # Module registry
├── types.ts # TypeScript interfaces
├── App.tsx # Main layout
└── index.tsx # Entry point
The engine is entirely data-driven. You never need to touch the core logic (but you can).
- Create a new
.tsfile ingameData/(e.g.,pirates.ts). - Export typed arrays:
RESOURCES,TASKS,ACTIONS,CATEGORIES, etc. - Register your module in
gameData/index.ts:
import * as PiratesModule from './pirates';
const modules = [
// existing modules...
PiratesModule
];See GAMEDATA_GUIDE.md for the full reference on data structures and mechanics.
- React 19
- TypeScript
- Vite
- Tailwind CSS
MIT