ID:151299
Sep 16 2011, 3:38 pm
|
|
With BYOND, how many players do you think a action based game with many active computer mobs can handle without making the game unplayable. I know it's hard to estimate, but I just want to know before I go through the trouble of trying to implement it.
|
Sep 16 2011, 3:41 pm
|
|
It can have a huge impact based on your computer/server specs, the best way to find out is to test it yourself on this one. Older hardware or a laptop is going to be your enemy on this one.
|
In response to Jotdaniel
|
|
So your saying any problems would only arise due to my won hardware?
|
There are many things that factor into this ill tell you a couple and how you can go about maneuvering through the needed stuff for the best performance.
First up you have server specs, every server will run at different rates and what not so ideally you will want something cost effective to your needs. this will mean you want to research a number of different places for hosting so to ascertain the best server you can get for your buck. Do not go with the first thing you see as it may not be the best always look around. That's business 101. next up you got the actual workings of the code the main cause of delay in a game is how long the procs hang. so make sure you know how they are coded and if you feel the cpu time is to high for a proc then look into ways of improving it via code problems or dev how to. to check this you can profile your world by allowing debug mode by typing #debug anywhere in your code and inside dream seeker click profile while hosting. Another thing relating to the code side and mainly how many mobs you have now im going to assume that you will want these active computer mobs as enemies of some form. now what you need to do is disable the mob from doing any "real" processing until a mob is within a certain range. you can do this at any range you like its upto you really. having mobs doing stuff when there is no actual need for it to be doing something just ties down the CPU and thus rendering your game unstable. Lets say you have 200 mobs in your game both player and computer both are doing some form of processing action. Now usually you can only see about at max maybe 24 odd tiles each way more or less. now if you did some non processing action those mobs wouldnt do anything until in range of say a player. so we have 5 players with 195 ai. now lets say mobs cant stack in one place and as such you have 20 mobs all clumped together, they wont do anything and as such wont use cpu but when the player comes they will start there procs for ai checks and what not. That will save your CPU greatly, if you look at Forum_accounts pixel movement library which is still very much usefull even with native he has a few examples of things you can do to increase performance. |
In response to Raruno
|
|
Not any problems, but a computer with a really slow/old cpu may only be able to host 5-10 people, while a newer cpu might get up to 20 or more.
|
In response to Jotdaniel
|
|
Jotdaniel wrote:
Not any problems, but a computer with a really slow/old cpu may only be able to host 5-10 people, while a newer cpu might get up to 20 or more. I'm pretty sure that the bottleneck in pixel movement games is server bandwidth, not CPU. |
In response to D4RK3 54B3R
|
|
D4RK3 54B3R wrote:
Jotdaniel wrote: I'd tend to agree that bandwidth will probably be the bottleneck, but it really depends on the game and situation. With pixel movement each move is more costly and will probably occur more often. CPU usage just for movement can easily become significant. Bandwidth is only an issue for the mobs that connected clients can see. Suppose the game is an action RPG where each player is frequently moving and shooting projectiles at enemies. For each player expect there will be one enemy and three projectiles at all times (5 total moving objects per player). The CPU usage is always the same, but the bandwidth usage varies. If the players are all in separate corners of the world and can't see anyone else, each client needs small updates (they just need to be updated about 5 mobs). If all players are in the same area shooting at the same mob, every player needs to be sent updates about every projectile so the CPU usage will be roughly the same (the number of projectiles didn't change) but the bandwidth usage will increase. Your best bet is to make the game, run it, and see if there are any problems. You just need to test the most CPU and bandwidth intensive things - you don't need to have the whole game complete to realize "oh, that feature is a bandwidth hog". |