News:

Currently available MegaGlest gameservers are listed on Play.MG.

Main Menu

Performance improvement for Glest multiplayer... 4 player is now practical

Started by softcoder, 16 January 2010, 03:17:15

Super Tom


titi

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

@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

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

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.




Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

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:

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)



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

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

On this issue I am very sorry, I just report the game BUG, thank you!

Super Tom

Hi, softcoder! Please help me! You please help me solve this problem, Thank you!

softcoder

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


softcoder

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

@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.



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

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

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

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


Super Tom

What happened in the end, Oh, My God!

softcoder

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

I would like to know the latest glest3.2.4-4-beta1 for ubuntu whether there are updates? Thank you!

wciow

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-


-Archmage-

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...

softcoder

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

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.