Results 1 to 10 of 10

Thread: text based game

  1. #1
    matrixau
    Guest

    text based game

    help me pls

    i want to make a text based game where u type in values and stuff happens

    BUT

    what i want is where can i store the values

    because there will be alot of different ones like


    networth = 1
    money = $100
    food = 500 bags


    so i want it to be able to be easy to access when i need it

    there will be alot like 50 or so


    so how would i do this

    a file or something

    also where is some info on what u come up with

    thanks

  2. #2
    Hyperactive Member ZeroCool's Avatar
    Join Date
    Feb 2002
    Location
    In front of my computer
    Posts
    423
    you Could make 50 or more text files but i don't think you would want to do that you might wanna try a database
    Visual Baisc 6 (SP5)
    Windows Xp

  3. #3
    Hyperactive Member Janaka's Avatar
    Join Date
    Nov 2001
    Posts
    277
    Why not use a array and use structure data type or class to hold values, etc

  4. #4
    New Member
    Join Date
    May 2002
    Posts
    11
    Even though an array would be the most effecient way to store all of the fields, it might be hard to remember what element was linked to what field.

    A database would work pretty well, but they're not always easy to make connections like they should (That's why I'm surfing through here)

    If it is going to be a text-based game, why not use text fields? You should have no trouble from accessing your variables with a low-spec program, plus it will keep everything in order, and easy to remember variable-names will keep everything in order.

    ~Looseclothes Prophet

  5. #5
    Megatron
    Guest
    If it's just 50, I would suggest using a file.

  6. #6
    Lively Member
    Join Date
    Jan 2002
    Posts
    76
    An array wouldn't be difficult. You setup constants to represent particular items. They don't take up RAM because constants are managed at compile time and they make the programming easy to read.

  7. #7
    matrixau
    Guest
    well it needs to be easy to find


    because i will have different pages tryin to access the values

    so it cant really be 1 file because it will be hard to find the value

    eg. line 33 could be networth
    and line 2 could be something else

    also where could i get info on arrays?

    thanks alot

  8. #8
    WorkHorse
    Guest
    You can use arrays, user defined types, or a database. You can search the forums for arrays, but you'll be better off buying a book on basic VB prgraming. Sams has some good books. There are some decent tutorials on the Internet if you do a bit of searching. I'd use an array with a UDT for 50. Holding values for 50 players won't take much memory. 50 isn't a lot. 50 million is a lot.

  9. #9
    Megatron
    Guest
    Does this game allow you to add more than one player profile? Or is it set at 1?

  10. #10
    vshammas
    Guest
    it sounds like the task you are facing is too complex for your current skill level...if you dont yet know much about arrays you should start out small with a little application or something. they are so much more satisfying than games because they can be made almost 100% bug-free, and are just as fun, especially if they can do something you always wished your OS could do but cant..hehe, if you see what im saying...games are also sad to make because you always feel that they are no good compared with what is for sale... heheh..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width