I'm curious as to what people think of this source.
Any comments, questions, concerns?
I have a concern that your packet handler is less efficient than just using a switch. I talked to Hybrid about it too and he said the same thing. I would double check on if that's an appropriate method.
I have a concern that your packet handler is less efficient than just using a switch. I talked to Hybrid about it too and he said the same thing. I would double check on if that's an appropriate method.
Hmm, I had a discussion with Unknownone about it a long long time ago (I've been using this way for a long *** time :P) and he said it was a pretty efficient way to do it.
I might do some further testing.
Hmm, I had a discussion with Unknownone about it a long long time ago (I've been using this way for a long *** time :P) and he said it was a pretty efficient way to do it.
I might do some further testing.
Well, if you think about it, a switch statement would be much simpler. I can see where a dictionary would be more efficient if the switch contained more than 50 cases, but I can't see it being more efficient with less than 30. (Either way, it's just checking values- but a switch is simpler than a dictionary and possibly more efficient).
Definitely do some testing. As I said, it's just a concern. I'd be interested in which is faster. I'm too busy to work with anything anymore (co related).
public TValue this[TKey key]
{
get
{
int index = this.FindEntry(key);
if (index >= 0)
{
return this.entries[index].value;
}
ThrowHelper.ThrowKeyNotFoundException();
return default(TValue);
}
set
{
this.Insert(key, value, false);
}
}
Code:
private int FindEntry(TKey key)
{
if (key == null)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
}
if (this.buckets != null)
{
int num = this.comparer.GetHashCode(key) & 0x7fffffff;
for (int i = this.buckets[num % this.buckets.Length]; i >= 0; i = this.entries[i].next)
{
if ((this.entries[i].hashCode == num) && this.comparer.Equals(this.entries[i].key, key))
{
return i;
}
}
}
return -1;
}
Where a switch case will just take x from y.
Imagine 1000 entries in your dictionary.
What seems faster in your own opinion, looping through all the entries or taking x from y?
This is how you find the packet processor:
Where a switch case will just take x from y.
Imagine 1000 entries in your dictionary.
What seems faster in your own opinion, looping through all the entries or taking x from y?
A switch case would be much faster IMO.
That doesn't loop through all the entries in the dictionary.
It's a hashtable.
Most of the time it's a single lookup to find the entry, unless two entries have the same hash (mod the number of buckets) in which it then loops through to find the specific entry.
For 1000 entries it's likely to find it in one or very few tries (depending on the amount of "buckets" and the distribution of the hash algorithm).
I got this problem,
I really want to learn C# so i thought about using this source, but i can't even run it XD
Quote:
Locating source for 'C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs'. Checksum: MD5 {55 76 a3 37 12 d7 84 65 c8 2 a9 9c 87 9f ce ae}
The file 'C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs' does not exist.
Looking in script documents for 'C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs'...
Looking in the projects for 'C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs'.
The file was not found in a project.
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs.
The debugger could not locate the source file 'C:\Users\Tyler\Documents\Visual Studio 2010\Projects\KinSocket\KinSocket\Database\MySqlEn gine.cs'
Super Basic Multi 04/27/2010 - CO2 Exploits, Hacks & Tools - 1 Replies My first attempt at this, it looks like they changed some of the features listed in TheBoyWhoLost's multiclient guide.
So this includes only multiclient with date and time.
If you want to bypass play.exe create a shortcut to Conquer.exe
Right click the shortcut and go to Properties.
Add the word blacknull after the Target address.
(Ex; "C:\Program Files\Conquer Online 2.0\Conquer.exe" Blacknull)
uhh enjoy? Hopefully this helps someone :P
If I can learn how to enable PM commands and...
CoV Super Group - Base Building 11/26/2005 - General Gaming Discussion - 0 Replies Once you hit Level 10, you can go to the main building in Port Oakes to register for a Super Group (basically a Guild) which also entitles you to a Base.
I had some experience building a base in Beta, so lets start with basic layout. Your base to begin with will be only 1 room, the portal into it. As you enter you'll notice (with the correct permissions) that you can Edit or Upgrade your base. Editing allows the placement of new rooms, while Upgrading allows the purchase of overall terrain...