Author Topic: Performance improvement for Glest multiplayer... 4 player is now practical  (Read 53001 times)

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
By the way: server and client can be a normal connection on!

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Stop spamming this thread! Its not our job to fix your network problem!  >:(
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
@softcoder:

Errorhandling....
This 10 second timeout problem is really a reason to quit the connection but the errorhandling in this context is a bit strange.
Exit/Crash is not that funny. I didn't looked into the code yet, but isn't it possible to give an errormessage for the user and quit back to the menus on the client?
I don't know how much trouble it is to integrate something like this now, but it should be done some day ( not only for this error ) ...

Ideally the other players ( especially the server and maybe the clients one day too ) should be informed about quitting clients!
Maybe the chat system can be used for that, but I think this is a future feature.

There are other error messages which should be shown to the user too without crashing like
- inactive FogOfWar is not allowed in Multiplayer
- inkompatibel Versions ( of Client And Server )
- inkompatible Data

I know errorhandling in current glest is exit(-1) or worse ....
What do you think about this?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Yes, eventually I'll try to display messages for errors and keep the game running for things like socket errors, etc. I ALREADY added a chat message to ALL connected players when a player quits the game (you should notice it when a player disconnects). I also already have the code in place for FogOfWar, version and data checking... its just disabled right now until we make sure the network code is working well, then I will have time to test the other code.

Thanks

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Now I saw the "player quits game" message :). Thats good!

A little problem:
We played 2 bigger games today in local LAN (Because  I couldn't find any online players to test :( ).
Both ended without a crash, but we had a different problem in one game:
It was a two player vs Cpu+CpuMega game.
In the end of the game we had really lots of units and the CPU-Players too. Suddenly the game was choppy on the client computer and it stayed this kind of choppy to the end of the game. It looked like the ultra-speed-problem which I already described some posts earlier. I think it was only possible to finish the game properly, because the client always waits for the next command round by the server.
I'm not quite shure what happened exactly, because it was the computer of my son who had those problems and he didn't remebered what happend exactly. In addition I accidently lost both logfiles :( from server and client, because we simply started a new game before saving it.

« Last Edit: 1 February 2010, 21:28:41 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
more network errors:

1.
Attention, be ready to give a kill -9 from a console with this bug! It fills the harddisk with a huge logfile!

My local Lans has ip-range is 172.20.100.x .
Now if glest trys to connect to a server ip inside this LAN everything is fine. When there is a server with open slots it connects, If there is no such server, it freezes a second but it doesn't connect.

Try the same thing with an IP which is not in your local LAN ( I tried one of tom123s IPs to reproduce his errors )
I tried it with 192.168.1.12 ( there is no server running ). Glest freezes like before, but then it suddenly says "connected to server".
when you now click on anything or you try to chat with the server glest somehow freezes and start to write a huge logfile and doesn't stop until the process is killed with "kill -9" .

2.
Some setup as before, I tried to connect to a foreign IP:
it freezes, it gets choppy and said connected to server, but I did nothing after this. 2 minutes later it crashed. I couldn't reproduce it, but here is the logfile:

Code: [Select]
In [shared_lib/sources/platform/posix/socket.cpp::connect] #2 Error connecting socket for IP: 192.168.1.12 for Port: 61357 err = -1 errno = 115 [Operation now in progress]
In [shared_lib/sources/platform/posix/socket.cpp::connect] EINPROGRESS in connect() - selecting
In [shared_lib/sources/platform/posix/socket.cpp::connect] Timeout in select() - Cancelling!
In [shared_lib/sources/platform/posix/socket.cpp::connect] Valid recovery for connection sock = 15, err = 0, errno = 115
In [glest_game/main/program.cpp::setState] START
In [glest_game/main/program.cpp::setState] A
In [glest_game/main/program.cpp::setState] B
In [glest_game/main/program.cpp::setState] C
In [glest_game/main/program.cpp::setState] END
In [glest_game/main/program.cpp::setState] START
In [glest_game/main/program.cpp::setState] A
In [glest_game/main/program.cpp::setState] B
In [glest_game/main/program.cpp::setState] C
In [glest_game/main/program.cpp::setState] END
In [glest_game/menu/menu_state_join_game.cpp::mouseClick] START
In [glest_game/menu/menu_state_join_game.cpp::connectToServer] START
In [glest_game/network/client_interface.cpp::connect] START
In [glest_game/network/client_interface.cpp::connect] END - socket = 15
In [glest_game/menu/menu_state_join_game.cpp::connectToServer] server - [192.168.1.12]
In [glest_game/menu/menu_state_join_game.cpp::connectToServer] END
In [glest_game/menu/menu_state_join_game.cpp::mouseClick] END
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
Restarting audio source because of buffer underrun.
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
....

This repeats very very often!!! And was constantly written for all the 2 minutes!!
.....
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
[shared_lib/sources/platform/posix/socket.cpp::isWritable] TIMEOUT while selecting socket data, err = 0, errno = 11 [Resource temporarily unavailable]
 (Error: Connection timed out)
« Last Edit: 2 February 2010, 09:33:28 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Ok this should be fairly easy to fix. Shall I update code in SVN or should I make another 7zip archive on my website?

Thanks

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
On this issue I am very sorry, I just report the game BUG, thank you!
« Last Edit: 2 February 2010, 01:24:14 by tom123 »

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
Hi, softcoder! Please help me! You please help me solve this problem, Thank you!
« Last Edit: 2 February 2010, 03:30:31 by tom123 »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Tom I realize you don't know english too well but please stop posting multiple messages before giving people a chance to answer you. Your impatience will make people ignore you.

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
OK,I keep quiet, but please help me solve this problem!

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
FYI, for anyone wanting the latest mega-glest on windows, I was able to compile it and it is available for testing at:

http://www.soft-haus.com/glest/code/glest_3.2.4-4-beta1_win32.7z

This is v3.2.4-4-beta1

Thanks

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
@softcoder:
Did you find both bugs? The "ultra speed" bug too  :o :o
For the source releases: If possible, please make both of them. A sourcepackage to download on your website/or on sourceforge and a SVN checkin. ( you can checkin now )

Update:
If you want you can also upload the latest windows build on SourceForge.
« Last Edit: 2 February 2010, 12:56:21 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
I did not fix the ultra-speed bug, I don't fully understand it enough to know what to look for. If possible could you re-explain the problem with as much detail as possible? I tried looking over all messages in this thread and I see bits and pieces but not enough to understand exactly what is happening.

I did fix the connect bug and I have created (hangs his head low for now) a Visual Studio Express 2008 project which builds mega-glest for those Bill Gates lovers. For now I will hold off from checkin in anything to SVN until I have:

a) cleaned up junk in my project folders
b) understand and fix the speed bug.

I can checkin the code now if you want but I think it would be better to cleanup things first and checkin the Windows project files etc.. when its all ready.

Thanks

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
All I now about the speedup:
If glest is slowed down by whatever for example swapping OS, slow rendering ( due to slow gfx card or too many units ) or slow cpu ( too many units to manage ) it speeds up its game speed to catch up its frame rate. This happens in singleplayer as in multiplayer. Glest slows down again if its back on track...
There is a bug in glest where it doesn't slow down again( I don't now the reason ) and it stays in ultra speed mode. This typically happens on slow machines which often need a little speedup.

Now for multiplayer and what we saw:
In multiplayer this might happen too. Glest speeds up for some reason and fails to slow down again. By this it stays in ultra speedmode. But due to the restrictions in multiplayer mode it has to wait for messages from the server for every "network frame". This ends up in something choppy.
speed->waiting->speed->waiting and so on.
I was not playing on this computer when it happened, but when i saw it, this was what I instantly thought. So it might be something different, but don't think so.

I don't think this bug is a real blocker for a release, because it is there since I know glest, but its an annoying one ....

For SVN: Yes thats exactly what i hoped you will do :) .
I have to cleanup too, but I will do it after your checkin. I didn't touched anything yet to avoid conflicts in SVN with your modifications. So the current code state is exactly 3.2.3 ( but not the editor )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
glest3.2.4 whether the latest version of the recently introduced???

Hi, softcoder! To invite you to this address go and I see what I put forward the question on the glest, thank you! https://forum.megaglest.org/index.php?topic=4950.25

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
What does this mean?  ???

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
What happened in the end, Oh, My God!
« Last Edit: 3 February 2010, 01:27:54 by tom123 »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
For the windows EXE problem:

If you compile Glest and somebody else tries to run in on their machine and they get "Application failed to start because side-by-side configuration is incorrect" then they either need to install  Microshaft Visual C++ 2008 Redistributable Package (x86) http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en or you need to link in the C runtime libraries statically.  The later basically involves setting C/C++ -> Code Generation -> Runtime Libray to "Multi-threaded (/MT)" and then adding libcmt.lib in Linker -> Input -> Additional Dependencies and will generate a slightly larger file.

I don't have time to recompile at the moment so install the VC2008 runtime from the link above.

Thanks

Super Tom

  • Draco Rider
  • *****
  • Posts: 311
    • View Profile
I would like to know the latest glest3.2.4-4-beta1 for ubuntu whether there are updates? Thank you!
« Last Edit: 3 February 2010, 02:15:08 by tom123 »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Sorry to report that MegaGlest isn't working for me  :(

I was getting the side-by-side error described above.
Downloading and installing the fix link made no difference. I don't have the skills to recompile it myself so I'll just have to wait for a fix  :'(
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
I'll try on my Laptop....
Egypt Remastered!

Proof: Owner of glest@mail.com

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Ok......it didn't work............ :(

It told me to view the log-file or use the sxstrace thing, there's no log-file, and there has to be a log-file for either of those options to work.......
D*mn Microsoft........

I'll try that fix, but I doubt it will work...
Egypt Remastered!

Proof: Owner of glest@mail.com

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Ok, I'll recompile the win32 build and get this fixed. I just got the map editor compiled for Windows and will look at the G3d Viewer next.

This is all new for me so please be patient.

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
If i remember correctly g3d viewer needed patching in vanilla glest, at least for linux. Long time ago i posted this patch:
http://www1.inf.tu-dresden.de/~s1445051/glest/g3d_viewer.patch

Don't know if it still works.