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!

Bango Server Emulator for Linux [C++]

Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
I do not know much about available C/C++ APIs (on Java I use Netty), but you want to use something called asynchronous (or non-blocking) I/O. Generally speaking, with non-blocking I/O, you will get notified about incoming packets on all connections sequentially. That is, you only have one thread which handles all player messages in a single loop, often referred to as game-loop. You then use your #cores threads for other parallel computation, e.g. monster AI.

I've made command line client that connects with my emulator (some call it clientless?).
You can stress/load test this emulator now, looks like it handles 90 clients very well. :p
It makes random movement and auto accepts party.
Repository:

lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums
 
Joined
Oct 11, 2007
Messages
1,706
Reaction score
517
I've made command line client that connects with my emulator (some call it clientless?).
You can stress/load test this emulator now, looks like it handles 90 clients very well. :p
It makes random movement and auto accepts party.
Repository:

lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums

I have worked with servers quite a bit for the last couple of years, and I agree with the previous poster that async sockets are definitely the go-to solution pretty much everyone uses. Threads could work, but I think it's a risky thing to rely on :).

But then again, unless you plan on this actually becoming a substitute for the serverfiles + addons that we already have, why bother?
 
Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
I have worked with servers quite a bit for the last couple of years, and I agree with the previous poster that async sockets are definitely the go-to solution pretty much everyone uses. Threads could work, but I think it's a risky thing to rely on :).

But then again, unless you plan on this actually becoming a substitute for the serverfiles + addons that we already have, why bother?

Yes I agree with you, threads need to be replaced. Purpose of light client was not to prove threads work, I made it in 2016 and I think it's still nice to have. :p madnight asked me to release it, he wants to move it to linux and make automated client-server tests.
 
Initiate Mage
Joined
Jul 31, 2017
Messages
2
Reaction score
2
Yes I agree with you, threads need to be replaced. Purpose of light client was not to prove threads work, I made it in 2016 and I think it's still nice to have. :p @madnight asked me to release it, he wants to move it to linux and make automated client-server tests.
yup, i just hacked a linux version of BangoLightClient together, my c++ is a bit "rust"y but it seems to work, or at least i think so
PHP:
./bango 127.0.0.1 3000 bot4 passwd
Connected to server 127.0.0.1(3000).
Signing in user [bot4]
S2C_ANS_LOGIN.
S2C_PLAYERINFO.
S2C_ANS_LOAD.
S2C_SHORTCUT received.
Running loop has been started.
PHP:
Client[6] connected.
Incoming C2S packet: [8]
25 0 8 98 111 116 52 0 112 97 115 115 119 100 0 117 110 100 101 102 105 110 101 100 0
Incoming C2S packet: [10]
13 0 10 0 48 48 48 48 48 48 48 48 0
Incoming C2S packet: [5]
15 0 5 4 0 0 0 0 0 0 0 0 0 0 0
Incoming C2S packet: [14]
8 0 14 0 0 0 0 0
C2S_? 14
Incoming C2S packet: [136]
4 0 136 0
C2S_? 136
Incoming C2S packet: [136]
4 0 136 1
At the moment i have no windows available, maybe i setup a VM for Kal. I think we should add some automated tests to the CI process (travis). Running the client with different test scenarios against a dockerized setup of the server. Maybe we could also integrate a auto deploy push to some test server instance running 24/7 on the latest build with public logs.

Performance considerations: interesting post on reddit
I'm currently develop applications in node.js they use the concept of Promises, so async calls without threads, this approach scales very well. I think we need to find a library and benchmark comparisons for async sockets. As you may know some MMOs are written in erlang for this reason.

 
Last edited:
Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
@RevEngKal Justei madnight

Threadless packet handling, using .


Still needs improvements, refactoring and few fixes, but works as proof-of-concept.
 
Junior Spellweaver
Joined
May 10, 2007
Messages
123
Reaction score
31
Greetings all,

Long time no post and yes this thread is intriguing already :)

I do have one issue that doesn't seem like anyone has gotten (didn't find a post in this thread with anyone having this issue).

When I try to start the dbserver I am getting this message:

[removed]

What did I screw up?

Cheers!
 
Last edited by a moderator:
Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
Greetings all,

