23 · Step-by-Step Projects | Generative AI for Game Development
The video follows Echoes of Asteria, a small web game that demonstrates four AI aspects in six steps. It runs fully with local fallbacks, and it openly shows a sentiment test that fails.
A chapter on generative AI for game development can easily try to cover too much, so this video picks one small game and walks through it from start to finish. The project, Echoes of Asteria, is a single web game that demonstrates four AI aspects: procedural world building, branching quests, NPC dialogue and sentiment analysis. It is a companion to the matching chapter of the book by Shesh Narayan Gupta, narrated by Liam for Humanitarians AI.
The vocabulary behind the project
Before the demo, the video defines six terms. Procedural world building means rooms are generated rather than placed by hand. Branching quest options are choices that resolve differently depending on what the player picks. NPC dialogue means a character, here the caretaker, reacts to the player. Sentiment analysis reads the tone of the player's words. Fallback local lines are the text the game uses when no AI key is available. An API route is the connection between the front end and the Flask back end.
Four files and four endpoints
The whole project is four files: app.py, index.html, app.js and styles.css. The video stresses that it is small on purpose, small enough to finish in an afternoon. The four aspects are exposed through four API endpoints, one each for the world, the quest, the sentiment reading and the dialogue. The front end, app.js, wires every button to its matching route.
Six steps played live
The video plays the game through its steps. First, generate the world: three rooms appear, the dusty library, the moonlit garden and the echo archives. Second, enter the library, which becomes the scene. Third, generate the quest, which asks the player to recover a rumored page by either searching the lower stacks or asking the archivist. Choosing one resolves the story. In the fourth and fifth steps the caretaker comments on the quest, and the player can then type anything. The sentiment route reads the tone of that text and the caretaker answers in kind. The game runs end to end locally, with no API key.
Fallbacks as the default
The routes are wired so that OpenAI is used if the player has a key and a local fallback is used if not. The video makes a point of this: the game is designed to run with nothing, so the fallback is not a failure mode, it is the default.
An honest limit
The video also shows where the project falls short. When the player types "I'm feeling lost," the sentiment reading comes back neutral, because "lost" is not in the word lists. The lists are minimal, so the reading is minimal. The advice is to extend them before shipping. The chapter's argument is that theory is now playable: every concept from earlier chapters appears as a module in one working system that you can run, modify and extend.
Key takeaways
- One small game with four AI aspects is a better teaching project than a sprawling one.
- The project is four files: app.py, index.html, app.js and styles.css.
- World, quest, sentiment and dialogue each get their own API route.
- Use OpenAI when a key exists, and a local fallback when it does not.
- A fallback can be the default path rather than a failure mode.
- Word-list sentiment analysis misses phrases like "I'm feeling lost" until the lists are extended.
- Check that a quest's two options lead to genuinely different outcomes, not the same ending with different wording.
Try it yourself
The video ends with a prompt to paste into Claude: add one new room to the game by describing its mood, and have Claude write the room's name and description, a quest title, two options, resolution text and a caretaker fallback line. Then extend the sentiment word lists with five words players actually use and retest "I'm feeling lost." If it still reads neutral, keep extending. The book and its accompanying code from Apress are linked in the video description.
Full transcript(auto-generated, with timestamps)
[0:00]Generative AI for game development, step-by-step projects, Echoes of Asteria, one small web game, four AI aspects, six steps played live. Hello, this is Liam in for Bear. A full game in one chapter, too much? No, one small game, four aspects, six steps. Small enough to finish, complete enough to learn from. Six terms, then we're off. Procedural world building, rooms generated, not placed. Branching quest options that resolve differently. NPC dialogue, the caretaker reacts to you. Sentiment analysis, tone read from your words. Fallback local lines when no AI key. API route, front end talking to Flask. Echoes of Asteria, one web game proving four aspects. Procedural world building,
[0:41]Branching quests, NPC dialogue, emotional adaptivity through four API endpoints. The whole project is four files. app.py, index.html, app.js, styles.css. Small on purpose, small enough to finish in an afternoon. Step one, generate the world. Three rooms appear, the dusty library, the moonlit garden, the echo archives. Step two, enter the library. The room becomes your scene. Step three, generate the quest. Recover the rumored page, two options. Search the lower stacks or ask the archivist. Choose and the story resolves. Steps four and five, the caretaker comments on your quest, then you talk freely. Type anything, the sentiment route reads your tone and the caretaker answers in kind. And it really runs. The chapter's game
[1:25]Played end to end. The world generates, the quest resolves, sentiment reads the room, all local, no API key. The wiring for routes, OpenAI if you have a key, the local fallback if you don't. Designed to run with nothing, the fallback isn't a failure mode, it's the default. The front end, app.js, wires every button to its route. Generate, enter, quest, talk back. The NPC panel, the tone selector, the talk box. The honest limit, I'm feeling lost, reads neutral. Lost isn't in the word lists. Minimal lists, minimal reading. Extend them before you ship. Theory now playable, run it, modify it, extend it. Every concept from earlier chapters, a
[2:04]Module in one working system. Let's recap with Claude, Echoes of Aetheria, four AI aspects in one small complete web game. Six steps, generate the world, enter room, take the quest, meet the caretaker. The game really runs world, quest, sentiment, and dialogue all local. Four routes, wire it, world, quest, sentiment, dialogue, open AI optional. Honest limits, lost reads neutral until you extend the word lists. Run it, modify it, extend it, theory now playable. Your turn, paste this into Claude. Help me extend the Echoes of Aetheria game with one new room. I will describe the room's mood. You write the room's name and description, its quest title, two options, resolution text, and
[2:40]The caretaker's fallback line for it. Then extend the sentiment word lists with five words that would catch how players actually talk like lost, and retest the sentence I'm feeling lost to show me it now reads correctly. Then check two things yourself. Do your quest's two options lead somewhere different or to the same resolution with different paint? And do your sentiment lists catch how players actually talk? Test I'm feeling lost again. If it still [clears throat] reads neutral, keep extending. Step-by-step projects at Nick Bear Brown.
More from Generative AI for Game Development — Shesh Narayan Gupta
3:2724 · Templates and Frameworks | Generative AI for Game Development
3:1422 · Interviews with Industry Professionals | Generative AI for Game Development
3:1025 · Project Variations | Generative AI for Game Development
3:1421 · The Future of Generative AI in Storytelling | Generative AI for Game Development
3:4620 · Best Practices for AI Storytelling | Generative AI for Game Development
3:30