client or serverside? mmorpg

Started by
6 comments, last by Dorgbar 20 years, 6 months ago
hello im working on a mmorpg a we have alitle problem. We dont know how the server should be, we are have two opions the first one is to make any calculations serverside, so the clients(players) only need to send some request and the server calcualte it, then there will be some gamemasters/storytellers witch allso are able to do some of the calculation. there might allso be a small program you could download as a sponsor program witch could do some of the work. The benefits of this system is: very difficult to cheat, the clients pcs dont need to do the calculations, The penalties: need a very big server, the game cant take that many players at once, System nr2 is to make all of it clientside. any calculations should be done on the clients(palyers) PC. Then we will cryptate the sourcecode and try to make it save, so that no hackers is allowed to decryptate and cheat that way The benefits: the server do only need to make a few calculations, the server will be able to handle more players, The penalties: Its a safety risk, witch system is the best one, or is there a even better one ? Thanks for the attention
Who Knows??? Who Cares???
Advertisement
I would suggest having zero trust in the client. Which means that anything and everything comming from the client must be validated. If you trust the client to send correct data then I can guarentee you 100% it will be hacked.

There are serveral different ways around this like having a set of clients calculate the same value and then they all send it to the server, which, if they all match, accepts this calculation. But this is more work and more complex.

As in interesting study you may want to seach out some ''cheat'' programs that are available for Everquest and see what sort of data they can snoop on.

-------
Andrew
PlaneShift - A MMORPG in development.
ok thanks.
thats my point of view too.

how do you solve the problem in planeshift?

how large/fast is planeshift''s server(s)?

how many players can play at once whitout lag/delay?

that might give me an idea of how large a server i need.
Who Knows??? Who Cares???
We have 0 trust in our client. We just use the client to take input from the player and display images. The server tells ( ie calculates ) everything else a client needs to know.

We are using a linux server that has been donated to us by a web/game hosting company and is only using about 3-5% of the CPU. The mysql daemon uses more . I am not sure exactly the processor though, I think it is a 2 GHz machine.

It only uses about 5-10 kbps on average so the net traffic is fairly small ( this is with about 25-30 online average ).

We have several techniques ( like dead reckoning prediction ) to keep latency issues down so dropped data is not as noticable ( ie players don''t jump around much ).

We also are designing several apps that can connect to the server to help offload some of the load. One of these is a NPC brain which can control a group of npcs. This can be on the server machine or offloaded onto another machine and communicate over the network. We can add more instances of this app as we get more NPCs.


At the moment we are not worried about hosting a million players. Small steps



-------
Andrew
PlaneShift - A MMORPG in development.
Well i don''t know if this is the right place to write, but the subject is kinda the same...
I am having problems finding out if the clients should do a lot of the calculations, and only the server should do the storaging. The problem with the server doing all the work, is that ALL actions in the game need calculation. If the server should do all the calculating, that would meen that it had to do mySQL searches between about 50.000 items all the time...
So im trying to fix it somehow with the client doing some of the calculating... Don''t ask me how yet.. :-)
Yeah, my client is going to be doing a good amount of the work. Most of the information calculated will be checked for cheating server side. Like walking, the client will simply walk on his machine, sending the server updates. This way, he see absolutely NO lag on his screen. The server will check these packets to make sure he''s not walking faster than he should be, but other than that, the server doesn''t process much. I don''t have it 100% figured out on which parts will be client/server side, but I will be trying to aleviate the server from as much work as possible as to keep my servers running nicely. I am more affraid of the bandwidth of my server than anything else though, I''m debating whether to use a broadcast rather than sending to each client individually.

My original plan was to send each client on the information of the people near him, as he doesn''t need to know about the others (less processing for client, more for server). The problem is, the server calculating for each player it''s list, and sending all that data to each player is going to kill bandwidth. So, I will possibly just split the world up into sections, and send broadcasts of each section, which will hopefully solve both problems .
quote:I''m debating whether to use a broadcast rather than sending to each client individually


I''m relatively new with sockets, but what do you mean by "broadcast"? The only broadcast I know of is where you send packets on the broadcast address which goes out to anyone on your subnet. I don''t think that would be very helpful (unless you were targeting LAN games only, maybe). Most of the engine''s I''ve seen have a Broadcast function which ultimately iterates through the connection list and sends to everybody. Usually there will also be a Broadcast() that takes a range as a parameter and sends to all within proximity to the source object.

Check out PlaneShift''s implementation. I''ve been living in that code for the last few weeks while researching for my MORPG. Some of it is a little kludgy, but overall it''s been very helpful. Another engine that has been helpful is the Torque engine from GarageGames. It''s not free ($100), but considering you get full-source, I think it''s well worth the money. The only catch is that the license is very restricting so you have to be careful what you use and how you use it.

bpopp (bpopp.net)
In my mmorpg project I use that players near enough others can have information about others. There is no sense to store all player data on all clients... And it doesnt take that much bandwidth, server makes all calculations and checks but it makes them per user.

Sofar on 350 AMD my server uses ~1% CPU when 10 clients is connected and there is aroun 1k item and ~250 NPCs.

If 2 clients are far away others, there is no need to send other informations to other, same thing about NPC.

Never ever trust what client says.

And never send anything unnecessary to clients or clients to server...

If you use SQL server to store game data, I think that is wise to load per player data to server memory and process that in memory, same thing for items/NPCs in game, there is no point iterate in SQL server it is way too slow. In this situtiation make player related queries when she/he logs in or out, and game item/npc queries for example every other hour, so SQL part dont stress your server that much.

This topic is closed to new replies.

Advertisement