I`d never host my own web server, paid hosts are the way to go for me (comes out cheaper for me actually, lol), but that is a valid point. For local stuff though I still prefer it.
XAMPP is basically the same thing, and you can even put it on a portable flash drive. More importantly, it's constantly updated. It's what I use for fast development from anywhere. On my main development computer though, I use the full, official MySQL server.
Your ConcurrentRandom class is a joke. Declaring the fields in your class as "volatile" doesn't magically make your class thread safe, stupid. What a silly "software engineer" you are.
Your ConcurrentRandom class is a joke. Declaring the fields in your class as "volatile" doesn't magically make your class thread safe, stupid. What a silly "software engineer" you are.
This.
Besides it's not even concurrency either.
The only way to actually achieve a thread-safe random is a singleton initialized random class where all calls are thread-locked.
A random algorithm should never be called simultaneously.
Code:
/// <summary>
/// A thread-safe random generator.
/// </summary>
public class RandomGenerator : Random
{
/// <summary>
/// The random generator.
/// </summary>
private static readonly RandomGenerator randomGenerator = new RandomGenerator();
/// <summary>
/// Gets the random generator.
/// </summary>
public static RandomGenerator Generator
{
get { return randomGenerator; }
}
/// <summary>
/// Creates a new instance of RandomGenerator.
/// </summary>
private RandomGenerator()
{
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
}
/// <summary>
/// The synchronization root.
/// </summary>
private object _syncRoot;
/// <summary>
/// Gets the synchronization root.
/// </summary>
internal object SyncRoot
{
get { return _syncRoot; }
}
/// <summary>
/// Gets a random generated number.
/// </summary>
/// <returns>Returns the random generated number.</returns>
public override int Next()
{
lock (SyncRoot)
return base.Next();
}
/// <summary>
/// Gets a random generated number.
/// </summary>
/// <param name="maxVal">The max value of the random generated number.</param>
/// <returns>Returns the random generated number.</returns>
public override int Next(int maxVal)
{
lock (SyncRoot)
return base.Next(maxVal);
}
/// <summary>
/// Gets a random generated number.
/// </summary>
/// <param name="minVal">The max value of the random generated number.</param>
/// <param name="maxVal">The min value of the random generated number.</param>
/// <returns>Returns the random generated number.</returns>
public override int Next(int minVal, int maxVal)
{
lock (SyncRoot)
return base.Next(minVal, maxVal);
}
public override void NextBytes(byte[] buffer)
{
lock (SyncRoot)
base.NextBytes(buffer);
}
public object NextEnum(Type EnumType)
{
Array array = Enum.GetValues(EnumType);
return array.GetValue(Next(0, array.Length));
}
}
I followed your steps and got everything up and running yet when I run my client it consistently gives me the message "server maintenance" any idea what I'm missing?
I followed your steps and got everything up and running yet when I run my client it consistently gives me the message "server maintenance" any idea what I'm missing?
It doesn't even attempt to connect I have all three servers up and running but when I run the 5187 client it almost immediately says server maintenance.
I changed the loaderset.ini ip to my local and still nothing.
It doesn't even attempt to connect I have all three servers up and running but when I run the 5187 client it almost immediately says server maintenance.
I changed the loaderset.ini ip to my local and still nothing.
I'm not really supporting this project anymore, but have you tried to see if it connects using breakpoints? That way, you can see if it's the client just not connecting or the server being misconfigured.
Public Source Development: Project Phoenix 01/30/2014 - CO2 Private Server - 18 Replies Hey everyone,
I was told that the next time I create a thread about this project, I should just make it a development thread... so here it is. Anyways, I'm making an open source project for you all! I'll be available sooner than later. I'm not going to do much with it - basically just walking, talking, seeing other people, etc. I might go as far as NPCs, but we'll see. The key "feature" in this source is that everything is heavily documented. It should be easy to develop for. I'll talk about...
5187-5200 Packet collection? 11/22/2012 - CO2 Private Server - 2 Replies Hey,
ImmuneOne's 5187 source doesn't include all the packets, Does anyone have an old source around with most of the packets for that patch? I lost mine, Would be greatly appreciated.
New itemtype,StrRes.ini patch 5187 04/12/2011 - CO2 Exploits, Hacks & Tools - 52 Replies New ItemType Patch 5187
Weapons Examples:-
EmperorKatana. >> Refiend Katana
EmperorKatana. >> Unique Katana
EmperorKatana. >> Elite Katana
EmperorKatana. >> Super Katana
-------------------------------
TalisMans Examples:-
HeavenFan
Phoenix Project finally released for closed beta testers? 09/24/2010 - S4 League - 6 Replies Wie manche noch wissen wurde vor einiger zeit ein S4-Privatserver projekt namens Phoenix angekündigt, die Beta sollte am 14. Oktober stattfinden, aber wenn man die seite besucht ( Phoenix ) kommt eine cmd seite, befehle für die lobby zum spiele starten etc, heißt es das der server nun vorher released wurde?
Phoenix Project 09/06/2010 - S4 League - 14 Replies Extra sorry for English translation, again big fail by Google ~
PS : Explore mode accept 64 players max actually (with buggy for list of players)