Skip to content

NewsPlay

NewsPlay is an innovative AI-driven platform built for the Google Gemini Hackathon that transforms the world's static news cycle into an interactive, educational, and fun gaming experience.

Core trick

A worker polls for news report folders lacking index.html, has Gemini pick board-game mechanics, and generates the HTML5 game and cover art automatically.

Tags

Description

NewsPlay is an innovative AI-driven platform built for the Google Gemini Hackathon that transforms the world's static news cycle into an interactive, educational, and fun gaming experience. Instead of just passively consuming headlines, users can engage with the news through dynamically generated game mechanics.
AHEADer/FlexGameFactory★ 10 forksJavaScriptApache-2.0Created Mar 7, 2026 · last push Mar 8, 2026

README excerpt

# 🎮 FlexGameFactory

**An AI-powered game factory that automatically transforms trending news into playable web games.**

FlexGameFactory is a fully automated pipeline: it fetches real-world news, generates themed HTML5 games with AI-selected board-game mechanics, creates cover art, and publishes everything — all with zero human intervention.

---

## ✨ How It Works

```
News API → Report → AI Game Builder → HTML5 Game + Cover Art → Git Push → Library
```

1. **News Search** — A FastAPI service (`news_search/`) fetches and summarizes trending news via the Gemini API, saving reports as `report.md` files into `junda_games/<topic>/`.
2. **Game Builder Worker** — A background worker (`game_builder_worker.py`) polls `junda_games/` for directories that have a `report.md` but no `index.html`. For each pending game, it invokes the Gemini CLI with the `generate_news_based_game` skill to autonomously build a full HTML/CSS/JS game.
3. **Cover Art Generation** — The skill uses the Nano Banana (Gemini image generation) API via `tools/nano_banana_gen.py` to produce a 16:9 `cover.png` for each game.
4. **Sync & Publish** — A sync worker (`sync_worker.py`) handles git auto-commit and push, keeping the remote repo up to date with newly generated games.
5. **Frontend Library** — A React + Vite frontend (`game-factory-fe/`) serves as a Steam-style game library where users can browse, play, and review generated games.

---

## 📂 Project Structure

```
FlexGameFactory/
├── news_search/           

Team