Click to See Complete Forum and Search --> : Game Server Logic/ WCF Singleton Service Question


Grofit
June 23rd, 2009, 08:04 AM
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...

Arjay
June 24th, 2009, 08:34 PM
Why not code it up and run some fake clients against it?

Grofit
June 25th, 2009, 02:05 AM
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...

Arjay
June 25th, 2009, 08:24 PM
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.