Results 1 to 8 of 8

Thread: Online Game

  1. #1

    Default Online Game

    Hi,

    I've been looking around at various SDKs to use for an online game I am planning to make. ClanLib seems to be the best by far for what I'm looking for. Basically I want to make a simple turn based online card game, however it needs to have a central server with player accounts with each players info stored. Once connected a player can see a list of online players and select another player to play with.

    Where would people recommend I start looking in order to get some kind of account authentication set up to start with?

    Thanks in advance

    EDIT:: I'm using version 2.1.1 btw

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Check out the DiceWars example. It is kinda large, but it has multiplayer capabilities with a simple lobby where you can join games etc.

  3. #3

    Default

    Quote Originally Posted by sphair View Post
    Check out the DiceWars example. It is kinda large, but it has multiplayer capabilities with a simple lobby where you can join games etc.
    Awesome this is perfect for what I'm looking for. The only feature I really need to add is to store player info on the server in account form. How would you suggest best implementing something like this? Would it be easier to use a database or just use XML files to store username and password along with card available to the player?

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Storing the password is a very tricky issue.

    The general rules are:
    1) Never store passwords in plaintext.
    If your server is hacked, and someone steals the database, they have all your users passwords.

    2) Do not invent your password encryption scheme.
    Unless you are an expert in cryptography and you are 100% sure your code is correct.

    3) Be careful of md5. (From wikipedia : US-CERT of the U. S. Department of Homeland Security said MD5 "should be considered cryptographically broken and unsuitable for further use )

    4) Ensure the password scheme cannot be cracked using rainbow tables.

    At the moment ClanLib does not have cryptography support. Maybe in the future it will have direct support of SHA-2.

  5. #5

    Default

    Quote Originally Posted by rombust View Post
    Storing the password is a very tricky issue.

    The general rules are:
    1) Never store passwords in plaintext.
    If your server is hacked, and someone steals the database, they have all your users passwords.

    2) Do not invent your password encryption scheme.
    Unless you are an expert in cryptography and you are 100% sure your code is correct.

    3) Be careful of md5. (From wikipedia : US-CERT of the U. S. Department of Homeland Security said MD5 "should be considered cryptographically broken and unsuitable for further use )

    4) Ensure the password scheme cannot be cracked using rainbow tables.

    At the moment ClanLib does not have cryptography support. Maybe in the future it will have direct support of SHA-2.
    Hmm, I thought this would be an issue.
    I know that MySQL can use either MD5 or SHA-2 encryption on it's data entries, although I suppose that it would need to be decrypted again in ClanLib. I'm writing this game as part of a University project so MD5 would be acceptable if only to highlight the fact that security on passwords is an issue, does ClanLib support MD5? If not could anyone recommend some cryptography libraries?

    Thanks.

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Humm, apparently clanlib does support sha1:

    CL_HashFunctions::sha1() - http://clanlib.org/docs/clanlib-2.1/...Functions.html

    I learn something new about clanlib every day

    I don't know about md5 or sha-2

  7. #7
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    For storing the users, you could use an Sqlite database, which ClanLib has an API for. Read the overview at http://clanlib.org/docs/clanlib-2.1/.../database.html.

    Or just use some simple files

  8. #8

    Default

    Excellent, thanks guys.
    Think I might save each user in individual XML files, there's not a huge amount of data to be stored so think it would be easiest. But I may have a look at the SQL API too, would probably be the best choice in the long run .

Similar Threads

  1. Online resource for music, sound fx and voiceover
    By Shockwave-Sound.Com in forum RTsoft Tavern
    Replies: 3
    Last Post: 04-16-2008, 04:31 PM
  2. Feature Request: Online play?
    By DarthDie in forum Novashell Game Creation System
    Replies: 6
    Last Post: 06-05-2007, 10:52 AM
  3. ever thought of dink smallwood online?
    By in forum RTsoft Tavern
    Replies: 0
    Last Post: 12-12-2004, 05:42 PM
  4. Dink Smallwood Online
    By Octavious in forum Dink Smallwood HD
    Replies: 1
    Last Post: 08-13-2004, 01:27 AM
  5. Online Again
    By in forum Funeral Quest
    Replies: 1
    Last Post: 02-13-2004, 06:56 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •