Results 1 to 4 of 4

Thread: Hiscore

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    5

    Question Hiscore

    Hi again!I am almost to finish my game but I have one problem.I want to make a hiscore table showing the best 3 players of the game and updated automatically when someone do better score.I have something in my mind but I would like to create it in a class module so it's difficult.I have written the lander game but I don't prefer to save in the registry.Any suggestions?

  2. #2
    pjvdg
    Guest
    You could do it in the registry or just simply in an external file, but make sure you encrypt it.

  3. #3
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    There's no need to encrypt it, just save the names like this:

    VB Code:
    1. 'To write it:
    2.  
    3. Open App.Path & "\highscore.dat" For Random As #1
    4.  
    5. Write #1, Player1Score
    6. Write #1, Player1Name
    7. Write #1, Player21Score
    8. Write #1, Player2Name
    9. Write #1, Player3Score
    10. Write #1, Player3Name
    11.  
    12. Close #1
    13.  
    14.  
    15.  
    16. 'To read it:
    17.  
    18. Open App.Path & "\highscore.dat" For Random As #1
    19.  
    20. Read #1, Player1Score
    21. Read #1, Player1Name
    22. Read #1, Player21Score
    23. Read #1, Player2Name
    24. Read #1, Player3Score
    25. Read #1, Player3Name
    26.  
    27. Close #1
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    There's a highscore table in one of my games, using INI files. The game can be found at my old site (http://psprogramming.virtualave.net/...eattackdx.html), the highscore loading and saving code is in the clsHighscore class module...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

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