Wrapping Up Project Prep

Teamwork

I think the biggest thing I learned this week was about team communication. We were discussing how best to implement our database schema, and I believed it should be implemented in a particular way while another teammate thought it should be implemented in a completely different way. We had to have a voice call because I literally could not fathom how his idea would work for a text adventure. In short I wanted to kind of simulate the game world with different game object types defined (rooms, items, NPCs). He thought we should go with a single type that is simply a paragraph telling you what is happening. I could not make sense of how to make it work for a text adventure, let alone one where educators make their own adventures.

This was when I realized that we had completely different ideas of what the project was going to include. I had been imagining a text adventure, where he had been imagining a linear choose your own adventure style story. I was shocked that we hadn’t better defined what the actual gameplay would look like for our game engine. Knowing this I called a meeting with all of the members to see what the group consensus was on the kind of game engine we are making. It turns out that I was completely alone in believing we would be making a text adventure game. Everyone had been picturing a choose your own adventure style game with limited choices given in each state. I definitely want to be a team player, so I have to rethink the way I imagined our project.

Database Work

This shift invalidates all of my previous database schema work, so lets rethink it. Instead of needing to simulate a game world where rooms items and npcs all have a wide variety of interactions, I can probably think of the game as a series of pages that point to other pages. Its no longer important to model these things, because if we limit the player interaction we can know every outcome in order. Here is a new example for a game object being held in our database:

{
"game_id": "game1",
"title": "Renaissance Adventure",
"description": "Explore 14th century Florence.",
"author": "Jane Doe",
"created_at": "2023-12-04T10:00:00Z",
"updated_at": "2023-12-05T12:00:00Z",
"pages": {(pages list)}
}

This is pretty self explanatory, I think the part that would better explain the structure of the game is the connected pages list. Here is an example of such a list.

I believe a page will have an ID with which other pages can point to it, content which is what the current page displays to the player, and choices that have text describing the choice as well as a pointer to another page. I asked chatGPT to write up some quick examples of 4 pages using this schema. Check out the results:

{
  "page_id": "page1",
  "game_id": "florenceQuest123",
  "content": "It's a bright morning in Florence, the heart of the Renaissance. The city is bustling with artists, philosophers, and merchants. As you wander through the cobbled streets, an artist's apprentice approaches you with an invitation: the master artist, Lorenzo, has requested your presence at his studio. He's known for his enchanting paintings and mysterious inventions. Alternatively, you could visit the bustling marketplace that promises its own adventures.",
  "choices": [
    {
      "choice_text": "Accept the invitation and visit Lorenzo's studio.",
      "next_page_id": "page2"
    },
    {
      "choice_text": "Head to the vibrant marketplace.",
      "next_page_id": "page3"
    }
  ]
},
{
  "page_id": "page2",
  "game_id": "florenceQuest123",
  "content": "Lorenzo's studio is a treasure trove of art and innovation. Paintings with vivid colors adorn the walls, and curious mechanical devices are scattered throughout. Lorenzo presents you with a choice: assist him in completing a revolutionary painting that could change art forever, or help him with a secretive mechanical project that could astonish the minds of Florence.",
  "choices": [
    {
      "choice_text": "Help with the revolutionary painting.",
      "next_page_id": "page4"
    },
    {
      "choice_text": "Work on the secretive mechanical project.",
      "next_page_id": "page5"
    }
  ]
},
{
  "page_id": "page3",
  "game_id": "florenceQuest123",
  "content": "The marketplace of Florence is a lively scene of commerce and gossip. Merchants from distant lands sell exotic goods, and local craftsmen offer their finest works. As you peruse the stalls, a merchant tells tales of a rare artifact recently brought to Florence. You can choose to investigate the mysterious artifact or help a group of local artisans settle a creative dispute.",
  "choices": [
    {
      "choice_text": "Investigate the mysterious artifact.",
      "next_page_id": "page6"
    },
    {
      "choice_text": "Help the artisans with their dispute.",
      "next_page_id": "page7"
    }
  ]
},
{
  "page_id": "page4",
  "game_id": "florenceQuest123",
  "content": "After days of assisting Lorenzo with the painting, the masterpiece is finally ready. The unveiling is to be held at the Medici Palace, attended by the most influential figures of Florence. At the event, you're presented with two intriguing options: network with Florence's elite to gain patronage for your own ambitions or sneak away to explore the hidden chambers of the Medici Palace, rumored to hold secrets of the powerful family.",
  "choices": [
    {
      "choice_text": "Network with the city's elite.",
      "next_page_id": "page8"
    },
    {
      "choice_text": "Explore the hidden chambers of the palace.",
      "next_page_id": "page9"
    }
  ]
}

(Side note: I really wish the syntax highlighting worked with my blog theme. Its a real bummer that it just displays it all in white text.)

This seems like a fine schema for this type of game. One thing that chatGPT added to my model was the “game_id” section, which in my proposed model is redundant. I don’t really see these pages being stored anywhere besides in the game object on the database, as you’d never want to access a page from a different game.

On a lark I asked chatGPT to illustrate Lorenzo from the story they generated, and got some fun results.


Then I asked chatGPT to actually illustrate each of the pages they wrote, according to what the “content” section describes. The results were pretty fun:

Page 1: A Bright Morning in Renaissance Florence

Page 2: The Artist’s Studio in Florence

Page 3: The Colorful Marketplace in Renaissance Florence

Page 4: The Medici Palace During an Art Unveiling Event

Obviously using AI generated art for educational historical content has some caveats, but it does mean there are some interesting opportunities for the future of this medium. For instance after seeing the generated Medici palace, I had to check how accurate it was, and it wasn’t great. Despite this, if a teacher could upload their description of each page and then have a plugin to get art generated for them that would serve as an illustration for students playing the game. Getting such a feature up and working is outside the scope of this project though. We could encourage the use of AI image generation on the site though!

Conclusion

I’m going to miss making a true text adventure engine, but I’m guessing that will have to be a solo project. I think its important to be on the same page as your team, and I think I learned a valuable lesson about that. You can’t take things for granted, and need clear definitions of the terms you use from the beginning. I saw the term text adventure as a particular thing, and assumed my teammates did too. I’m glad we figured it out before starting any coding work on it, as it would have gotten more and more confusing. It does seem we now have a more simple project which means that it will be easier to deliver a higher level of polish.

Print Friendly, PDF & Email

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *