Sign in to follow this  

Text Adventure/RPG in Python - Help

This topic is 4201 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

Hey everyone - I've recently started learning Python as my first programming/scripting language with the goal of creating a text adventure game as a first somewhat ambitious project, and then moving on towards a more ambitious idea of a text RPG. I've been learning a lot of small snippits of Python here and there and working on many small tutorials that introduce various core concepts about the language and programming in general. What I would absolutely love though is a tutorial involving the creation of either a text adventure game in Python, or, a text RPG. I've done a lot of googling and research, but I've been unable to find anything resembling what I'm looking for. I figured if anyone knew where to find something like that, they'd be in this community. Can anyone send me in the right direction? Much thanks, -M

Share this post


Link to post
Share on other sites
Yeah, my hosting sucks. Assuming Rob doesn't still have his mirror up of the stuff, you can PM me an email and I'll send it off (I'm treating it as public-domain code, because even if I wanted to integrate it into a tutorial or something, there are more than a couple things I'd want to improve - at least in the C++ version ;) )

This was actually an odd project. I first wrote a menu system in C++, in order to illustrate certain technical issues of C++ I/O for beginners. Then I built CYOA around that, as a way of testing the system (after all, a choose-your-own-adventure book is basically a series of "menus" with unusually long menu titles and choices that only ever link to other menus or report "The End". :) ) Then, finally, I redid the whole thing in Python, for the sake of comparing the languages.

Share this post


Link to post
Share on other sites
Yeah - I'm pretty settled on Python as my language simply because it's the easiest language for me to look at - not very cryptic - and it's fast to test things out in (not to mention it's powerful enough to do what I want it to do), but I'm pretty surprised about the lack of documentation about creating the type of project I want to do in it.

Share this post


Link to post
Share on other sites
I don't think you should be surprised; with an uncommon language and an uncommon game type, the statistical chance of seeing such a tutorial is fairly low.

If Zahlman's code doesn't help, you may do better by asking some directed questions regarding the best way to approach it. Start small: have a few room descriptions in a list, store the player's location as an index into that list, then implement a simple "display room -> request input -> move player according to input -> repeat" loop. I'd hardcode the commands to begin with, then create the proper versions once you're confident that the rest is working.

Share this post


Link to post
Share on other sites
Quote:
Original post by Zahlman
Yeah, my hosting sucks. Assuming Rob doesn't still have his mirror up of the stuff, you can PM me an email and I'll send it off


Question answered? :)

Share this post


Link to post
Share on other sites
I think a good document for learning Python and to help you with your Text Adventure would be www.byteofpython.info. It is an online book that you can download onto your computer, and has plenty of information for newbie python users, like me, and provides loads of examples. Check it out if you are interested, and you can even print it like a real book, although its like 96 pages.

N00bGaMeR

Share this post


Link to post
Share on other sites
Quote:
Original post by Zahlman
Assuming Rob doesn't still have his mirror up of the stuff, you can PM me an email and I'll send it off.
Yeah, in the move over to Drupal, I lost all of my miscellanious files on my server. I'll get some kind of system working again. In the mean time, mind emailing me the love too?

Share this post


Link to post
Share on other sites

This topic is 4201 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this