Skip to content

JUNGHERZ/MakeMyGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 MakeMyGame v2.2

Live Demo MIT License GitHub Stars Python Changelog

Describe a game idea — the AI builds it for you as a playable retro game in the Gameboy or colorful 16-bit Super Nintendo style.

MakeMyGame is a dual-track retro game console and AI game generator that turns your game ideas, expressed in natural language, into fully functional, playable masterpieces. Switch seamlessly between two console generations, play in full-screen with on-screen touch controls, and instantly load curated example games — all in five European languages.

\n MakeMyGame Demo\n

✨ New in v2.2

  • 🌍 Five languages – German, English, Spanish, French, and Italian. Auto-detected from the browser locale, switchable on the fly via a flag dropdown in the header.
  • 🚀 Instant Example Templates – All twelve curated examples (six per mode) load instantly from a server-side template cache. No AI call, no wait, no tokens spent — perfect for first-time visitors who just want to try the app.
  • 🖥️ Immersive Fullscreen Mode – Click the fullscreen icon to fill the entire screen with just the game. On touch devices, semi-transparent overlay buttons appear (PS Remote Play style); on keyboard input they fade away automatically.
  • 📺 CRT Filter Toggle – Flip the on-screen filter off for a pixel-clean modern-emulator look, or keep the classic scanlines + LCD tint for full 80s nostalgia. Persisted across sessions.
  • 🔠 Cleaner Mode Switch – The console-mode toggle now reads "8-BIT" / "16-BIT" instead of the cryptic "8B" / "16B".

✨ Core Features

  • 🧠 Dual AI Game Generation – Processes complex game ideas and programs playable retro games live in the browser.
  • 🕹️ 8-Bit Classic Mode (Gameboy era) – Green LCD screen, original 4-color geometry, responsive DMG case shell, resolution 160×144px.
  • 📺 16-Bit Premium Mode (SNES era) – Elegant light-grey console frame with colored A/B buttons, a detailed CRT-tube TV filter (scanlines), wider resolution 240×160px, and the harmonious Sweetie-16 color palette.
  • 🎛️ Physical Mode Toggle – A stylish, smoothly animated slide switch lets you flip between modes on the fly.
  • 🎶 Synthesizer Sound Upgrade – The audio engine adapts dynamically. In 16-bit mode, instead of rigid square-wave beeps, it synthesizes rich polyphonic chiptune chords and soft stereo arpeggios.
  • ⏸️ Universal Pause – Press the START button (or Enter) to pause the game at any time. A slick, blinking - PAUSED - CRT-TV overlay drops over the gameplay.
  • 🛡️ Crash-proof State & Sandbox Design – A recursive JavaScript proxy for engine.state catches AI typos (case sensitivity) and missing sub-objects at the source, while a dynamic method injector grants AI helper methods absolute programming freedom.
  • 🔀 Remix Mode – Have existing games extended or altered by the AI with targeted prompts (e.g. "Add a new power-up and increase enemy speed").
  • 💾 Share & Deduplication System – Saves games behind a short URL including the console format used (mode). Older 8-bit links automatically switch the shell back to Gameboy mode when loaded.

🗂️ Project Structure

MakeMyGame/
├── .env                    ← API_URL, API_KEY, API_MODEL, PORT
├── Dockerfile              ← Container build (python:3.12-slim)
├── requirements.txt        ← Python dependencies (aiohttp)
├── server.py               ← aiohttp server (static files, API proxy, sharing)
├── index.html              ← UI shell (CRT-TV & SNES pad) and landing page
├── css/
│   ├── shared.css          ← CSS variables, light/dark mode
│   └── gameboy.css         ← SNES/CRT-TV & Gameboy skins (responsive aspect ratio)
├── js/
│   ├── app.js              ← UI logic, event binding, sharing, example loader
│   ├── i18n.js             ← Bilingual support (DE/EN) and dynamic 8-bit/16-bit prompts
│   ├── engine/
│   │   ├── GameEngine.js   ← 60 FPS game loop, entity system, pause, scope injector
│   │   ├── Renderer.js     ← Canvas drawer (160x144 / 240x160), auto font scaling
│   │   ├── Input.js        ← Keyboard + touch → button events (with Space mapping)
│   │   └── Sound.js        ← Dual audio synthesizer (8-bit square vs. 16-bit chords)
│   ├── ai/
│   │   ├── GameGenerator.js    ← API handler, streaming proxy, parsing
│   │   ├── CodeValidator.js    ← Sandbox safety check (XSS filter)
│   │   └── promptTemplates.js  ← Beefed-up 8-bit & 16-bit system prompts
│   └── shell/
│       ├── GameboyShell.js     ← Boot sequence, boot/idle/loading/error handler
│       └── ScreenManager.js    ← Centered rendering of system states (CRT look)
├── shared_games/           ← Saved game JSONs (not in git repo)
└── template_games/         ← Pre-built instant-load templates ({slug}_{mode}.json)

🛠️ Setup & Start

Locally (Python)

Requirements: Python 3.10+ and installed dependencies.

pip install -r requirements.txt

Put your keys in the .env file:

API_URL=https://router.eu.requesty.ai/v1/chat/completions
API_KEY=your-api-key
API_MODEL=vertex/gemini-3.5-flash@eu
PORT=8080

Start the server:

python3 server.py

The app then runs on http://localhost:8080.


🎮 Keyboard Mapping

Console Keyboard Action
D-Pad ⬆️ ⬇️ ⬅️ ➡ / W A S D Move / direction
A button Space, X, J Start / confirm / jump / shoot
B button Z, Y, K Back / action 2
SELECT Shift Menu / option
START Enter Pause / resume game (universal)

📄 License

This project is licensed under the terms of the MIT License. See LICENSE for details.

About

Describe a game idea — the AI builds it for you as a playable retro game in the Gameboy or colorful 16-bit Super Nintendo style.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors