Meh

posted in DruinkJournal
Published March 09, 2006
Advertisement
Well, I made everything I could use templated free lists. Now I don't need to call new/delete at all in my main game loop on the server. Which is A Good Thing. I also fixed pinging in the login server (It'd cause the game servers to time out immediately), and now if the login server disconnects from the game server, the game server will try and reconnect.
Also, if you exit the login server from the GUI, it sends a shutdown message to all of the game servers, so I can shutdown everything that way.
Technically, I should tell all the game servers to shutdown, and when they get told to shutdown, they should disconnect all clients and free all resources, then tell the login server they've shutdown before exiting; so I can tell if there's any game servers mis-behaving. Although I think that's unnessecary.

I also need to do some proper shutdown code in the game server; I.e. process all pending DB queries, instead of terminating the worker thread and throwing everything away. That's a great way to loose information. Well, that'll take about 30 seconds to fix anyway.

I didn't get around do doing anything major with zones, but zones are now read from a file when the server starts up, and all characters have a zone ID (index) in the database, and are stuffed in the correct zone when they connect. Things to do:
  • Send a message to all clients in a zone when another client connects to the same zone
  • Send a message to all clients in a zone when another client disconnects from the same zone
  • Allow clients to move from zone to zone, and send appropriate messages
  • Save the clients info back to the DB when they disconnect (For persistant storage)
  • Allow "chat" messages to be sent to/from all users in a zone
    And in the long run, after I've done a bit of stress testing, but before I move to the real client app:
  • Buddy lists

    Right, Bed. I have to be up in 9 hours...
  • Previous Entry Code tidy
    0 likes 0 comments

    Comments

    Nobody has left a comment. You can be the first!
    You must log in to join the conversation.
    Don't have a GameDev.net account? Sign up!
    Advertisement
    Advertisement