Thread Rating:
  • 4 Vote(s) - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiserver 2.0
#41
(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.
[Image: random.php?pic=random]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
The meaning of life is to give life a meaning.
Stop existing. Start living.
Reply
Thanks given by:
#42
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.
Reply
Thanks given by:
#43
I guess that's why they're using F5.
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#44
(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
[Image: 9nclhxgc.png]
Reply
Thanks given by:
#45
@Zelphir, 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.
[Image: random.php?pic=random]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
The meaning of life is to give life a meaning.
Stop existing. Start living.
Reply
Thanks given by:
#46
Zelphir:
Thanks!
I will add this option in the next version :D
Reply
Thanks given by:
#47
(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.
Reply
Thanks given by:
#48
Are you sure you're using newest Lf2 version? (that is lf2 2.0a)?
Reply
Thanks given by:
#49
yes, it is the newest version
Reply
Thanks given by:
#50
(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
[Image: random.php?pic=random]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
The meaning of life is to give life a meaning.
Stop existing. Start living.
Reply
Thanks given by:




Users browsing this thread: 8 Guest(s)