Nice project, i'm building an 317 server of c#, started a month ego i don't spend much time on it, since i cannot get cryption and stream 100% converted :P
Printable View
Nice project, i'm building an 317 server of c#, started a month ego i don't spend much time on it, since i cannot get cryption and stream 100% converted :P
The problem is since c# does not support >>>
to convert i'm using
k1 ^= l1 >>> 16; to k1 ^= Math.Abs(l1) >> 16;
only not sure if it works 100% :P is that the correct way to convert it? or i'm screwing it up :P
The "> or <"'s are called shift operators (also called bitwise shifts), and JAVA has one with three(3) shifts which is used for unsigned sifting, which C#'s 2 shifts does automatically (any unsigned field)
So really,
will do the same as it would in JAVACode:k1 ^= l1 >> 16; to k1 ^= Math.Abs(l1) >> 16;
please back to topic :P
I plan on adding a lot to this project, when will you have that "directory" set up for me?
Very impressive
What's the deal with this codec stuff? This is just the stuff of binary streams... (BinaryReader/BinaryWriter etc).
And templates would make that over 9000 times nicer :).
I knew about the binary reader and writer, just wasn't sure if they're going to do what i wanted them to do
Also, what do you mean by templates?
Etc etc etc.Code:template <typename T>
T read_basic() {
if(!curbuf) return T(0);
if(sizeof(T)>(size-ptr)) return T(0); // Teh fail, buffer overflow prevention
T retval = *((T*)(curbuf+ptr));
ptr += sizeof(T);
return retval;
}
template <typename T>
READ_RESULT read_copy(T* t) {
if(!curbuf)return READ_NOBUFFER;
if(sizeof(T)>(size-ptr)) return READ_EOF; // Teh fail, buffer overflow prevention
memcpy(t,(curbuf+ptr),sizeof(T)); // Replace with interface copy?
ptr+=sizeof(T);
return READ_SUCCESS;
}
// object reading deserializes an object from the stream, KEWL!
READ_RESULT read_object(Deserializable* obj) {
return obj->deserialize(this);
}
template <typename T>
BinaryReader& operator >>(T& obj){
read_copy<T>((T*)&obj);
return *this;
}
Alright guys... this might piss you off, but I've started the project from scratch.. again :P
Reason being is i keep learning more and more, and when i look back at my work, it just loops like a massive dump of shit. So i promise this will be my last restart :)
You can however download the older version here: http://rapidshare.com/files/267476411/Jolt.zip - Enjoy.
No, you have a disease many programmers have. It has to do with learning faster then you can complete projects.
It's all part of being a beginner programmer. I have the same problem with things..
>.<
lol.
Well good luck Aj,
Hopefully it'll be 10x better this time round. :)
I know it pisses everyone off, but i guess it's better than a crapy version which everyone will complain about :(:
anyways, I've done some compatibility improvements, the server comes in 2 version, x86 and x64 bit
Also there is multi threading (+ thread pooling), and optimize for multiple cores (divides threads and handles on each core using Environment.ProcessorCount)
I'll do a svn commit later today so you guys can check it out - regardless, the redo is going great, just trying to improve everything that i've already done last version
Updates:
Added database handling / storage
Added multi threading (as said above) with thread pooling
Improved logging system
Improved support for x32 and x64 systems (as said above)
Picture of new console:
http://img12.imageshack.us/img12/7595/67338126.png
folders are also more organized:
http://img40.imageshack.us/img40/7202/50479774.png
console now logs all errors to a log file (option to turn it on and off also included in /config/system_console.xml)
http://img12.imageshack.us/img12/7559/62933992.png