NaNoGenMo / 2016

National Novel Generation Month, 2016 edition.
https://nanogenmo.github.io
162 stars 7 forks source link

Actually fun computer-generated text adventure game #36

Open superMDguy opened 7 years ago

superMDguy commented 7 years ago

I've wanted to do this for a while, and I've been thinking about a lot of possibilities. I've done some Markov Chains in the past, but that wasn't exactly interesting. I'm thinking of making some sort of text adventure, because those typically follow a sort of 'formula', but are still interesting. Letting the human choose the plot through actions will make a story much more engaging and interesting than a computer could come up with on its own (for now at least!). I'll probably write it in python using the Tale library. Let's see what I can come up with!

superMDguy commented 7 years ago

I think it'd be cool to have an infinite world which you can explore that's generated during play, but that would make it hard to quantify the word count. In order to meet the 50,000 word requirement, I decided to write a program that writes the code for the text adventure story, using the Tale library.

Here are some thoughts about things I'd like in my text adventure:

  1. Multiple connected rooms. This one is kind of obvious.
  2. Obstacles. Something like a bear or a locked door. All obstacles will require an item to get past them. This will give continuity and flow to the game as a whole, as once you get past one obstacle, you'll need to find the item for the next obstacle, etc.
  3. Enemies. A subset of obstacles. These are possibly living obstacles that actively try to stop you, instead of passive obstacles, like a locked door. They'll have the ability to regress your progress.
  4. Winning. Maybe I'll have a 'trophy case' at home base like in Zork, where you have to collect all the items to win the game. Or maybe I'll have a specific 'goal room', which makes you win once you survive inside.
  5. Dialog. If I have extra time, I'd like to have some creatures/beings that can be talked to. I'd just make a chatbot, probably using specific templates.

Hopefully all these elements will mix together to create an engaging game. That's the ultimate goal, I want it to be novel (no pun intended) and fun to play. I think that it'll really help that a human is really controlling the game, because that will give it a human and therefore more realistic quality. Time to start coding...

superMDguy commented 7 years ago

Repo: github.com/superMDguy/InfiniteAdventure After some research, I've decided to go with Inform7 instead of Tale. This will make it a lot easier to generate the code than it'd be to generate a python program. Inform also has a lot more capabilities than Tale.

Here's what my plans are for final deployment: User goes on website -> Python server automatically writes Inform code based on templates -> Server executes code to compile Inform code, and save it as a web interface -> User is redirected to the web interface -> User plays game, maybe with an option to save progress/download game.

I'll also add settings for how many rooms are in the game. I'll divide rooms up into sections. Each section will have about 10 interacting rooms, and one overarching goal needed to 'escape' from the section. This will make it easier for the player to hold all of the story in short term memory. It will also provide organization and structure for the story.