Ever wondered how games can revolutionize learning? I was captivated by the idea of merging creativity, technology, and fun, leading me to develop an educational visual novel game. Despite lacking game development experience, I embarked on this journey using Ren'Py, a Python-based visual novel engine. Leveraging AI tools for accelerated development and Azure Static Web Apps for deployment, I built a prototype teaching GitHub Copilot's coding assistance. A festive December theme added an extra layer of enjoyment.
This post details my approach:
Intrigued? Play the game online and access the source code on my GitHub repository (link omitted for brevity).
The Genesis
Numerous educational games exist for cloud technologies, catering to all skill levels. Microsoft's Microsoft Technical Quest (a card game using Azure services) and similar AWS offerings exemplify gamified cloud learning.
Inspired by Microsoft Cloud Advocates' "Azure Space Mystery" (a text-based game with visuals and interactive questions), I aimed to create a similar experience, teaching a technical concept through a text-based game with quizzes and achievement rewards. GitHub Copilot's recent popularity made it my central theme, complemented by a festive December setting.
The result: Christmas Copilot Quest, a game guiding players through GitHub Copilot usage in Visual Studio Code, with GingerBot (Santa's Copilot-powered assistant) providing interactive guidance.
Game screenshots: Main menu, dialogue example, learning resources page.
Crafting a Text-Based Game
Tech Stack:
My requirements included non-linear storytelling with quizzes impacting game flow, UI customization, custom component flexibility, and web app deployment. Python's familiarity led me to Ren'Py, fulfilling all needs with its scripting language for story, quizzes, and UI customization. Its Python extensibility and web export capabilities, along with its CLI for automated builds and deployments, were key factors.
Game Structure:
The game comprises three main components:
Script: The narrative (monologues/dialogues) and quizzes, organized into labeled sections.
Game screenshots: Dialogue example, player quiz.
Graphical User Interface (GUI): Screens, menus, and visual elements. Ren'Py allowed both built-in screen customization (buttons, menus) and new screen creation (achievement notifications, resource menus).
Custom game screens: Character selection, achievement notification, achievements screen.
Custom Python Code: Adds game-specific functionality (achievement system, character definitions, GUI utilities). These components were kept separate for maintainability. For example, a Python function determining player names is called directly from the script:
<code class="language-python">label introduction: felix "Ah, you must be the new coder Santa called for! What's your name?" $ player_input = renpy.input( _("(Type your name and press Enter, or press Enter to use the default name, [character_name].)") ) $ player_name = character_utils.determine_player_name(player_input) player "I'm [player_name]."</code>
AI Integration in Development
GitHub Copilot: Crucial for navigating Ren'Py. While Ren'Py's limited data might affect accuracy, Copilot largely helped understand Ren'Py components, such as suggesting a character selection screen with image buttons.
GitHub Copilot's character selection screen suggestion.
AI Image Generation: To quickly create visuals, I used AI tools. DALL-E 3 (Azure OpenAI Service) initially provided decent images, but maintaining consistent style proved challenging. Microsoft Designer offered better consistency, particularly its avatar text-to-image feature. A "low poly" aesthetic ensured consistency and matched the game's style. Example prompt:
"Low-poly 3D portrait of a stylized woman with brown hair, wearing a blouse in christmas colors, featuring clean geometric shapes, flat colors, and soft lighting, in a minimalist futuristic style with white background."
Generated images were processed using filters for noise reduction, color smoothing, background removal, and polygon edge highlighting. Image combinations and duplicates created eye-blinking effects.
Conclusion and Next Steps
This post demonstrated Ren'Py and AI tools (GitHub Copilot, Azure OpenAI Service, Microsoft Designer) in creating an educational game prototype. The next step is deployment, leveraging Ren'Py's CLI and Azure Static Web Apps' GitHub Actions integration. The following resources offer further information on GitHub Copilot and DALL-E 3. (Links omitted for brevity).
The above is the detailed content of Building an educational game with AI tools and Azure Static Web Apps (Part 1). For more information, please follow other related articles on the PHP Chinese website!