Results 1 to 5 of 5

Thread: Server Data Strategy

  1. #1

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    Cool Server Data Strategy

    I'm new at programming games, what I have is a text based game that gathers information from a central server, plugs it into the VB app and allows you to mess around with your guy, train him, whatever, then updates the information and experience to the server. Then you can fight other people with your character.

    Basically, I'm trying to figure out how most of these type of games are done. I was thinking about connecting to the MySQL Database with an MyODBC on the client computer but I ran into a few problems. How do I create the client ODBC on their side and what is going to prevent them from using that ODBC, creating their own app with it, and then playing with my server information.

    Now I don't know if this is the best way to do it or not. Perhaps use a random access file on the server... but I would assume that would be very slow.

    How would you go about doing it, if you have done this in the past. Any feedback will be helpful.


  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Try using encrypted data, and an encrypted password to prevent that.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    The way I would do it is that you have a program running on the server. IE the server application itself.

    The server application would keep all of the information in memory, ready to send to a client if needs be.
    So the server just listens for connections (with the Winsock control).

    When a connection is established, then the client asks for some info etc. or whatever.
    You could also, as sastraxi said, encrypt the data.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Member
    Join Date
    Jul 2001
    Location
    Minneapolis, MN USA
    Posts
    32
    Anytime you have a client pull information from a server, modify it, then push it back to the server, you're opening yourself up for the possibility that you stated: Someone may write their own app and mess with that info, or worse -- your server.

    So, encryption and password-protection helps out a lot. (Quick plug: If you'd like a self-contained encryption DLL to use with your VB programs, check out home.earthlink.net/~mattandbritt/BrickCnP.htm ...)

    And plenderj presents a decent model to use -- have a server-side app running to send/receive data from clients. You will then have the master database on the server and have good control over what data gets distributed under what conditions.

    You'll then need a smaller version of that database on the client machine (or, if the data if small enough, maybe just a simple data file) for keeping track of what the client has.

    Then, it becomes a normal distributed database problem ... how to keep things in sync between the server and client, and make it so that people can't cheat ...

    -Bryk

  5. #5

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    Cool

    these are all great ideas... thanks

    I think what I'll try to do is have the main DB on the server, let the winsock control (totally forgot about that one) determine what gets sent and where, then just hold the values in variables... play with the variables and when the player closes down the program, before it is unloaded, upload all the info. No data files or DBs at all on the client side will help keep from letting cheats get threw. Thanks for all the feedback.

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