• Advertisement
Sign in to follow this  

Need help with programming a text adventure game in python (New Programmer)

This topic is 1710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I'm new to the forum as well as game development.  I would like to know first and foremost the process of creating a text-based adventure game with Python.  I have almost no experience with the language and I would like this to be my first program because of my love for text games.  Would anyone be able to give me a run-down of what the skeleton might look like? Nothing too complex at all.... but just some tips and strategies for a first time game developer.  

 

Your help is much appreciated,

Michael Auer

Share this post


Link to post
Share on other sites
Advertisement

Having almost no experience at all, I'd start off small and simple.  The basics you need to understand are how to receive and parse input text from the player, and how to present output text to the player.

 

Receiving input text from the player is fairly easy.  Parsing that input can be anywhere from easy to quite difficult depending on how complex you want the input to be.  Obviously it's best to start with simple input and expand from there.

 

Outputting text is again fairly easy.  The challenge on this side (thought not exactly a significant challenge) is formatting the output so it's presented in an aesthetically pleasing way.  Color coded text is a nice touch.  Keeping stats properly aligned and easy to read is essential.  There really isn't anything on the output side that isn't achievable in even a simple first game though.

 

On the plus side, most tutorials start off as console based apps, since that is the easiest I/O to work with, so it should be easy to find tutorials that give you the basics of working with keyboard input and text output.  From there, it becomes more a matter of what kind of text adventure you want to create.

Share this post


Link to post
Share on other sites

A skeleton for a text adventure game would be similar to just about any other game, albeit on the simpler side. The only difference is how you get input and display the output, in this case parsing text and printing ASCII instead of responding to a gamepad or mouse click and drawing actual images.

 

But when it comes to the skeleton, as I said it is very similar to any other game. You still require all the same classes and need to keep track of all the same variables.

Share this post


Link to post
Share on other sites

If the learning Python is not the primary issue but making text-adventures game you may also look on languages which are specifically created for this task. 

Here you can find some summary: http://www.brasslantern.org/writers/howto/chooselang.html

The Inform 7 looks very interesting for purpose nonetheless learning Inform 6 and other more standard text-adventure languages

would tell you more about the structure of this kind of programs. Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement