|
-
Apr 21st, 2002, 06:49 AM
#1
Thread Starter
Member
Card game problem
Im creating an online card game but im a bit stuck. I want to have thousands of cards but storing each cards data is causing problems.
I was going to store them all in an access database but it means when i distrubute the game people can just load it up and see all the cards and their attributes which i don't want. I know its possile to encrypt a database which a friend of my'n was explaining to me.
I was just wondering if anyone had a better solution than a access database. (Im trying to to make it as fast as possible too, i dont want a pause when loading card information if possible)
Cheers
-
Apr 21st, 2002, 06:55 AM
#2
Not NoteMe
If you arn't planning to change the card's attributes you could hard-code them in a lookup table (or simple array) in VB.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 21st, 2002, 06:56 AM
#3
Thread Starter
Member
thats an option, thanks.
could u advise me how to go about that though? Im not to sure.
-
Apr 21st, 2002, 07:12 AM
#4
Not NoteMe
VB Code:
Private Type typCard
Name as String
PictureFile as String
Power as Integer
Value as Integer
End Type
Dim Cards(1000) as typCard
Then in somewhere, like in Sub_Main() go through each card, setting up the properties.
To reference them in your code do something like this.
VB Code:
If Cards(1).Power > Cards(2).Power Then MsgBox "Game Over"
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 21st, 2002, 07:19 AM
#5
Thread Starter
Member
thanks. i dont really wanna fill up my coding with 1000 of card decs. Is there a way i could implement that information from another module or something like that
-
Apr 21st, 2002, 07:36 AM
#6
Not NoteMe
in a module:
VB Code:
Type typCard
Name as String
PictureFile as String
Power as Integer
Value as Integer
End Type
Global Cards(1000) as typCard
Sub_Main()
Cards(1).Power = 4
End Sub
Then you can use them anywhere in your project.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
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
|