|
-
May 2nd, 2002, 04:19 AM
#1
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
-
May 2nd, 2002, 04:23 AM
#2
Hyperactive Member
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
-
May 2nd, 2002, 04:29 AM
#3
Hyperactive Member
Why not use a array and use structure data type or class to hold values, etc
-
May 2nd, 2002, 02:57 PM
#4
New Member
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
-
May 2nd, 2002, 03:12 PM
#5
If it's just 50, I would suggest using a file.
-
May 2nd, 2002, 03:13 PM
#6
Lively Member
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.
-
May 2nd, 2002, 10:27 PM
#7
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
-
May 3rd, 2002, 12:27 AM
#8
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.
-
May 3rd, 2002, 03:56 PM
#9
Does this game allow you to add more than one player profile? Or is it set at 1?
-
May 3rd, 2002, 06:56 PM
#10
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|