*** empty log message ***
update copyrights and other minor stuff to deliantra
major changes: - on_same_map and related functions now do not block on map loads, instead they pretend the map is not there. this ensures lag-free operation, but changes semantics considerably: running quickly over the worldmap often lets you bump into map borders until the map has been loaded. also, rabies takes longer to nuke a full continent now. - mapinfo (a major sync blocker) is now fully asynchronous, and works by quieing all mapinfo requests and retrying them on every tick until satisfed.
*** empty log message ***
bg-scrub sounds, too
big semantic change - old server and crossfire did update/draw maps check for player commands, move players and monsters flush sockets - new server does check for player commands, move players and monsters update/draw maps flush sockets I have zero idea why the old code didn't do it this way. the net effect is that there is a guarenteed delay of one tick between an issued command and the player seeing its execution. The same for monster movements. That is, the new ordering reduces "lag" by a constant 120ms, which is immense, and can be felt immediately. This is a change I wanted to do for a long time. Apart from that, the tcp send code has been simplified and underwent some further tuning, leading to an even more accurate congestion management.
implement the most elaborate rate limit system to date, from the errors before: - output-rate is now an upper bound only. its purpose is to give the user some control over bandwith use. it should be set too high rather than too low. - the server will (on linux only, or systems that support tcpi), guess how much the kernel is willing to send without delay (this is imperfect as we do not know the remote receive window, but we assume its "large enough"). - we accuretyl measure mss and ensure that preferably mss-sized packets leave the server, by sending less in some cases and more in others to reacht eh desired bandwidth goal (e.g. 15000 == http://ue.tst.eu/545350740128735b13aaf541c88bfaf2.txt) the net effect is that the server will never send (much) more data than the kernel thinks the network is able to handle. that is, when the connection was idle for a time and the congestion window is small, we will only start sending small amounts of data, prompting the kernel to accuratly model the bandwidth. in essence, this creates a tcp stream that never has more data buffered than neccessary for in-flight data, ensuring that we can get low-latency map updates through to the client whole using all excess bandwidth the network can handle. I mostly tested with netem, e.g. ifconfig lo mtu 1500 tc qdisc change dev lo root netem delay 190ms 10ms drop 0.1 gave me roughtly 20kb/s throughput even though output-rate was 100kb/s, without stalling the conenction even when downloading backgorund music and other large chunks of data.
added volume to sound effect packet, tuned overload management
allow perl access to the full tcpi structure. do some elaborate congestion control (very experimental, but better than the old way)
hacky new-style sound support, very hacky old-style sound support
welcome to fxix protocol version 3, with uniform handling over all resources
try a very simple method of failsafe-bandweidthing by not sending any data when the socket buffer could not be drained in the last tick
fix the fxix protocol mess and use some experimental sorting by size
- fix rate limiting _again_ (and this time it was an infamous unsigned comparison bug...) - send images strictly in order. this is a bit ugly but temporarily works around older cfplus clients not supporting interleaved transfers.
bork, bork (de-)
output-.rate limiting was rather completely borked
- upgrade crossfire trt to the GPL version 3 (hopefully correctly). - add a single file covered by the GNU Affero General Public License (which is not yet released, so I used the current draft, which is legally a bit wavy, but its likely better than nothing as it expresses direct intent by the authors, and we can upgrade as soon as it has been released). * this should ensure availability of source code for the server at least and hopefully also archetypes and maps even when modified versions are not being distributed, in accordance of section 13 of the agplv3.
- support priority as second argument of askface - send images of same priority in fifo order, but higher priorities first.
prepare for better fxixsx+rx protocol
first rough cut of msg rewriting, introducing cfpod, a haxored pod variant for crossfire messgaes. where will it end?
- introduce global NOW variable storing current tick time. - force some packet send at least every 2 seconds, forcing an ack reply. - timeout connections on ack delay exclusively, by default disconnect after 8 seconds (allowing for at least 5.5s of network hiccups). (linux only, should port to bsds). - nuke ericserver stats code. - reduce number of syscalls (less gettimeofday, only get tcp_info about once/second). - get rid of coroapi.time () in favour of now ().
- remove slow and unneeded cruft code from map1. - decouple map display/stats update from ob (use pl->obsere instead)
update copyrights in socket/*.C
new speed management: - weapon speed and object speed is now completekly decoupled for players. - both can be used at the same time, or indeepndent, when running or firing. - still only one command per object speed can be issued.
some floatingpoint µopts
- implement ix command in server, getting rid of both face# limit and image data size limit.
- fix ber encoding - reduce image checksum length to 6 bytes (from 16) - implement fx packet, which reduces face overhead to amortised 10/12 bytes per face instead of 21/32 bytes and allows an unlimited number of faces instead of 2**16.
add untested ber integer encoding function
- implement yet another bug workaround for gcfclient. its rather sad. when bg scrubbing, the server sends images in advance, about twice per second. then receiving a new image, gcfclient destroys the imventory and rebuilds it (the widgets). this makes using it rather hard, as twice per seconds all widgets go away and are replaced by new ones, so mouse clicks, if not fast enough, will be ignored, making the client rather hard to use. soo.... only to background sending for cfplus, which needs it least.
- background scrub the client face cache: - on the first image request, start sending out all faces in order (one face per tick) when there is no other image sending activity. - send out one image every BG_SCRUB_RATE max. if there is no other image sending activity. - by default this sends roughly 2 images to the client per second, and 8 face indications if the faces are already known to the client.
- make face caching mandatory, and pester users to enable it - implement rate-limiting, for images only right now - implement and document output-rate command to set rate limit. - default 1mbit.
nano-cleanups
comments
- bump coro to 3.4 minimum - delay server reload to after tick - avoid back-to-back reloads, as those crash Coro :/
- move most last_* values into socket, where they belong - this actually saved a lot of space in the text segment, which might mean less complicated pointer accesses, because the data is no where it belongs, mostly.
added some copyrights
add some robustness checks, add map find/load locking
restore log out logging, reduced command queue length to 3
- small, but subtle, rewrite of object management - perl will now keep attachable objects alive - objects are now refcounted - refcouts need to be tested explicitly (refcnt_chk) - explicit destroy is required current - explicit destroy asks "nicely" for the object to self destruct, if possible - refcounts will be used during mortal killing - minor bugfixes, optimisations etc. - some former hacks removed.
- preliminary check in, stuff is rudimentarily working - moved most of the player creation process into a perl coroutine - changed internal design of player management to not reuse and morph the object in funny ways. should be safer and much nicer to handle. - got rid of some annoying hacks, such as clear() (TODO: get rid of player_pod and other stuff now unnecessary?)
- made state a per-client variable (that does not magically make state a per-client thing!) - rename player->socket to player->ns. its not a good name for "client", but it is an historical artifact, and better than "socket".
- made client a first-class crossfire-perl object (its attachable), but perl support is missing. - added some client events - fixed reply not working after logout
- separate all comamnds into immediate/socket-level and queued/player-level - clean up player command handling, handle up to 8 commands/tick
re-enable async command execution
thats the crash bug
just reformats
- clean up some code - fix some possible (minor) bugs - use a bitset for anims_sent - fix a memory leak - removed dead code
fix memory leak in player command queue.
- remove no_shout - serialise command execution somewhat again :( - avoid exceptions
ah yes, zero-terminated binary data :( but hey, thats like perl :)
- limit command backlog to two seconds
- socket i/o is completely asynchronous now - some command sare handled immediately - others (most palying related commands) are queued for later (as of now synchronous) processing - specifying a max queue length (in seconds) is possible, but disabled - also add some syntax sugar for network code
the rename for sanity campaign hits you died - renamed stuff - partially updated copyrights - some cleanups
while goofing around, trying to understand the command code - did some reindentation - which lead me to find some dead code - which lead me to some optimisations and more dead code fun.
streamlined packet processing a bit, experimentally enabled more immediate paclets
- implement event watcher autoncancellation on reload - used it everywhere - removed lots of compatibility cruft - configure does no longer check for mandatory unix functionality/headers - confgiure now runs much faster
- write() is now independent of server ticks and will be done immediately - get rid of CORK hack, it is no longer necessary
- rewrote most of the socket loop code - moved connection accept into tcp.ext - no evil socket copying anymore, needs more cleanups
moar\! rewrite\!
(intermediate check-in for recoverability)
- further cleanup and rewrite - fix a potential crash in "lock" and "mark" packets
- medium decruftification - medium cleanups - make settings accessible to perl using cf::settings->mutator (completely untested)
replace some function- by method-calls
removed #ifn?def WIN32 from all files
indent
indent
fix a few ugly pod-constructs on non-pod objects, and a few newly introduced bugs
remove compression support, intiialise perl earlier etc. etc.
expand initial tabs to spaces
- added cfperl.h, soon to be used by events - no perl == exit, its no longer optional - moved server main loop entirely in perl - removed lots of unneeded timekeeping cruft
Made server compile with C++. Removed cfanim plugin and crossedit. C++ here we come.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.