Results 1 to 9 of 9

Thread: Adding High Score to my black Jack! Need help PLZE

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13

    Thumbs up Adding High Score to my black Jack! Need help PLZE

    I have made a Black Jack program, i need to make a highscore for it. My plan is to use wordpad because I understand how to pull text and stuff like that off it, also i know how to put data into it.


    First, can I pull data from wordpad like a # and make it a integer?
    'I want the score to be in order. using ints, i can do if then... statements. so what i am mainly trying to do is. :

    The user hits exit, if user has a "High Score" then let user type in his name through a textbox, save user name and his score (into wordpad), then display higscore by retreiving all the data off of word pad, user then looks at high score then leaves my Program.

    I know how i could make a high score through another form that is premade and has highscores,

    The reason for wordpad is that it will save the data there so evan if they turn off there comp, the next time they get on they are still a "High Score user" and there name and score will be there because i saved it into data!



    Any help is good i am still a (noob..) and thank you to all who take time and help me out Thx agian, Seth

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    Try looking into the SaveSetting and GetSetting functions. They save data to the registry (cleaner than files). If you need help, there are plenty of topics on them here on the forums.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13

    ...........?

    Ok, so if i used that style, (registry stuff) how would i make a list of ten ppl with scores and have it in order! then if you played my game and beat all the high scores that you become the high score! so it stays in order. and boots the last guy off.


    ...........What would be the vb code : ?









    thx again Seth,

  5. #5
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Just save it in plain text....thats the easiest way for you. Just make a file, open it up and read the lines that should be something like:

    Mark 1002
    Tom 876

    and so on.

    Read them into an array. If you make a strukt of type String and Int then you can look at the int part to calculate if anyone has beaten any of the records. Then you can put the new score into that place, and move the others down....

  6. #6
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    or you could make it binary....which will make it harder to fake.
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  7. #7
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Or you could encrypt it or use steganografi.......I don't think that is the point here....

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13
    Okay i made a wordpad file called "score"



    open "U:/black jack/score" for input as #1 'This is how i will open my file. (To read the wordpad)

    AND

    open "U:/black jack/score" for output as #1 'This is how i will put data into wordpad.


    Please review above information to make sure it is true!


    so lets say i have a list of ten people,

    mark 100
    sally 97
    ect....

    What is the code i should use to pull the names off wordpad and there score. then let the player of my game put in his score, change info in the wordpad so it is in order


    (example)
    mark 100
    sally 97
    ect....


    lets say i get a score of 98. then i type in my name then it displays in order!

    mark 100
    Seth 98*****
    sally 97
    ect....


    there will only be a list of ten so i will need to boot off the 10th player on the highscore to make room for the new high score. (if that made sense)


    thx agian, Seth


    GL HF DD

  9. #9
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    While I personally would still use the registry, you can try a bubble sort (search for 'bubble sort' and you should get about a trillion results on these forums). If you include all eleven in the bubble sort and only save the top ten, that should solve all your problems.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

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