About Store Forum Documentation Contact



Post Reply 
Badumna network suite
Author Message
yvanvds Offline
Member

Post: #1
Badumna network suite
I'm currently trying to use the Badumna Network Suite (http://www.scalify.com) with Esenthel. I'll post my findings in this thread.

I will refer to the place where you installed the api as {api}

1. Compile the API

You start with downloading the C++ api. You will have to compile it yourself. There is a VS2010 solution provided and it was easily converted to VS2012.

You will find that the release project properties are not set. You can look at the debug one and fill in mostly the same with release, except for the obvious differences like optimalisation and such. One thing you should change is the Runtime Library. Set it to /MT if you want to add badumna to an esenthel project.

Building the debug version will result in the BadumnaCpp.lib file in {api}/Source/MSVC/2012/Debug.

2. Setup a test project

I started a new Esenthel 1.0 project by copying the tutorial solution. (I did not work with 2.0 yet because i got an 'access denied' error when adding the badumna header files to my application. Will have to sort that out later.)

In the folder of my esenthel test program (if you copy the tutorial setting this will be the main folder of your solution) I added Badumna.dll, Dei.dll and mono-2.0.dll. You will find those in {api}/Source/libs.

You will also have to copy the folder Mono-2.8.1 to your program directory and call it mono. (The name change is important!)

In your project's properties page, add {api}\Source to Additional Include Directories.
For the linker, add {api}\Source\MSVC\2010\Debug to additional library directories. To Additional Dependencies you will have to add BadumnaCpp.lib

The code below will initialize and shutdown badumna networking:

PHP Code:
#include "Badumna/Core/NetworkFacade.h"
#include "Badumna/Core/RuntimeInitializer.h"
#include "Badumna/Configuration/Options.h"
#include "stdafx.h"

Str message;

void StartBadumna() {
  
Badumna::Options options;

  
options.GetConnectivityModule().SetStartPortRange(21300);
  
options.GetConnectivityModule().SetEndPortRange(21399);
  
options.GetConnectivityModule().SetMaxPortsToTry(3);
  
options.GetConnectivityModule().EnableBroadcast();
  
options.GetConnectivityModule().SetBroadcastPort(21250);
  
options.GetConnectivityModule().ConfigureForLan();
  
options.GetConnectivityModule().SetApplicationName(L"CppApiExample0");
  
std::auto_ptr<Badumna::NetworkFacadefacade(Badumna::NetworkFacade::Create(options));
  if(!
facade->Login())
  {
    
// failed to login to the badumna network
    
message "failed to login to the badumna network.";
    return;
  }
  
facade->Shutdown();
  
message "All is well.";
}

void InitPre() 
{
   
App.name("Start");          
   
Paks.add("data/engine.pak");
}

Bool Init() 
{
  
Badumna::BadumnaRuntimeInitializer initializer;
   
StartBadumna();
   return 
true;
}

void Shut()
{
 
}

Bool Update() 
{
   if(
Kb.bp(KB_ESC))return false
   return 
true;                  
}

void Draw()
{
   
D.clear(TURQ);                                                                         
   
D.text (0,  0.1fmessage);                                       


That's it for now. I'll be back with more later.
07-31-2013 01:31 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #2
RE: Badumna network suite
Interesting.. Have you done any more testing with this? The description on the site seems very decent.
07-31-2013 02:54 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: Badumna network suite
Not yet, Tottel. I'm looking into authentification at the moment. Just started with this suite today, after reading the docs yesterday evening.
07-31-2013 03:45 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #4
RE: Badumna network suite
I've finished my tests of Badumna. So far I have a basic client that combines EE with the badumna libary. It combines remote avatar replication, authentification server, proximity chat and persistant objects. The latter are created on a seperate custom server which handles the replication of the objects to nearby clients. The clients themselves only send messages to insert or delete an object. The server code is also included.

The major problem with badumna was that it doesn't work with global objects. I've worked around that, as you will see in the code. I must say that the documentation for the cpp interface is ok, but not always crystal clear in my opinion. On the other hand, when I had a serious problem, the developer patiently answered all my questions on the forum.

All in all, badumna seems to have some advantages for me. A decent auth server, nat punchthrough and statistics seem the most important. Object replication is also very good. Not that you cannot do these things with esenthel, but it would take more time.

The code can be found here: http://attr-x.net/downloads/badumnaTest.zip

You can browse through the code as it is, but in order to see it in action you will have to go through the badumna documentation, set up a control center and configure the servers.

Regards,

yvan
08-14-2013 04:40 PM
Find all posts by this user Quote this message in a reply
Ozmodian Offline
Member

Post: #5
RE: Badumna network suite
Hi Yvan,

Thanks as always for sharing. I hope to have some time to look through what you have done here.
08-14-2013 06:05 PM
Find all posts by this user Quote this message in a reply
Scarlet Thread Offline
Member

Post: #6
RE: Badumna network suite
This stuff looks very interesting smile. However, it seems a lot more abstract than your typical arragement. Does it ever get a bit convoluted?
(This post was last modified: 08-15-2013 04:20 AM by Scarlet Thread.)
08-15-2013 03:16 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #7
RE: Badumna network suite
According to their website it scales very well. But the only way of knowing for sure is by implementing it, i guess. I know that it tries to send as much traffic as possible directly between clients, to minimize server traffic. The website claims it is possible to cut down on server costs significantly, compared with other networking solutions.

If you ever want to play with it, know that amazon cloud services can be tested one year for free.
08-15-2013 09:19 AM
Find all posts by this user Quote this message in a reply
Scarlet Thread Offline
Member

Post: #8
RE: Badumna network suite
(08-15-2013 09:19 AM)yvanvds Wrote:  According to their website it scales very well. But the only way of knowing for sure is by implementing it, i guess. I know that it tries to send as much traffic as possible directly between clients, to minimize server traffic. The website claims it is possible to cut down on server costs significantly, compared with other networking solutions.

If you ever want to play with it, know that amazon cloud services can be tested one year for free.

Thanks, I think I'll give it a try some time.
08-15-2013 09:50 AM
Find all posts by this user Quote this message in a reply
Post Reply