This emulator is designed for the latest GunZ's client, aiming for compatibility with GunZ's 1.5 phase.
Progress on the Emulator;
Spoiler:
Links;
Spoiler:
Credits;
Spoiler:
This emulator is designed for the latest GunZ's client, aiming for compatibility with GunZ's 1.5 phase.
Progress on the Emulator;
Spoiler:
Links;
Spoiler:
Credits;
Spoiler:
Last edited by PenguinGuy; 29-05-11 at 06:15 AM.
Good luck , don't forget my ideas. :D
Ah the good stuff!
This is just stunnigly beautifull... , i've mentioned myself not to cry...
Just kidding, but i really love this, do you got any special stuff in mind?
Not like this is nothing, but just meant special edits ingame.
Once you get a base and work forward with a full emulation, there is literally nothing you can't do. The possibilities are endless. :)
Edit:
If you need any help and just another coder to help you get it done faster, let me know.
Last edited by iceman4154; 14-03-11 at 04:41 AM.
No, not really lol. Adding special additions isn't really important right now.
I'd like some help with Locator, it seems like I fail with UDP. recvfrom(..) just doesn't get anything. Though that can wait, since I can just use Hare for right now and I want to re-write the packet class and have it able to work at least correctly. As of right now, it's formed like:
And yes, I named that class MCommand lol.Code:MCommand* pSend = MCommand::Create( 0x64, 0x3EA ); pSend->m_nIndex = 11; // Need to remove the need of this pSend->WriteInt( nResult ); ... ... pClient->Send( pSend );
During "Send" in the client class, is when the packet header is formed and where the checksum likes to mess with me. I'll wait a few more days 'till this emulator is actually on it's feet and stops complaining before receiving support from anybody.
Last edited by PenguinGuy; 14-03-11 at 07:41 AM.
Small progress info lol.
Managed to get the original packet class working correctly, well part of it and also fixed the packet checksum.
ImageShack® - Online Photo and Video Hosting (As you can see what I am doing with the memcpy, I find that as a big no, since it's size is 1023 and it just copies everything. However, array management with C++ isn't quite the best, there are ways around it I believe which I am looking into.)
As soon as I go through and clean up my source (especially my includes, I seriously obliterated them. :[) and finish up the Database class, I'll release the source. As of right now, I don't want anyone seeing the source. I'm not a really good efficient programmer, but even parts of this makes me wonder wtf I was thinking lol.
Last edited by PenguinGuy; 14-03-11 at 09:30 AM.
That's nice. I'd like to work on it.
Well let me know when you need some help or want support. Locator is not working because it's done a little differently than MatchServer.
For the database... I would suggest using MySQL. It's simple to work with in C++ compared to MSSQL (At least imho) but it does have performance issues. If you optimize the emulator correctly, it shouldn't be an issue, though.
Few suggestions if you use MySQL over MSSQL:
1) Use the hell out of foreign keys to cascade delete. The main issue with any MySQL server is perfomance, and having extra unused rows does NOT help with this. Database tidyness is key for performance.
2) Consider making a "serverhelper" application for the database. The 'serverhelper' application would take care of logging things like statistics of how many kills were done and where, if a quest round is completed, etc. MySQL is pretty slow on doing queries but for those non-asynchronous things, you can just send a small packet to a logging DB and when the logging DB receives a specific packet, you can do the logging query then.
3) Go GPL! I hate GPL, but if you are using it, there's some nice GPL libraries that you can use. Plus there is plenty of GPL projects that have established database and utility code. If you are completely closed source you will risk people leaking your work, people rebelling and making their own version of your code, and you will get harassed by people wanting to develop because they 'know a lot'. Besides that, you can get maybe the odd person helping you out on the project, even though GoGo and Bunny&Hare were open one time and didn't get any help, you never know. Also, GPL means you have less of an issue with people attacking your servers; if you can't figure it out, maybe the community can. Same goes for coding issues and ideas too.
4) Make sure the schema uses everything MySQL offers. If you have a query that can use a storedproc to achieve the same thing, use the storedproc directly instead of maintaining the connection and feeding it text. Rarely should you have to do that, provided the database is designed right.
Besides those tips, remember that libraries like boost are a pain in the ass to use, and I personally avoid them like the plague just for code cleanliness. (Though, I do know people that love them for utility.)
Linux is pretty much out of the question for gunz emulators, I believe. There's some asynchronous time function exclusive to windows that the client expects as a response, and if it's wrong the client gives up. Which is a shame and I hope someone finds a client workaround for that. (This is what I heard from Jacob anyway.)
Hope that gives you some ideas.
Nice! Just try not to lose the motivation to complete it like so many other programmers hav. I love that it's written in C++. If you decide to put it up on google code, I'd be happy to contribute when I'm done working on my private server projects.