Long time no post and yes this thread is intriguing already :)

I do have one issue that doesn't seem like anyone has gotten (didn't find a post in this thread with anyone having this issue).

When I try to start the dbserver I am getting this message:

What did I screw up?

Cheers!

Looks like a problem with mysql connection string. I've made small change here:

Pull latest commit, rebuild and tell me if it's working.

Your error comes from libzdb:


Looks like it cannot find schema?
Are you sure you did run build.sql before running DBServer, and have kalonline as schema in config file?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <mysql>
    <hostname>127.0.0.1</hostname>
    <port>3306</port>
    <user>root</user>
    <password>pass</password>
    <schema>kalonline</schema> <!-- <---------------- -->
  </mysql>
  <listen>
    <port>2999</port>
  </listen>
</configuration>

Ps. don't mind revolution, let him live in the cave with his functional programing style. xD
 
Last edited by a moderator:
Junior Spellweaver
Joined
May 10, 2007
Messages
123
Reaction score
31
lafreak,

I appreciate your time in helping out. I am usually pretty good a finding out the issues but this one has me stumped. I went ahead and pulled the latest and rebuilt but I am still having the same problem.

Here I ran the sql script:


Here I queried to confirm database is created:

I have the password correctly set and proper schema in the DBConfig.xml

I try to start the database server and again:

I am posting once again since you asked me to let you know if it worked this time.

Thanks for your help and your efforts and hard work on this project.

Cheers!
 
Last edited by a moderator:
Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
@spicman I was trying to reproduce your error, and the only time I get it, it's when I do not specify schema:

lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums


lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums


lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums


lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums



It must have return NULL in your case. Is your libzdb-dev up to date?

lafreak - Bango Server Emulator for Linux [C++] - RaGEZONE Forums
 
Last edited:
Junior Spellweaver
Joined
May 10, 2007
Messages
123
Reaction score
31
Unexplainable in my eyes. I killed (deleted) and recreated Ubuntu VM 4 times... (4th time is a charm??? wait that's not how the saying goes)

Anyhow after the final (4th try) It finally worked. I went ahead and updated the client and then replaced xtrap and added version.dll and I am in.

Thanks lafreak for your patience. I am going to start looking at the code (I am in no way a programmer) just to see how I can mess around with it.

Cheers!
 
Last edited by a moderator:
Experienced Elementalist
Joined
Aug 23, 2012
Messages
217
Reaction score
263
@lafreak Whenever you push to GitHub it looks like you'vechanged an entire file while in reality you've only changed a couple lines. Are you switching between encodings? Makes it really difficult to follow your history.

Example:

It's \r\n / \r line ending differences, madnight wants to fix it with his latest commit he did 1h ago
 
Newbie Spellweaver
Joined
Jun 20, 2016
Messages
23
Reaction score
27
lafreak

Simple Note Please I have worked the DBServer but When press Ctrl + A and D does not respond please reply
 
Last edited:
Initiate Mage
Joined
Jul 19, 2011
Messages
3
Reaction score
0
You have to install screen.

sudo apt-get install screen
 
Newbie Spellweaver
Joined
Sep 3, 2008
Messages
35
Reaction score
32
fixed by my self .
thanks for this emulator ;)

greeeetings

-TC
 
Last edited:
Initiate Mage
Joined
May 4, 2016
Messages
1
Reaction score
0
I've implemented address finder, now you can use 1 DLL for all previous and future clients. No need to search for address manually whenever inix makes update.
From now just update your client with inix updater, add VERSION.dll and replace XTrap folder.
Tested with (win7 & win10):
- 7/7/2017 new UI engine
- 20/7/2017 new UI engine
- 20/7/2017 old UI engine (which inix decided not to update anymore since january 2017)
- 7/7/2017 chinese engine

Download:
- VERSION.dll
- XTrap.zip

It's possible to pick your UI and connect to one server:

REpkzqe - Bango Server Emulator for Linux [C++] - RaGEZONE Forums

Thanks a lot for this great release!

Is there a way to completely remove XTrap from the client? It seems X-Trap is still running but somehow disabled because it's not detecting IDA Pro anymore.

What did you change in xtrap folder?

Best Regards,
Philip
 

Attachments

You must be registered for see attachments list
Back
Top