Designing Interactive Stories with Claude.ai

In this hands-on session, we'll jump into the world of interactive fiction, its benefits, and how Claude Artifacts or ChatGPT can be used to create immersive and engaging stories. You will explore the concepts of Claude Artifacts and ChatGPT 4o with Canvas, how they work, and how to design interactive stories with images a la Zork. You'll leave with practical strategies and ideas to get started with using AI coding chatbots in your classroom.

Let's get started!

Topics

TCEA Essential Learning Expectations (ELEs)

Game Design: A Creative Process

Game Design Checklist

Demonstration with AI

Share your game prompts (work alone or in groups to design them).

You can see all my failed attempts, along with successful ones, online. Just save them to your computer or device and open them in a web browser (e.g. Chrome, Firefox, Safari).

AI How To with Claude and ChatGPT

Both Claude AI and ChatGPT now offer coding capabilities. Free users can take advantage of Claude Artifacts, while ChatGPT 4o with Canvas is available only to Plus or Teams users. Here's a set of how-to videos showing both tools off for later reference. You can get the HTML version of both creations and save them to your device to view and play in your web browser.

Claude AI Game Design Overview

ChatGPT GPT 4o with canvas Overview

Aligning Game Design to TCEA ELEs

The TCEA Essential Learning Expectations (ELEs) address the evolving needs of our educational system, preparing our students, teachers, instructional coaches, and school leaders for the challenges and opportunities of today's world. 

They provide a comprehensive framework that aligns expectations across different roles in the educational system, promotes meaningful technology and AI integration, emphasizes critical thinking and problem-solving, fosters inclusive learning environments, and encourages data-informed practices. 

View the complete document online at tinyurl.com/tceaeles1 

Creative Process

Checklist

This comprehensive checklist covers nine essential aspects of game development:

This checklist serves as a structured guide for developers. It outlines how to create a well-rounded, AI-enhanced game with a text-based interface. This interface will be accessible through web browsers. 
It emphasizes simplicity in design while incorporating essential gaming elements and AI features to enhance the player experience.

When I was thirteen years old, I was an avid electronic Bulletin Board System (BBS) user. One of my first encounters in the pre-Internet world? An ASCII based Star Trek game. I spent hours playing this game and never found anything like it again. As a non-programmer, I kept wishing someone would make the code for this game easily available. How hard could it be?

With AI, I decided to give it a shot. After 15 minutes of using Claude AI's Artifacts feature, I had a similar game using rules I half-remember from several decades ago.

About This Creation

I started this game design with Claude but promptly ran into Claude's limitations. So, I took a draft of the code Claude generated, then dropped it into ChatGPT 4o to finish it up.

Tips

Welcome, aspiring AI game designers, to the digital playground where pixels meet possibility! These five golden rules are your secret weapons in crafting captivating virtual worlds that will have players glued to their screens. With these tricks up your sleeve, you're not just designing games—you're architecting dreams and engineering fun!

1. Start Simple. This approach allows you to establish a solid foundation for your game before introducing more intricate elements.

2. Iterate Often. This iterative process ensures continuous refinement and enhancement of the gaming experience.

3. Use Clear Symbols. This tip is particularly important for text-based games, ensuring that players can quickly understand the game's visual elements.

4. Focus on Engagement. Balancing enjoyment and difficulty is crucial for creating a compelling gaming experience that keeps players coming back.

5. Encourage Exploration. This tip promotes player autonomy and adds depth to the gameplay, enhancing replayability and overall satisfaction.

Sample Game Prompt

Design a text-based dungeon adventure where the objective is to explore and find treasures while battling monsters. The game should operate on a flexible grid size, such as 20x20 or larger, to allow for more expansive exploration. Include basic player commands like move, attack, and defend, with characters, obstacles, and goals represented by clear ASCII symbols.

Provide real-time feedback, such as score updates and health status, to keep players engaged. Ensure the game offers replayability with different outcomes or challenges each time.

Wrap the game in HTML so it can be played in a web browser, using a text-based interface for player input and game output. Enhance the gameplay with AI elements, such as enemy behavior or dynamic obstacles.

Sample Game Prompts

Behold, intrepid game designers and AI enthusiasts! Before you lies a treasure trove of creative sparks, a compendium of prompts designed to ignite the fires of imagination and set your game development journey ablaze. Are you ready to answer the call and bring these digital worlds to life?

Basic Adventure Game

Create a text-based adventure where players explore a dungeon, encountering monsters and treasures.

Space Battle Simulation

Design a game where players control a spaceship on a grid, battling alien ships with limited resources.

Puzzle Challenge

Develop a puzzle game where players solve riddles to progress through levels.

Educational Quest

Create a game that teaches basic math concepts through interactive challenges.

Mystery Solver

Design a detective game where players gather clues and solve mysteries using text commands.

Hangman Game

Create a hangman game where the player guesses a word by suggesting letters. The game should display the word with guessed letters filled in and incorrect guesses should draw a part of a hangman's gallows. The game ends when the word is guessed or the gallows is complete

Word Chain

Develop a word chain game where the player and the AI take turns saying a word that starts with the last letter of the previous word. For example, if the player says 'cat', the AI could say 'turtle' because turtle starts with 't', which is the last letter of 'cat'.


ASCII Star Trek Game

Beginning Prompt

Create an ASCII-based Star Trek game where the player controls the USS Enterprise on a 10x10 grid of dots. The Enterprise must fight against Klingon and Romulan ships using text commands. The player can move the Enterprise, fire phasers, fire torpedoes (represented by asterisks), and raise shields. 

The grid also contains starbases where the player can restock and repair. Include long-range sensors to allow the player to see enemies beyond the immediate grid. The game should be playable in a web browser with simple text commands to control the Enterprise.

