<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">James Cameron wrote:<div class=""><br class=""></div><div class="">> As a wild guess, you may not have disabled the Nagle algorithm on the TCP socket?</div><div class=""><br class=""></div><div class="">You scored a point by making me open up my copy of TCP/IP Illustrated volume 1 by Richard Stevens ;-)</div><div class=""><br class=""></div><div class="">I have not disabled it. But I also have not gotten to a bunch of other packet optimizations. Every function which sends data currently ends with a WriteAndFlush (guaranteeing correctness). I’m confident I can aggregate my SP_PLAYER sends with Writes and then execute one WriteAndFlush each every 0.1 seconds.</div><div class=""><br class=""></div><div class="">I also haven’t checked the tcpdumps to see how many packets per second my server is sending to a client versus the existing server.</div><div class=""><br class=""></div><div class="">I will get to these optimizations.</div><div class=""><br class=""></div><div class="">For now, the COW blinking may have been CPU related. My Linux VM is running on a 2013 iMac. I’d love to have an observation of how well/poorly my server looks from Windows and Linux clients which are not running in VM’s. For reference, my <a href="http://netrek.networkmom.net" class="">netrek.networkmom.net</a> server is located in the SFO region.</div><div class=""><br class=""></div><div class="">Good progress today on command-line-arguments and logging, which were necessary infrastructure for tomorrow's “genocide logic” and “user database” day.</div><div class=""><br class=""></div><div class="">Darrell</div><div class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 16, 2020, at 4:04 PM, James Cameron <<a href="mailto:quozl@laptop.org" class="">quozl@laptop.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">As a wild guess, you may not have disabled the Nagle algorithm on the<br class="">TCP socket? Aggregation and delay of data in the outgoing queue does<br class="">cause an effect that can be reported as "blinking".<br class=""><br class="">On Thu, Jul 16, 2020 at 03:27:18PM -0700, Darrell Root wrote:<br class=""><blockquote type="cite" class="">Thank you! This bug is now resolved thanks to your help and Bill Balcerski’s<br class="">bug report!<br class=""><br class="">It looks like the explosion gets animated in the EXPLODE state. Then there is<br class="">a pause in the DEAD state allowing torpedoes to run out. But then I needed to<br class="">migrate the user to the OUTFIT state to get back to the “select ship/quit”<br class="">screen. I chose 1 second for each of those two states.<br class=""><br class="">I think most of the “client blinking” in the x86 client (that Bill reported) is<br class="">resolved. But I’m seeing a huge quantity of “stuff blinking” on the COW client<br class="">running in a Parallels VM on my Mac.<br class=""><br class="">I’m not sure whether the “stuff blinking” is an artifact of the Parallels VM or<br class="">a real problem. In the x86 client case, I was sending unnecessary updates to<br class="">the client, resulting in continuous redraws.<br class=""><br class="">If someone could pop up a COW client on a native Linux box, point it at [1]<br class=""><a href="http://netrek.networkmom.net" class="">netrek.networkmom.net</a>, and report if they see planets/ships on the screen<br class="">blinking too much, I’d appreciate it.<br class=""><br class="">Darrell<br class=""><br class=""> On Jul 16, 2020, at 2:19 PM, James Cameron <[2]<a href="mailto:quozl@laptop.org" class="">quozl@laptop.org</a>> wrote:<br class=""><br class=""> Looking at Gytha's __init__.py which contains a paste of the protocol<br class=""> definition;<br class=""><br class=""> SP_PSTATUS, indicates PDEAD state<br class=""> client animates explosion<br class=""><br class=""> SP_PSTATUS, indicates POUTFIT state<br class=""> clients returns to team selection window<br class=""><br class=""> Looking at Gytha's PhaseFlight class, the event loop exits on POUTFIT<br class=""> "# no longer flying".<br class=""><br class=""> Looking at Gytha's nt_play_a_slot "keep playing on a server, until<br class=""> user chooses a quit option, or a list option to return to the server<br class=""> list", play continues until POUTFIT.<br class=""><br class=""> On Thu, Jul 16, 2020 at 01:55:03PM -0700, Darrell Root wrote:<br class=""><br class=""> Netrek-dev,<br class=""><br class=""> My Swift Netrek server has a compatibility problem with COW and Windows<br class=""> clients.<br class=""><br class=""> When a person dies, the clients do not pop up the “choose team” screen.<br class=""> So<br class=""> people have to disconnect to respawn.<br class=""> The clients also do not show the “you were killed by [WEAPON] from<br class=""> [PLAYER]<br class=""> message when connected to my server.<br class=""><br class=""> What message/flag sent from the server triggers that window / message?<br class=""><br class=""> I was assuming it was the whydead and whodead fields in the SP_YOU, but<br class=""> so far<br class=""> I haven’t been able to get it working.<br class=""><br class=""> Here’s a sequence of SP_YOU messages from [1][3]<a href="http://pickled.netrek.org" class="">pickled.netrek.org</a>.<br class=""> These can be<br class=""> assumed to be correct. I’ve put the death and respan in BOLD<br class=""><br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 64 shieldStrength 100 fuel 10000 engineTemp 0 weaponsTemp 0 whyDead 0<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 10000 engineTemp 0 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9980 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9960 engineTemp 10 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9940 engineTemp 15 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9924 engineTemp 19 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9908 engineTemp 23 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9892 engineTemp 27 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9876 engineTemp 31 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9860 engineTemp 35 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9848 engineTemp 38 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33562624 damage<br class=""> 103 shieldStrength 100 fuel 9836 engineTemp 41 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags 2049<br class=""> damage<br class=""> 0 shieldStrength 100 fuel 10000 engineTemp 0 weaponsTemp 0 whyDead 2<br class=""> whodead 6"<br class=""> "Received SP_YOU 12 1 hostile 13 war 0 armies 0 tractor 0 flags<br class=""> 33556481 damage<br class=""> 0 shieldStrength 100 fuel 10000 engineTemp 0 weaponsTemp 0 whyDead 2<br class=""> whodead 6”<br class=""><br class=""> Here’s a sequence of SP_YOU messages from [2][4]<a href="http://netrek.networkmom.net" class="">netrek.networkmom.net</a>.<br class=""><br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 78 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 0<br class=""> whodead 0"<br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 118 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 0"<br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 118 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 0"<br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 118 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 0”<br class=""><br class=""> …large number of identical messages deleted…<br class=""><br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 118 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 0"<br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage<br class=""> 118 shieldStrength 100 fuel 9460 engineTemp 5 weaponsTemp 0 whyDead 2<br class=""> whodead<br class=""> 0"<br class=""> "Received SP_YOU 12 16 hostile 14 war 14 armies 0 tractor 0 flags 2048<br class=""> damage 0<br class=""> shieldStrength 100 fuel 10000 engineTemp 0 weaponsTemp 0 whyDead 0<br class=""> whodead 0”<br class=""><br class=""> (Looks like I need to fix whodead, but 0 is valid so I don’t think<br class=""> that’s the<br class=""> cause).<br class=""><br class=""> Could it be PFREFIT?<br class=""><br class=""> For reference, here’s the p_flags fields. While my current<br class=""> implementation is<br class=""> missing red/yellow/green, I don’t see anything relevant.<br class=""><br class=""> /* bit masks of p_flags */<br class=""> #define PFSHIELD 0x0001 /*!< shields are up */<br class=""> #define PFREPAIR 0x0002 /*!< repairing damage or shields */<br class=""> #define PFBOMB 0x0004 /*!< bombing planet while orbiting */<br class=""> #define PFORBIT 0x0008 /*!< orbiting planet p_planet */<br class=""> #define PFCLOAK 0x0010<br class=""> #define PFWEP 0x0020<br class=""> #define PFENG 0x0040<br class=""> #define PFROBOT 0x0080<br class=""> #define PFBEAMUP 0x0100<br class=""> #define PFBEAMDOWN 0x0200<br class=""> #define PFSELFDEST 0x0400<br class=""> #define PFGREEN 0x0800<br class=""> #define PFYELLOW 0x1000<br class=""> #define PFRED 0x2000<br class=""> #define PFPLOCK 0x4000 /* Locked on a player */<br class=""> #define PFPLLOCK 0x8000 /* Locked on a planet */<br class=""> #define PFCOPILOT 0x10000 /* Allow copilots */<br class=""> #define PFWAR 0x20000 /* computer reprogramming for<br class=""> war */<br class=""> #define PFPRACTR 0x40000 /* practice type robot (no<br class=""> kills) */<br class=""> #define PFDOCK 0x80000 /*!< docked to a base, p_dock_with<br class=""> valid */<br class=""> #define PFREFIT 0x100000 /* true if about to refit */<br class=""> #define PFREFITTING 0x200000 /* true if currently refitting<br class=""> */<br class=""> #define PFTRACT 0x400000 /* tractor beam activated */<br class=""> #define PFPRESS 0x800000 /* pressor beam activated */<br class=""> #define PFDOCKOK 0x1000000 /* docking permission */<br class=""> #define PFSEEN 0x2000000 /* seen by enemy on galactic<br class=""> map? */<br class=""> /*#define PFCYBORG 0x4000000 a cyborg? 7/27/91 TC */<br class=""> #define PFOBSERV 0x8000000 /* for observers */<br class=""> #define PFTWARP 0x40000000 /* isae -- SB transwarp */<br class=""><br class=""> References:<br class=""><br class=""> [1] [5]<a href="http://pickled.netrek.org/" class="">http://pickled.netrek.org/</a><br class=""> [2] [6]<a href="http://netrek.networkmom.net/" class="">http://netrek.networkmom.net/</a><br class=""><br class=""> _______________________________________________<br class=""> netrek-dev mailing list<br class=""> [7]<a href="mailto:netrek-dev@us.netrek.org" class="">netrek-dev@us.netrek.org</a><br class=""> [8]<a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br class=""><br class=""> -- <br class=""> James Cameron<br class=""> [9]<a href="http://quozl.netrek.org/" class="">http://quozl.netrek.org/</a><br class=""> _______________________________________________<br class=""> netrek-dev mailing list<br class=""> [10]<a href="mailto:netrek-dev@us.netrek.org" class="">netrek-dev@us.netrek.org</a><br class=""> [11]<a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br class=""><br class="">References:<br class=""><br class="">[1] <a href="http://netrek.networkmom.net/" class="">http://netrek.networkmom.net/</a><br class="">[2] <a href="mailto:quozl@laptop.org" class="">mailto:quozl@laptop.org</a><br class="">[3] <a href="http://pickled.netrek.org/" class="">http://pickled.netrek.org/</a><br class="">[4] <a href="http://netrek.networkmom.net/" class="">http://netrek.networkmom.net/</a><br class="">[5] <a href="http://pickled.netrek.org/" class="">http://pickled.netrek.org/</a><br class="">[6] <a href="http://netrek.networkmom.net/" class="">http://netrek.networkmom.net/</a><br class="">[7] <a href="mailto:netrek-dev@us.netrek.org" class="">mailto:netrek-dev@us.netrek.org</a><br class="">[8] <a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br class="">[9] <a href="http://quozl.netrek.org/" class="">http://quozl.netrek.org/</a><br class="">[10] <a href="mailto:netrek-dev@us.netrek.org" class="">mailto:netrek-dev@us.netrek.org</a><br class="">[11] <a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br class=""></blockquote><br class=""><blockquote type="cite" class="">_______________________________________________<br class="">netrek-dev mailing list<br class=""><a href="mailto:netrek-dev@us.netrek.org" class="">netrek-dev@us.netrek.org</a><br class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev<br class=""></blockquote><br class=""><br class="">-- <br class="">James Cameron<br class=""><a href="http://quozl.netrek.org/" class="">http://quozl.netrek.org/</a><br class="">_______________________________________________<br class="">netrek-dev mailing list<br class="">netrek-dev@us.netrek.org<br class="">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>