Page 1 of 1

Need help with something....

Posted: Thu Sep 18, 2008 5:07 pm
by Kenji
Hi, well ive been trying to make a runuo server of my own, just for testing and learning purposes(learning C# to one day be able to be developer on someones shard)... Well my first thing, I got some friends that want to play on the shard just for the hell of it. My problem is I dont have a server box, I just run the server on my computer. Im not sure if I could even handle like 10 people on my server?

Heres a list of my computer specs to see if I can
-------------------------------------------------------

Windows Xp Home Edition
AMD Sempron Processor 3100+, MMX, 3DNOW, ~1.8GHz
1278MB Ram
Radeon 9250 256MB Video Card
512 KBPS High Speed Cable internet. my download speed is 4595 kbps and my upload is 470 kbps..
------------------------------------------------------

Also if I couldnt get this computer to handle people, is there possible "FREE" way to get something to host server?(As I am only 17, still in high school, and no job... cant afford server)

Im sure you wonder why I come here instead of RUNUO website, well they seem to never answer my question, or they just get mad and tell me to figure it out myself. I also come here because Red Squirrel is one of the smartest tech guys Ive seen with Coding, hosting, and server smarts.

In closing I would like to thank you for reading this and helping me with my problems. Sorry I wrote something so long, but im a very curious person and very interested in this.... PEACE! Kenji!

Archived topic from AOV, old topic ID:3618, old post ID:23258

Need help with something....

Posted: Thu Sep 18, 2008 5:13 pm
by Red Squirrel
The PC should handle it fine. The bottleneck is the connection. home internet connections tend to not be as good for servers as they can have more latency then what you get out of a data center. AoV was run from my house on my 5MB/512KB adsl for a while and sustained about 10 people. Then it would start dropping connections and I was unable to really use the internet. But yeah that PC will be enough for general local testing and what not.

For a "real" server you gotta rent/collocate which costs quite a lot of money. The issue with RunUO is the fact that its for Windows. By making it run natively in Linux you'd cut down 20 bucks off the server monthly price right there.

Archived topic from AOV, old topic ID:3618, old post ID:23259

Need help with something....

Posted: Thu Sep 18, 2008 5:15 pm
by Kenji
Before I get into anything, I was wondering if its ok to talk about my server and stuff here? I am in no way trying to advertise or take any players. I just would like to talk to you and your staff because seems you guys got alot of experience in this kind of stuff. Like questions about hosting server, code, making server most efficent and stuff...

Archived topic from AOV, old topic ID:3618, old post ID:23260

Need help with something....

Posted: Thu Sep 18, 2008 5:51 pm
by Red Squirrel
That's fine, just don't advertise it here if you plan to go "live". If its just a server to mess around on I don't really see an issue.

Archived topic from AOV, old topic ID:3618, old post ID:23261

Need help with something....

Posted: Thu Sep 18, 2008 5:57 pm
by Kenji
Ok I understand.

I was wondering, is there anyway to tweak the code to make the server more efficient, thus allowing it to handle a few more people?

Archived topic from AOV, old topic ID:3618, old post ID:23262

Need help with something....

Posted: Thu Sep 18, 2008 6:22 pm
by Death
Kenji wrote:Ok I understand.

I was wondering, is there anyway to tweak the code to make the server more efficient, thus allowing it to handle a few more people?
If you wanted to really increase efficiency, you could rewrite inefficient code to gain better performance but that itself is quite a task. There may be a few flags you can set on/off in code if they are unnecessary (Red knows more about this) to better your performance. Otherwise, most of your performance will come from your own server.

Archived topic from AOV, old topic ID:3618, old post ID:23263

Need help with something....

Posted: Thu Sep 18, 2008 6:26 pm
by Kenji
O alright thanks... Yeah my final test to see if im good with C#/Run Uo Code was to completley rewrite the core and scripts to Runuo... that wont be for awhile tho lol.

Yeah just trying to figure out some small tweaks that fill give it just a little more performance.

Archived topic from AOV, old topic ID:3618, old post ID:23264

Need help with something....

Posted: Thu Sep 18, 2008 7:05 pm
by Red Squirrel
When we were on a lower end server (Celeron to be exact) one thing I found to be the biggest killer is the stats script and spawners as well as champ spawns.

I rewrote most of the spawner script to make it more efficient and have more options. Some spawners like world forest spawners do not need to iterate through the entire array every 0.1 seconds like the default does. O_o

The stats script only bogs down when its generating the stats (the graphs and stuff) so you can keep or disable it, your choice. (scriptsEnginesReportsReports.cs)

Champ spawns are another bog down. Again, there is no need to iterate through the mob array every 0.1 seconds. Do it like every 5 seconds. In fact on AoV its set to like 30 seconds. This is why candles sometimes seem delayed, but then you get like two at once. The back end works the same, just the front end acts slightly different, but its not like its a huge issue. This only happens if you kill enough creatures for two candles within a single 30 second slice break.

In fact, look for anything that has a timer, lot of stuff runs more often then it really needs to. All added up, these can really be hard on resources specially on a single core machine. There are different timer priorities as well, the smaller it is, the more often it "ticks" and the more often the code in the OnTick() gets executed. Some stuff you can really get away with running it like every 5 minutes. On AoV there's a few new timer priorities that allow this.

Archived topic from AOV, old topic ID:3618, old post ID:23265

Need help with something....

Posted: Thu Sep 18, 2008 7:10 pm
by Kenji
Awesome, well do you think I will have this problem if I use a different spawner? I currently do not use the stock runuo spawner, but a custom spawner that someone made. Also where can I find the spawn candle script to edit the time?

Archived topic from AOV, old topic ID:3618, old post ID:23266

Need help with something....

Posted: Thu Sep 18, 2008 7:31 pm
by Red Squirrel
I can't tell you about the others like xml spawner as we don't use it here.

For the champion spawn stuff check in Filepath: scriptsEnginesCannedEvilChampionSpawn.cs.

It has all the controls for the alter and stuff.


Oh and when you place a champion spawn do [inc z 20 on the sign... My first time I thought I had to make all the altars manually... spent hours working on a single spawn then I figured that out while trying to figure out why the champ was spawning underground lol.

Archived topic from AOV, old topic ID:3618, old post ID:23270

Need help with something....

Posted: Thu Sep 18, 2008 7:48 pm
by Kenji
Hey, inside the canned evil file. I found a script called SliceTimer.. What you happen to know what this does and if I can turn up the timer? Heres the whole code of script.

Code: Select all

using System;
using System.Collections;
using Server;
using Server.Items;

namespace Server.Engines.CannedEvil
{
	public class SliceTimer : Timer
	{
		private ChampionSpawn m_Spawn;

		public SliceTimer( ChampionSpawn spawn ) : base( TimeSpan.FromSeconds( 1.0 ),  TimeSpan.FromSeconds( 1.0 ) )
		{
			m_Spawn = spawn;
			Priority = TimerPriority.OneSecond;
		}

		protected override void OnTick()
		{
			m_Spawn.OnSlice();
		}
	}
Archived topic from AOV, old topic ID:3618, old post ID:23271

Need help with something....

Posted: Thu Sep 18, 2008 8:50 pm
by Red Squirrel
yep thats the one, set both values to 30 secs. The first value is when it starts counting and the 2nd value is how often it does it (the slice is the iteration of the mobs to see if candles should be added)

Archived topic from AOV, old topic ID:3618, old post ID:23272

Need help with something....

Posted: Thu Sep 18, 2008 8:58 pm
by Kenji
Awesome thanks. Also, do you recommend redoing the core? Or is it good as is? Many people say if you redo the core you will get alot better server efficiency.

Archived topic from AOV, old topic ID:3618, old post ID:23273

Need help with something....

Posted: Thu Sep 18, 2008 9:21 pm
by Red Squirrel
There's some stuff in the core that can be made more efficient, but I would not jump into that yet. Most of the core stuff is actually not too too bad.

Given you are starting from scratch I'd also get the latest SVN. I think they fixed the client 6.x packet stuff. You can also laugh at the half assed hardly started ml stuff. :P The spellweaving is a copy and paste from a RunUO member's submission with a few minor changes and disabled spells. AoV used the same package tbh and I had to revamp most of the spells, the harder ones for us to fix are the ones that are disabled. Irony.

Archived topic from AOV, old topic ID:3618, old post ID:23275

Need help with something....

Posted: Thu Sep 18, 2008 9:27 pm
by Kenji
haha ya, ive heard the ML is horrible and not finished.

Archived topic from AOV, old topic ID:3618, old post ID:23276

Need help with something....

Posted: Thu Sep 18, 2008 10:01 pm
by Kenji
Hey do you think it would be possible to hold 20-30 players with those specs? or not a chance? even if I clear all the uneeded programs off computer?

Archived topic from AOV, old topic ID:3618, old post ID:23277

Need help with something....

Posted: Thu Sep 18, 2008 10:55 pm
by Red Squirrel
The PC should handle that easily, its the connection that may suffer, unless you got a very reliable connection. UO does not use lot of bandwidth, but its very sensitive to spikes and what not (like any real time network app). residential internet tends to have more variance to it then a true dedicated link.

But its worth a shot. If you are close to the CO and your wireing within the local loop (inside and outside) is decent quality and that your ISP does not oversell too much you should be ok. At worse, people will just get lot of lag spikes.

But that PC should be ok to run 20ish players.

Archived topic from AOV, old topic ID:3618, old post ID:23278

Need help with something....

Posted: Thu Sep 18, 2008 11:19 pm
by Kenji
O ok I understand. Well my computer is behind a router, but I opened the port. Will a router slow down connection even with ports opened?

Archived topic from AOV, old topic ID:3618, old post ID:23281

Need help with something....

Posted: Fri Sep 19, 2008 7:26 am
by Red Squirrel
Nah should not. It's an extra hop to go through but that does not add too much extra latency specially when you're talking a 100mb or 1000mb device with a 5mb connection.

Archived topic from AOV, old topic ID:3618, old post ID:23282

Need help with something....

Posted: Fri Sep 19, 2008 2:02 pm
by Kenji
Alright cool thanks. Well for now im good on the questions lol. but im sure ill be back here very soon lol.

Archived topic from AOV, old topic ID:3618, old post ID:23286