CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2006
    Posts
    357

    Game Server Logic/ WCF Singleton Service Question

    Hey,

    Im working on a project at the moment that contains alot of WCF services, however one of the services is getting to be quite large and im not even sure if what i want is possible...

    Now simply speaking its a multi user game, but in each game room (of which there can be many) there can be up to 8 players, and there can be lots of other entities in there... now there are duplex connections set up between each of the 8 players to be notified of changes in the other players positions etc. That bits simple enough and works fine, although there may be a better way... at the moment my service stores a dictionary<uint, RoomNode> and each RoomNode stores the data about who is active and some other information.

    However at the moment im wondering on how to progress with how to get the other entities to do anything, now i can either have a timer that about 10 times a second updates the *AI* (although it wouldnt really be anything more than following a target) which would update the state and position, but would this work within a singleton service, and if i am having lots of rooms, lets say i have 10 rooms active with 8 people in each and each room has 20 entities, that would be like 200 AI path updates, but i cant think of any way round this as if i get players to do the logic of the entities, then they would have to send the updates over to the server for it to be synced up with others, and also its slightly vulnerable to people messing with it too...

    Sorry if im being a bit vauge, but im basically wanting to run a multiplayer server within a WCF singleton thread (for the moment it would be put on shared hosting online, which would be fairly slow as a test to see if it would be popular enough to warrent some meaty hardware)

    Any help on the game logic or the WCF service point of view would be great...

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Game Server Logic/ WCF Singleton Service Question

    Why not code it up and run some fake clients against it?

  3. #3
    Join Date
    Nov 2006
    Posts
    357

    Re: Game Server Logic/ WCF Singleton Service Question

    Guess i could do but i would need some way to start/stop these clients, i guess i could have some sort of duplex events that close the clients but i dont know how i could spawn them whenever i wanted... Good idea though... Also unless i do them as named pipes (if i can get a decent way of spawning and removing them) im going to get rubbish performance if im having to spam out thousands of fake clients on the box...

    Anyone have any info on how mmo games manage their world creatures and pickups etc on their servers?

    Im currently trying to just write a server manager with server entities so its in no way tied to WCF, then just hook up events to that... im not sure if it will be ideal or work, but i can thread out creature updates and do some other stuff to control the rest of the system... i guess its gonna be alot of trial and error...

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Game Server Logic/ WCF Singleton Service Question

    There are some load test products out there that can be used to simulate the clients. You might be able to find some free ones.

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

Featured