Instructions

Here are the available commands:

Star Trek Game Citations

Tower Defense Game

ASCII Tower Defense Game Creation Prompt

Create a browser-based tower defense game with the following specifications:

1. Use HTML5 Canvas for rendering and JavaScript for game logic.

2. Implement a larger grid size (40x30) to allow for more strategic gameplay.

3. Represent game elements using ASCII characters:

   - Goblins (enemies): 'G'

   - Arrow Towers: 'A'

   - Cannon Towers: 'C'

   - Magic Towers: 'M'

4. Generate a random, winding path for enemies to follow, a different one for each wave. Use ^ to indicate mountains, T for trees, ~ for water/rivers, etc. Also, don't change map after towers have been placed for a wave

5. Create three types of towers with different costs, damages, ranges, and attack speeds:

   - Arrow Tower: Fast, medium damage, $50

   - Cannon Tower: Slow, high damage, $100

   - Magic Tower: Very fast, low damage, $150

6. Implement a wave system with progressively harder enemies:

   - Increase health and speed of enemies each wave

   - Spawn 10 enemies per wave, scaling with the wave number

7. Add a simple UI for:

   - Displaying current wave, lives, and coins

   - Selecting tower types

   - Starting waves manually

8. Include game mechanics such as:

   - Earning coins by defeating enemies

   - Losing lives when enemies reach the end of the path

   - Game over when all lives are lost

9. Implement tower placement logic:

   - Allow placing towers on empty grid spaces

   - Prevent placing towers on the enemy path

10. Add visual feedback:

    - Show tower range when selected

    - Display enemy health bars

11. Use a monospace font to maintain the ASCII art style.

12. Ensure the game loops continuously, updating and redrawing the game state.

Combine these elements into a single HTML file that includes the necessary JavaScript and CSS to create a fully functional, retro-style tower defense game playable in a web browser.

Dungeon Adventure Game

Initial Prompt

Design a text-based dungeon adventure where the objective is to explore and find treasures while battling monsters. The game should operate on a flexible grid size, such as 20x20 or larger, to allow for more expansive exploration. Include basic player commands like move, attack, and defend, with characters, obstacles, and goals represented by clear ASCII symbols.

Provide real-time feedback, such as score updates and health status, to keep players engaged. Ensure the game offers replayability with different outcomes or challenges each time.

Wrap the game in HTML so it can be played in a web browser, using a text-based interface for player input and game output. Enhance the gameplay with AI elements, such as enemy behavior or dynamic obstacles.

Citations

Sample Prompt

I would like to develop some interactive games using Claude's Artifacts feature that I can download and save as HTML web browser friendly games. Those games include all the standard ones like Tic Tac Toe, Hangman, Sudoku, Backgammon. I want the game mechanics to reflect one or two player options, include when it makes sense the following:

Could you generate prompts and HTML wrapped browser friendly versions of a game that combines as many elements as possible and use colorful fonts that are ADA friendly?

Results - Cosmic conquest

Version 1 - Simple game per prompt

Version 2 - Added space theme, asked for more drama, and interactivity

Version 3 - Added for enemy attacks, integrated phasers, torpedoes, and animation

This promised to be really interesting but Claude was unable to render the rest of it. It hit its limit. :-(

Revised Prompt with TCEA Prompt Guide Educator

Objective: Develop interactive, HTML web browser-friendly games using Claude's Artifacts feature. The games should include standard ones like Tic Tac Toe, Hangman, Sudoku, and Backgammon. The game mechanics should offer one or two-player options and incorporate various dynamic features and elements to enhance interactivity, strategy, and engagement.

Game Design Elements to Incorporate:

Technical Requirements:

Prompt Generation Example: Generate an HTML-wrapped browser-friendly game that combines turn-based mechanics, resource management, and modular boards. The game should support both single-player and two-player modes, featuring customizable avatars and real-time bidding for resources. Include a time manipulation feature where players can slow down or speed up gameplay. The board should be dynamic, with tiles that interact with one another and the environment. Players can trigger chain reactions by making strategic moves, and power-ups should be hidden across the board, offering temporary advantages.

Execution: Leverage Claude's Artifacts feature to create and fine-tune these game elements. Generate prompts that guide the system to include as many of the listed elements as possible in each game, ensuring that the final output is interactive, engaging, and accessible. Keep the game's length within the limits of what Claude can generate in a single request, ensuring that the games are concise, browser-friendly, and ready for immediate play.

Result - Resource Management Game

AI World Domination Game

The world is a grid of ASCII characters, where:

The player can perform four actions: Build (B), Plant (P), Upgrade (U), and Sabotage (S).

The computer randomly chooses actions and positions.

The game runs for a set number of turns, after which the winner is determined based on the score.

Objective: Create an ASCII art-based game where the player competes against the computer for world domination. The theme of the game is to protect the global climate from the negative impacts of AI data centers. The player and the computer each control a network of AI data centers and must strategically manage resources to either protect or exploit the climate. The game should be simple yet strategic, with the outcome determined by the player’s decisions in resource management, environmental protection, and AI deployment.

Gameplay Elements:

Example Prompt: "Generate an ASCII art-based turn-based strategy game where the player competes against the computer for world domination by protecting the climate from AI data centers. The player can build data centers, plant trees, upgrade centers to more eco-friendly versions, and sabotage the computer’s efforts. The world is represented as a grid of ASCII characters, and the game ends when either the player or the computer dominates the majority of the grid, with the outcome depending on the balance between environmental health and technological dominance. The game should be simple yet strategic, with a focus on resource management and climate protection."

Execution:


This prompt is designed to create a game with a meaningful theme centered on climate protection, using the simplicity and charm of ASCII art to engage the player in a strategic battle against AI-driven climate degradation.