Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Crossfire Emulator

Status
Not open for further replies.
Newbie Spellweaver
Joined
Feb 21, 2011
Messages
44
Reaction score
31
Hi
For the past 3(?) days I've been working on a crossfire emulator..
Up to now you can connect past login server, and connect to a Master Server (Alpha Server, Bravo Server, etc), but it has great potential to do much more. Let me go over the aspects of my server. Its coded in C# and the interface is quite easy to work with for those who would like to fork it later on. I'm using my own server structure that I'll explain in a second, because it seemed like it would be the most effecient one to use.

Vanlj95 - Crossfire Emulator - RaGEZONE Forums


As you can see by the image, the Login Server binds to the main port, which then any master server can connect to the login server. to make sure of the use of multiple master servers, I implemented configuration files, so you can run multiple instances of a single .exe. The same goes for channels, which as you can see, connect the the master server (depending on how you configured your channel). The black market server (Not yet implemented) will be connected to the Login Server (Which also acts as a main server for all the other ones).

Other notes about the source

For database uses, I've decided to simply go with MySQL as it's easiest to use and I have the most experience with.

For networking, I've created my own library using that makes use of the .NET sockets, which are effecient enough for me. As for packet reader, and packet writing, I'm using a library I've used in a different project (a completely different game), but highly modified to be used for crossfire, as some packets are read, and sent differently (Like sending a string).

As some of you might know, crossfire uses .rez files to store most of their maps, and guns, but I havn't started a library for reading those files exactly yet, but I have a rough idea of what I'm going to do (Dump the .rez files into a binary file and read those from each channel server).

Packets
Packets are a tedious process for this project. Most emulators I've worked on use packet structures that are easy to use, but crossfire really differs on this one. To briefly explain what I mean by this I'll quickly run over a single packet used to show the Login Server

Code:
[BYTE, 0xf1] //start of a new packet
[BYTE, header] 
[BYTE, packet size]
[Buffer, 6000 bytes] //includes names of servers but 5000 of those bytes are 0
[BYTE, 0xf2] //end of packet

As you can see, that packet alone has rougly 6000 bytes. This is huge and in my opinion z8games (or subagames) did a terrible job with their networking. When you are sending a login error for example, you're sending this exact same packet, with a changed byte in the beginning of the packet. Now think about this, you're sending a 6000 byte packet just to send a simple error? Quite annoying.

Continueing on..

I will release my source later on once I get more progress done and have a better understanding of the packet structures. Any questions, feel free to PM me. Also, if you would like to analyse packets, feel free to PM me as well as it is a tedious process.

Yes, my IGN is blurred out because it is the same one that I use in the official crossfire.

Vanlj95 - Crossfire Emulator - RaGEZONE Forums


I havn't fully decoded this packet yet, as you can see, the part where it shows the amount of players, I know where to edit it but I just havn't got to it yet.

Vanlj95 - Crossfire Emulator - RaGEZONE Forums
 
Initiate Mage
Joined
Jan 30, 2013
Messages
4
Reaction score
1
NIce i am waiting for the release Good job
how much size is the emulator? my is over 2 gb and the original from ph are 26gb
 
Newbie Spellweaver
Joined
Sep 20, 2012
Messages
45
Reaction score
2
he will share when he is done.. be patient...

only with crossfire NA or can I use it with crossfire EU too?
 
Last edited:
Newbie Spellweaver
Joined
Sep 20, 2012
Messages
45
Reaction score
2
if u done release it.. not the python.. The c# if u have it :p
 
Newbie Spellweaver
Joined
Feb 21, 2011
Messages
44
Reaction score
31
he will share when he is done.. be patient...

only with crossfire NA or can I use it with crossfire EU too?

I'm not sure, the packets might differ, but once I get more used to crossfire's networking structure I might add support for Crossfire Europe too.

small update: I've rewrote some of the packet writing and reading code to be more user-friendly. Also finished off loginserver with full database connection, instead of that 'default' account login. I don't really have much time during the week to work on it but during my march break I will have more time.
 
Initiate Mage
Joined
Dec 27, 2012
Messages
3
Reaction score
1
Do not pack it in python, I have doene with Friends like 60% of a p-seerver of cf.
If ypu need help, PM me an IM you use, I will try to help you.
 
Newbie Spellweaver
Joined
Feb 21, 2011
Messages
44
Reaction score
31
dont you need any help?

Not sure if that was directed to me, but yeah, someone who is willing to analyse packets would be great.

@thread please stop going off topic, if you have your own emulator for this game, make another thread.
 
Experienced Elementalist
Joined
Nov 26, 2008
Messages
253
Reaction score
67
@Vanlj95 If you're 100% sure that you'll make this Emulator open source, host it on Github or somewhere similar and make it quick.

Running around in circles PM'ing each other won't work in the "open" source scene.

Also, you're asking for help with something that people don't even know exist. Sorry if I offended you, but I've seen plenty of wannabe coders here in RaGEZONE.

"Either show some codes, or get out. We don't need jokers" -Roman Bellic.
 
Newbie Spellweaver
Joined
Feb 21, 2011
Messages
44
Reaction score
31
@Vanlj95 If you're 100% sure that you'll make this Emulator open source, host it on Github or somewhere similar and make it quick.

Running around in circles PM'ing each other won't work in the "open" source scene.

Also, you're asking for help with something that people don't even know exist. Sorry if I offended you, but I've seen plenty of wannabe coders here in RaGEZONE.

"Either show some codes, or get out. We don't need jokers" -Roman Bellic.

I am more than pleased to show you my code via teamviewer or anything, if thats what youre asking. I didn't really understand what youre trying to say.

Also, it will be open source soon, I don't see the point of releasing a login server with half the packets not even fully analysed and a game server that can only accept connections. I was also planning on using Github, yes, because that way I can update it when it's open source.

Like I said, I don't really understand what you're trying to tell me.
 
Good to be back.
Joined
Feb 1, 2009
Messages
631
Reaction score
59
I am more than pleased to show you my code via teamviewer or anything, if thats what youre asking. I didn't really understand what youre trying to say.

Also, it will be open source soon, I don't see the point of releasing a login server with half the packets not even fully analysed and a game server that can only accept connections. I was also planning on using Github, yes, because that way I can update it when it's open source.

Like I said, I don't really understand what you're trying to tell me.
maybe he mean you can upload your current work on github, so he can continue on his own ;)
 
Status
Not open for further replies.
Back
Top