Jump to content
  • Advertisement
Sign in to follow this  
Marathon

Text Adventure/RPG in Python - Help

This topic is 4417 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
Advertisement
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
I would be really interested in seeing the Python version of this myself. :O

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!