Interactive Fiction?

This is a discussion on Interactive Fiction? within the Game Programming forums, part of the General Programming Boards category; So me and my friends are basically the biggest role-playing nerds ever, and we all love adventure games. We basicly ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    6

    Interactive Fiction?

    So me and my friends are basically the biggest role-playing nerds ever, and we all love adventure games. We basicly write adventure games out on paper, get the group together, and play them. But lately, we have all decided that it would be more fun to code computer based adventuree games. Basicly, I want to know how to go about doing this. Basically the games will be in the style of Zork or Colossal Cave Adventure. At this point, I have a few questions about how I will go about making this game.

    1: How do I go about making the players input thing to move around, pick up objects, ect.?

    2: How do I make an inventory that the player can check?

    That's all I can think of know, but I might have some more questions as I get more into programming the game. Thanks in advance.

  2. #2
    Registered User BuzzBuzz's Avatar
    Join Date
    Feb 2009
    Posts
    89
    It all depends on how much experience you have with coding to begin with.

    The quick answers to question 2 is vectors or arrays (depending on what you want to do - vectors is the most likely route though). Question 1 is answered by your choice of answer related to Question 2.

    If you're new to C++ then you could do worse than getting hold of "Beginning C++ Through Game Programming" by Michael Dawson - that takes you through pretty much everything you need to know (except streams) about text game programming including "adventure" games while teaching you C++.
    Any help I give may be classified as:
    The Blind leading the Blind...
    Currently working through:
    "C++ Primer Plus"

  3. #3
    Registered User
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    6
    Quote Originally Posted by BuzzBuzz View Post
    It all depends on how much experience you have with coding to begin with.
    I sorta a noob, I understand the basics but have yet to accualy code somthing that wasn't just testing to see how stuff works.

    Quote Originally Posted by BuzzBuzz View Post
    The quick answers to question 2 is vectors or arrays (depending on what you want to do - vectors is the most likely route though). Question 1 is answered by your choice of answer related to Question 2.
    I tried to read some tutorials on vectors and arrays, but don't really understand them all that well. How could I use the to make an inventory?

    Quote Originally Posted by BuzzBuzz View Post
    If you're new to C++ then you could do worse than getting hold of "Beginning C++ Through Game Programming" by Michael Dawson - that takes you through pretty much everything you need to know (except streams) about text game programming including "adventure" games while teaching you C++.
    Unfortunately, I don't think I will be able to get a hold of that book, or any programming book, really. I can't find any bookstores that carry them, and I'm not old enough to have a credit card, so I can't order them off the internet either.

  4. #4
    Registered User
    Join Date
    Apr 2009
    Posts
    1
    As it happens, there are some special programming systems just for writing interactive fiction. You might be interested in Inform or TADS:

    Home : Inform

    TADS - the Text Adventure Development System, an Interactive Fiction authoring tool

    Either of these will take care of all the basics of parsing player commands, tracking inventory, etc., for you.

  5. #5
    Registered User
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    6
    Quote Originally Posted by chrysanthemum View Post
    As it happens, there are some special programming systems just for writing interactive fiction. You might be interested in Inform or TADS:

    Home : Inform

    TADS - the Text Adventure Development System, an Interactive Fiction authoring tool

    Either of these will take care of all the basics of parsing player commands, tracking inventory, etc., for you.
    Well, I kind of wanted to do the games in C++, not only because I wanted to make the games, but also because I want to learn C++.

  6. #6
    Registered User BuzzBuzz's Avatar
    Join Date
    Feb 2009
    Posts
    89
    Well, if you really want to do it as a way to learning C++ then it's not a bad way to get into it.

    You will need to understand how arrays and vectors work though to be able to do pretty much anything efficiently. Have another look those tutorials and use them as a basis for something simple that is relevant to you - I wrote a program using structs and arrays that gave information on James Bond films to get my head around them when I first encountered them.

    Your best bet is to work out what you want to do, write it out in pseudocode so you know where you're going and then give it a bash. If you need help with something then that is what this forum is for.
    Any help I give may be classified as:
    The Blind leading the Blind...
    Currently working through:
    "C++ Primer Plus"

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Also, when you get to graphics try the SFML library. It's nicely organized for C++ and it's portable so you won't get sucked into Microsofts crap like I did.
    Fried chicken for everybody!
    -Kernel Sanders

  8. #8
    Registered User
    Join Date
    Apr 2009
    Posts
    8
    Hey,

    If the original poster is interested, I have a good example project in c++ demonstrating a simple text based adventure game. I think it has an inventory system, too. Post back if you want it.

  9. #9
    Registered User
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    6
    Quote Originally Posted by sbrundage81 View Post
    Hey,

    If the original poster is interested, I have a good example project in c++ demonstrating a simple text based adventure game. I think it has an inventory system, too. Post back if you want it.
    Yes, an example would defiantly help a lot.
    Last edited by ThyJuggla; 05-02-2009 at 01:07 PM.

  10. #10
    Registered User
    Join Date
    Apr 2009
    Posts
    8
    What's your email?

  11. #11
    Registered User
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    6
    Quote Originally Posted by sbrundage81 View Post
    What's your email?
    thyjuggla@hotmail.com

  12. #12
    Registered User
    Join Date
    Apr 2009
    Posts
    8
    Sent. It's in .rar format, hope that's ok.

  13. #13
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    You could post your game in the games sticky thread if you wanted to. I for one would probably look at it.

    P.S. Thanks for the links in this thread, very useful . . . I would have suggested the SDL instead of SFML, but that's because I haven't heard of SFML before.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# Interactive Fiction -- Need some ideas on something
    By Iyouboushi in forum Game Programming
    Replies: 12
    Last Post: 01-11-2008, 03:24 PM
  2. The Interactive Animation - my first released C program
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 48
    Last Post: 05-10-2007, 02:25 AM
  3. programming for interactive tv guide
    By newprogrammer27 in forum C Programming
    Replies: 1
    Last Post: 04-05-2007, 08:57 AM
  4. Replies: 8
    Last Post: 01-04-2004, 11:01 AM
  5. Interactive linux tutorials< Know of any?
    By Polymorph in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-23-2002, 08:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21