Skip to content

Repository files navigation

AI Game Studio

AI Game Studio

Build Games at the Speed of Imagination.

CI Release License: MIT

AI Game Studio is an AI-First, open source 2D game development platform that combines the productivity of Adobe Flash's visual paradigm (timeline, keyframes, direct editing) with modern architectures (Rust, ECS, WGPU) and integrates Artificial Intelligence as an active member of the development team.

The AI knows the game, and the game knows the AI.

Project status

🎉 0.4.0 released (Phases 1–2 complete, Phase 3 closed over Desktop/Web/Android, Phase 4 — deep AI — complete, milestones M0–M21). The editor's Chat can now answer questions, propose and apply reviewable changes, coordinate specialized agents, and generate a whole game across several scenes from a natural-language instruction. See the CHANGELOG and the roadmap.

Get started in 3 minutes

git clone https://github.com/Codigo-Free/ai-game-studio && cd ai-game-studio
cargo install --path cli
aigs run examples/robot-rescue/game.aigs        # play the demo
cd editor && npm install && npm run tauri dev   # open the editor

Follow the quick start guide for a tour of the editor and your first game in 8 steps. Editor installers and CLI binaries are available in Releases⚠️ on Wayland, prefer the .deb/.rpm installer over the AppImage, which can fail with an EGL_BAD_ALLOC error on some GPUs (confirmed AppImage-packaging-specific; see the known issue).

What works today (0.4.0)

  • 🎨 Visual editor (Tauri 2 + React): viewport with drag/zoom/pan, scene tree, inspector, asset browser with import, live console with metrics, global undo/redo, and Desktop/Web/Android export from a dropdown.
  • 🎞 Flash-style timeline: per-entity/property tracks, draggable keyframes with easing, scrubbing and playback with viewport preview.
  • 🕹 Code-free behaviors: "when key/click/scene start/animation end/collisionmove / go to scene / play animation/sound / emit particles", edited from the inspector.
  • ⚙️ Custom Rust runtime: ECS with generational indices, instanced 2D rendering over WGPU, 60 Hz game loop with interpolated rendering, multi-scene. Querying 10k entities costs ~21 µs (benchmarks).
  • 🧱 2D physics (rapier2d), audio (kira), spritesheets and animation state machines, and particles as ECS entities.
  • 📜 User scripting (sandboxed rhai) with persistent state across scenes and across real play sessions (save.json, autosave) — see the Tamagotchi demo.
  • 📦 Export to Desktop, Web and Android: aigs export --target desktop|web|android — the same project runs natively, in the browser (WebGPU/WebGL) or as a signed APK (Vulkan), unchanged.
  • 👆 Touch input: a finger behaves like the mouse, and the virtual_button component simulates on-screen keys for keyboard-driven games.
  • 📄 AI-Ready .aigs format: the entire game is readable, versionable JSON — the foundation for AI to create and modify complete games (specification).
  • 🤖 AI Chat, four modes: ask questions about the open project; propose a reviewable change (entities/scripts) with one-click apply/undo; orchestrate specialized agents (Architect, Level Designer, Programmer, Physics, Audio, Animator) for a higher-level instruction; or generate a whole game across several scenes from a single natural-language prompt — all backed by a local Ollama model or Claude.
  • 🔧 aigs CLI: validate, run, export --target ... and script-api to work without opening the editor.

What's next

  • Phase 3: iOS exporter (M16), deferred with no date — needs macOS + Xcode.
  • Phase 5: plugin SDK, marketplace, collaboration.

Examples

Each folder has its own README.md with instructions and controls.

Project What it demonstrates
examples/robot-rescue/ Complete demo game: animated menu, playable level (arrows + click), a scripted drone and a win screen chained via animation_end.
examples/tamagotchi/ Persistent virtual pet (M13): stats that decay in real time even while the game is closed, cared for with keys 1/2/3, a single script.
examples/physics-playground/ 2D physics: falling crates, a bouncing ball, a robot pushing crates, a sensor with particles.
examples/hello-world/ Minimal project: scenes, animations and basic behaviors.
examples/bouncing-sprites/ Using the runtime as a Rust library, no editor (hundreds of sprites at 60 FPS).

Monorepo structure

Directory Contents
docs/ Design documentation: vision, architecture, plan, quick start guide, decisions.
editor/ Visual editor — Tauri 2 + React + TypeScript.
runtime/ Engine — Rust crates: aigs-ecs, aigs-render, aigs-anim, aigs-project, aigs-runtime.
cli/ aigs binary (validate, run, export).
exporters/ Per-platform exporters (Phase 2+).
sdk/ Public contract: .aigs format specification and extension APIs.
examples/ Example games and demos.
tests/ Full-system integration tests.

Documentation

Most of docs/ is written in Spanish (the project's primary working language); code, identifiers and commit messages are in English.

Technologies

Rust · WGPU · Tauri 2 · React · TypeScript · Ollama / Claude / GPT / Gemini (Phase 4)

Contributing

The project is open to the community. Read CONTRIBUTING.md to get started. Development follows an AI First methodology: this project is designed, implemented, tested and documented in collaboration with AI, with full traceability in CLAUDE.md.

Authorship

Created by efrasoft@gmail.com on HarnessOS with Visual Studio Code and Claude.

License

MIT

About

AI-First open source game development platform — Build Games at the Speed of Imagination

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages