Results 1 to 6 of 6

Thread: Highscores?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Highscores?

    I am building a game project for a school project. User gets points for completing certain tasks. I have it all coded - curious as how I should do high score table.

    I was thinking an Access DB, but that seems like total overkill.

    Does XML seem reasonable?

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,107

    Re: Highscores?

    If the table is small and will not keep adding rows, then XML does seem reasonable. Of course, anybody can edit XML with Notepad, so that may be a consideration. Other than that, serializing/deserializing a datatable to XML will be easy.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: Highscores?

    Quote Originally Posted by Shaggy Hiker View Post
    If the table is small and will not keep adding rows, then XML does seem reasonable. Of course, anybody can edit XML with Notepad, so that may be a consideration. Other than that, serializing/deserializing a datatable to XML will be easy.
    How hard is it to encrypt & decrypt it? A native way is preferred

  4. #4

    Re: Highscores?

    You could use TripleDES. There's a Provider in the Cryto namespace.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: Highscores?

    Ya it's not like I need a super secure encryption - it's for a school project.

    I don't want to include someone else's code in my project - the simpler the better.

  6. #6
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: Highscores?

    I wouldn't even use XML. You could have a format like this:
    Code:
    SCORE:NAME
    SCORE:NAME
    SCORE:NAME
    And you wouldn't even have to escape anything because the score is always a number and won't ever contain a colon. Hopefully the name won't contain a newline.

    A good and simple scrambling system might be to take the characters in the file and interlace them - take the first character of the first half, first character of second half, second character of first half, etc... it would be very easy to encrypt/decrypt with a program, and possibly easy to read manually, but not write... so it would be pretty safe if you're just looking for something that would stop people changing things about easily. (After all, they could always just look at your Triple DES key stored in the program!)

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