Little Fighter Empire - Forums

Full Version: Multiserver 2.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(08-28-2016, 09:04 PM)Nightmarex1337 Wrote: [ -> ]Well... I don't know what's the rationale behind converting it to C++ but...

Anyways, calling ping command is a horrible idea because
1- it's a blocking operation
2- unnecessarily expensive since you're creating a new process
3- it's unnecessarily inefficient and stupid trying to capture and parse standard output of ping command

I would suggest using async methods of Ping class. I don't know how much it's applicable to your C++ code base though.

Well for the most part it is for myself to understand C++ better.

I guess you are right about the Ping command, the best way would be to do it with asynchronous programming, using F5 to speed up LF2 while preventing the game to speed up by inserting virtual lag, as SomeoneElse mentioned somewhere before.
The name "ping" for the command is misleading.
Because LF2 has an inner clock, I can't know what is the actual ping.
I can only try to check if the player slows down the game.
So the ping command checks for each player in how many milliseconds does he slows the game cycle.

For example:
If the player got "0 ms", he does not slow the game.
If the player got "5 ms", he slows each game cycle in 5 ms.

The ping command works, but it has some issues and it doesn't always give accurate results.

The idea of using the ping of the computer would be great, but I afraid that most firewalls and routers block it.
You can try ping other players in yours IRC channel, and see if it works for most of them or not.
I guess that's why they're using F5.
(07-20-2016, 06:49 PM)ayalx Wrote: [ -> ]MultiServer 1 works like this:
Code:
Bind("0.0.0.0")
So the OS decides which IP address to use.

MultiServer 2 works like this:
Code:
For Each IPAddress of Computer:
    Bind(IPAddress)
So it should bind all the IP addresses of the computer.

Apparently your old IP still exists as a strange ghost, and MultiServer sees it.
But if you get only a warning, it is possible that MultiServer also sees your true IP address, and in this case it should work well despite the warning.
Have you tried to check it?

Hopefully I will have some time next week.
I will add an option to tell MultiServer how to do the binding (method 1 or method 2), so it will solve your problem anyway.


Unfortunately connecting to it, although it is only a warning does not work, neither with empty address field nor with the correct internal IP address. It will just act as if it was waiting for someone else to connect, but the MS2 will not show any received connections. An option for changing the way how it binds would be cool!

(08-29-2016, 06:24 PM)ayalx Wrote: [ -> ]The name "ping" for the command is misleading.
Because LF2 has an inner clock, I can't know what is the actual ping.
I can only try to check if the player slows down the game.
So the ping command checks for each player in how many milliseconds does he slows the game cycle.

For example:
If the player got "0 ms", he does not slow the game.
If the player got "5 ms", he slows each game cycle in 5 ms.

The ping command works, but it has some issues and it doesn't always give accurate results.

The idea of using the ping of the computer would be great, but I afraid that most firewalls and routers block it.
You can try ping other players in yours IRC channel, and see if it works for most of them or not.



Wow, I didn't know it was that advanced! The way you describe it, it is actually better than a simple ping command, if it worked reliably. It's almost like a "git blame", but is "lag blame" instead :D
, assuming you are using a Debian based distribution, could you try the following?

Code:
$ sudo apt-get install build-essential g++ g++-multilib libpthread-stubs0-dev git cmake
$ git clone https://MangaD@bitbucket.org/MangaD/lf2-multi-server-2.0.git
$ cd lf2-multi-server-2.0/
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./LF2MultiServerv2.0

You press Ctrl+C to close the app.

If you want a launcher for it, you can do:

Code:
$ gedit ~/.local/share/applications/LF2MultiServer2.desktop
Paste the following:

Of course you can copy the "LF2MultiServerv2.0" file in the build folder to somewhere else, and the icon in the "res" folder, and then change the path in "Path" and "Icon" in the .desktop file as you see fit. :)

Let me know if this works for you.
Zelphir:
Thanks!
I will add this option in the next version :D
(postet this possible in a worng sub forum..)

Hello guys,
I am at a LAN party and we try to run LF2 with 6 player with multi Server 2.0.
I dont know what is wrong,btw got the same issus with multi server 1.0. So I installed imo the server corretly. I started first the server-program and then the game and when i try to login into the server ( network > searching opponent> no ip address) the program shwos successful new player with ip etc. BUT the lf2 main program crashes !! I dont know why and im very angry about it. I hope u can help me i dont know what is wrong.
Are you sure you're using newest Lf2 version? (that is lf2 2.0a)?
yes, it is the newest version
(07-27-2017, 07:28 PM)Bigfighter000034 Wrote: [ -> ]yes, it is the newest version

Try this version of MultiServer: http://www.mediafire.com/file/ad3b814o44...Server_x86
Pages: 1 2 3 4 5 6