ID:278321
Mar 24 2010, 6:00 am
|
|
I was wondering what would be the best things to focus in buying for a computer to be able to host BYOND games with minimal to no lag. I have a game that goes through a lot of code really fast. I have been constantly reworking the code, but the game will inevitably use up excessive cpu power due to the way I want the game. I was wondering if there are certain things I should focus in when building a computer for hosting this game (like a lot of RAM, a great processor, etc.).
|
Mar 24 2010, 6:18 am
|
|
Most likely the real bottleneck is the network (data-transfer from your server to your clients). Every other resource usage is game/source code specific and can hardly be discussed or even only granted an estimated guess without knowing details.
|
In response to Schnitzelnagler
|
|
Schnitzelnagler wrote:
Most likely the real bottleneck is the network (data-transfer from your server to your clients). Every other resource usage is game/source code specific and can hardly be discussed or even only granted an estimated guess without knowing details. ^ More specifically, upload bandwidth is the most likely weak point. Schnitzelnagler is correct on all counts. |
In response to AJX
|
|
Actually, I'm not sure that the upstream port is the real limiting factor in most cases, but rather the data flow between the routers and even more specifically the carrier/peering deals of the provider.
Optimisation on that point should be able to scratch on up to 50 ms against a low quality competitor and that is a very long time for a computer ;) |
Byond games aren't as demanding, so i'd say a 2.3ghz intel quad/duo core, as much disc space as u need, and a good UPLOAD and DOWNLOAD speed.
|
In response to Schnitzelnagler
|
|
Schnitzelnagler wrote:
Actually, I'm not sure that the upstream port is the real limiting factor in most cases, but rather the data flow between the routers and even more specifically the carrier/peering deals of the provider. Not sure if you mean what I think you mean, but I am decently sure you didn't get what I meant. Allow me to expand! See, I wasn't talking about optimizing server responsiveness, I was talking about the most likely source of a bottleneck (being a system weakness that causes limitations on your player capacity) As you add more players, more resources will be in use. In my opinion the one that will be both in use the most and most likely to reach its limit will be the maximum upload bandwidth from your ISP. Most ISPs have a roughly 1:10 ratio between maximum download and upload speeds. Most hosting jobs a computer will have to perform that involves people connecting to it will be most trying on your upload bandwidth, which consumes more of your maximum speed than download would. This is why I say upload is the most important factor. :) I remember Falacy posted at some point in time approximately how much bandwidth he ends up using per user (both up and down), and I can't remember for the life of me what it was. |
In response to AJX
|
|
I understood what you meant to express, though, for the 'average' BYOND game running 10-20 players, even a DSL 2000 line would be fine, upstream wise.
While I agree that this is definitely a needle-hole to be considered, the one most people forget (though it is indeed a bigger issue) would be routing. You can have all the upload on earth, it just takes one lame overused router between you and the client to completely slow down the transfer. |
In response to Schnitzelnagler
|
|
schnitzel is probably right. I say probably because I'm not certain myself.
However, I used to host battlefield 1942 servers for my clan back in the day (when bf1942 was still "alive"). which i did with a 2/0.5 MB connection with up to 24players without problems. players pinging on an average of 30-40. hardware specs where: 1,8Ghz AMD something. 500GB HDD 3GB RAM 256MB Graphics NOTE: Not important for hosting games. A friend of mine with the same connection and ISP but these hardware specs: 1,8Ghz AMD something (not the excact same as mine but IDRM) 120GB HDD 500MB RAM 128mb graphics: again not really an issue. could only host 4-5players before it got laggy. Now there's many factors one could include in the hosting issue, but let's keep it as simple as possible :) Computerwise for hosting of any games: PROCESSOR - Something decent, however for byond type games you really don't need any hardcore stuff. LOADS OF HDD - well put a figure, the more the better.(PS. doesnt help if they'r overloaded with porn) LOADS OF RAM - Same as above, and when it comes to RAM the differens is even bigger between, ex. 1 and 2 GB and so on. GOOD STABLE CONNECTION. - How large the connection should be is something to discuss, it helps having a large connection but i do not really think that this is the biggest problem. although the routing is important. keep in mind that the connection speed of the players also is a factor.(not for the server all togheter but for the players in relation to the server). NB!: USE CABLE FOR GODS SAKE! - I don't care what they say, wireless is NOT as stable as with wire. Old geezers surfing online on websites might not notice, but believe me there's a signifigent difference. Last but not least: Forgive me for my poor english grammar. Regards -Jarquille |
In response to Schnitzelnagler
|
|
We need to go into computer then, not internet, my cpu maxes out when im hosting some BYOND games, the code has been tweaked about a million times for things to run quicker and much better coding practices put in, but still only around 10 people, and the cpu jumps up there at max while their actually doing anything.
What would be the best way then without changing the code, since that has been done plenty to host the game better. I don't have much budget and can run 3D games and all well, and even host them, but not when it comes to BYOND. I hosted also a 2D game that has all the features this game has, but the other game has an insanely bigger map as well and such, yet my BYOND game still lags to hell & not this other 2D game. I could likely code using something else like C++, C#, VB, or other coding languages if someone thinks those will get significant improvements over BYOND. Obviously coding languages like these take more work, and you would need to know coding, as I do, a beginner wouldn't be able to do it. Could an advanced coder with those other languages make a significantly faster game than with BYOND, or do you think BYOND might be pretty close to the max speeds you might be able to get with the other languages? |
In response to Dan0971
|
|
If you're lagging with that many players it is because your code is inefficient.
I advise having an expert take a look at see if they can find the source of your problems. An efficiently written game can have 100+ players without the cpu being maxed. |
In response to AJX
|
|
Not true.
Although a lot can be done to optimize games, BYOND is inherently slow. Sometimes you just cannot make it run fast. In a game I am working on (LONER) the AI in it is very advanced. Human enemies can react to sight and sound, they can alert friends, can react to dangers such as running from grenades. They can use and shoot weapons, reload weapons, change weapons, pick up loot if they're running out of ammo, use and throw grenades, use appropriate healing items, they will to some degree even attempt to hide behind cover when in danger or reloading, and will generally try to use terrain to their advantage. Some of this stuff is more complex than it seems too. Shooting requires they know the properties of their weapon, and how best to use it, they have to check that there is a clear line of sight between them and who they want to shoot, and that they wont hit any friendly allies. (Shooting also uses pixel based projectiles and collisions) Throwing grenades requires similar, but also a check to make sure the explosion wont hit themself or allies. I do a lot to optimize the AI, such as dynamically altering how active it is, from inactive, to very active, based on what players will see. All of the code and functions are optimized as much as I think anyone could possibly optimize them. (As an example of how optimized it is, certain procs that handle the interface and sorting lists are much, much more CPU intensive than any of the AI procs, they are just called less) Due to this, the game which was originally intended to support as many players as it wants, now will probably have a cap of 10-20. Maybe even less. CPU usage when nothing is happening is 0%, CPU usage when 50 NPCs are all fighting it out can rocket to 20-50%, with 100 NPCs it can become unplayable. Due to this the game had to be designed in such a way that it wont be possible for 50-100 NPCs to all be in combat at once. But with enough players, I could not prevent this from becoming a possibility. This is an extreme example as I doubt most games will use an AI even remotely as complex as this. But it can happen. You cannot really say if the CPU usage is too high, it is due to poor optimization, maybe it is, but maybe it isn't. (Oh yeah, the exact same AI, with combat simplified to nothing but using bump to inflict damage can have about 5000 AIs running at once with only 40-50% CPU usage on my computer) |
In response to Gogeta126
|
|
Gogeta126 wrote:
Byond games aren't as demanding, so i'd say a 2.3ghz intel quad/duo core, as much disc space as u need, and a good UPLOAD and DOWNLOAD speed. It is hilarious to see this considering I started off hosting byond games on a 533MHz Pentium 3 with 128MB of RAM. |
In response to Airjoe
|
|
Depending on the type of game, 128Mb of RAM may not be remotely enough.
A 1000x1000 map in BYOND would use all of that 128MB of RAM, or just under it. Most games wont ever use a map that big, but a decent sized RPG might get close to that, and without some clever loading/unloading of maps (which may or may not be possible in a multiplayer game) you could get close to reaching that 128MB of RAM usage with all other parts of the game taken into consideration. Also... Lets me modern shall we? It's not 1990 anymore. Why would I use my 20 year old PC with like a 166MHz processor and 64MB of RAM, when I am sat on a PC with a 3.2GHz i7 (quad core) processor, with 2TB of storage, 8GB of ram and 2GB of VRAM? Seriously guys, I know which one I'd rather use, even if I'm not going to make full use of it. |
In response to The Magic Man
|
|
The Magic Man wrote:
Depending on the type of game, 128Mb of RAM may not be remotely enough. Nor did I ever say it was. If you didn't know, I'm hosting a lot of games- or at least, enabling many people to do so. I know what kind of requirements games have. What I said is, I used to host games with a Pentium 3 processor and 128MB of RAM. Also... Lets me modern shall we? It's not 1990 anymore. First of all, it was 2000, not 1990, and second of all, in case you haven't noticed, BYOND games haven't changed all too much. We're not magically in 3d now. |
In response to Airjoe
|
|
Actually, for some reason, my computer doesn't like isometric mode in BYOND very much.
Using the map editor in isometric mode is murder, and games running in isometric mode tend to be slower than those not running in it (the exact same game that is). I can strangely run full, commercial 3D games with more ease and faster than BYOND in isometric mode. |
In response to Dan0971
|
|
Dan0971 wrote:
(...)the code has been tweaked about a million times for things to run quicker and much better coding practices put in, but still only around 10 people, and the cpu jumps up there at max while their actually doing anything. If nothing is happening, nothing should drain on your CPU, which means, you are NOT applying proper Event based programming. Dan0971 wrote: What would be the best way then without changing the code, since that has been done plenty to host the game better. There are two ways here. Buy a better computer, or optimize your source code. The second would likely help more. Dan0971 wrote: I could likely code using something else like C++, C#, VB, or other coding languages if someone thinks those will get significant improvements over BYOND. Naturally a non interpreted (native) language like C++ has to be faster than BYOND's VM. That is, if you knew what you were doing. Dan0971 wrote: and you would need to know coding, as I do, a beginner wouldn't be able to do it. You, are a beginner (if at all). You have to accept and realize that. This is no insult, I am a beginner myself. Dan0971 wrote: Could an advanced coder with those other languages make a significantly faster game than with BYOND Yes. And no, you wouldn't be able to. Again, not an insult, just a sheer fact. |
In response to The Magic Man
|
|
When you're writing incredibly advanced AI that is a different story.
Many things can be done to optimize performance of games written by people not actively looking to be efficient. Many simple things such as changing for(var/X) to for(var/X in RelevantList) can be done to optimize your game. Even advanced programmers will pass up some things they could do to optimize their systems. With amateurs, you can assume that inefficient mistakes will be rampant. |