Results 1 to 6 of 6

Thread: Card game problem

  1. #1

    Thread Starter
    Member nXt's Avatar
    Join Date
    May 2001
    Location
    UK
    Posts
    37

    Question 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

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    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.


  3. #3

    Thread Starter
    Member nXt's Avatar
    Join Date
    May 2001
    Location
    UK
    Posts
    37
    thats an option, thanks.

    could u advise me how to go about that though? Im not to sure.

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    VB Code:
    1. Private Type typCard
    2.     Name as String
    3.     PictureFile as String
    4.     Power as Integer
    5.     Value as Integer
    6. End Type
    7. 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:
    1. 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.


  5. #5

    Thread Starter
    Member nXt's Avatar
    Join Date
    May 2001
    Location
    UK
    Posts
    37
    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

  6. #6
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    in a module:

    VB Code:
    1. Type typCard
    2.     Name as String
    3.     PictureFile as String
    4.     Power as Integer
    5.     Value as Integer
    6. End Type
    7. Global Cards(1000) as typCard
    8.  
    9. Sub_Main()
    10.     Cards(1).Power = 4
    11. 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
  •  



Click Here to Expand Forum to Full Width