1999-05-22 SMP: The SMP support is solid enough to play with now. The only feature that is still broken is light flares. As a happy consequence, some of the cleanup work I did for SMP gave a couple percent speedup even when running without the separate thread. On my development system, a dual 300 mhz intergraph realizm II, the low res timedemo scores went from 27.8 to 37.8 with "r_smp 1". This is only a 35% average speedup, but at some times (lots of dynamic lights in complex scenes) the speedup is 90%+. Gameplay is noticably smoother. The rendering thread is almost always the blocking factor, so the faster the card and OpenGL driver, the larger the speedup will be. This is explicitly a two thread producer/consumer, so there is no benefit to more than two processors. The app is well behaved, using sleeping synchronization so that you usually still have half a processor free for other operating system functions. My original attempt was to make a DLL that intercepted all OpenGL calls and let a separate processor execute them. The benefit would have been that all OpenGL applications could have gone faster. The problem was that the bandwidth required to encode all the commands was enough that the processor overhead was as much as it would have taken to just do the geometry on the main processor. It would have still been a win if the geometry side was doing lots of work, like multiple lights, user clip planes, and texgens, but for the vast majority of geometry, it did not balance out. If someone wanted to try that using the PIII or AltiVec streaming memory operations, it could probably still work. The current SMP code is implemented directly into the renderer, and a lot of things were moved around and double buffered to allow it to use data in place, instead of having to copy it off. Threading has been presented so often as the "high tech" "cool" way to program, that many people aren't aware of the downsides. A multi-threaded program will always have somewhat lower throughput when running on a single CPU than a single threaded program that polls in explicit places. The cost of a context switch at the cpu level is negligible, but the damage that it can do to the cache hierarchy can add up to a noticeable amount in bad cases. The much larger problem is that you lose tight control over when things occur. If the framerates are low enough, it isn't a huge issue, but for applications running at 30+ fps, you really don't want to trust the OS scheduler to coordinate multiple threads and have them all get in every frame. Yes, with explicit sleep() calls you can sort of get it working, but at that point, you might as well not be using threads. A good example of not-quite-in-sync issues in the windows mouse performance. A PS/2 mouse only samples 40 times a second, so when you get an app updating at around that speed, you will get 0/1/2 scheduling variances. They are also not terribly portable, and a pain in the ass to debug. 1999-05-19 [Crashtest #4]: "download" crashtest. SMP: I finally got around to implementing dual processor acceleration today. I still have a couple issues to resolve and some more rearranging to do, but it is giving 20%+ speedup right now in a worst-case situation for it. When completed, I expect the average speedup to be in the 40% to 80% range, depending on what is going on and the video configuration. Scenes with lots of dynamic lighting and lots of sounds and other client processing going will show the largest speedups. It helps the slow scenes more than the fast scenes, which is basically what you want. I am going to shake this out with the Windows (NT) code first, but it should definetely make its way to the linux port eventually. I know SMP is a cue for all the BeOS folks to ask about ports, so I'm going to head that off: Be has all the code for Q3 (and Q2, for that matter), and a version of Q3test should be available by the time they ship a release OS with OpenGL hardware acceleration. There will probably also be an SGI-irix port. Regarding both of those ports: they are not supported ports, and will be maintained by volenteers (like the current MacOS X port). Update releases will lag the official ones, and we won't commit to ANY dates. I am doing all of my development on intergraph and sgi-NT hardware, but when I have everything rock solid, I will give Nvidia and ATI's NT drivers a try. I would be somewhat shocked if they didn't explode -- I doubt multiple threads playing occasional tag team on a context has been well tested. True, only a tiny fraction of our players (probably less than 1%) will be able to take advantage of this, but I consider SMP usage to be an important technology to nurture over the coming years. The top of the benchmark chart should be an SMP system (assuming the NT drivers have all the optimizations of the '98 drivers), and it will also be possible to build a relatively cheap SMP system (say, dual 400's) that outperforms the best single processor system. 1999-05-18 SOCKS: My early testing was using a Linux based SOCKS server. I had to make a fix to work with Cisco's implementation; it seems I had a preliminary version of the RFC. So if your one of the small handful of people using Cisco equipment to connect to the net, this should work for you in the next release. I'm sure this will make Q3A work with other vendor's SOCKS servers too. There is one more case where it isn't working (WSAEAFNOSUPPORT errors) that I'm looking into. The username/password authentication has been added. 1999-05-12 Crashtest #3 was a combination of two problems: The symptom was disconnecting all clients with an illegible server message. This turned out to be caused by the fact that I was parsing strings out of my net buffers with a MSG_ReadChar() function, and I was checking for EOF as a negative one return value. I had to change this to a MSG_ReadByte() call, because -1 was showing up in the messages, which then caused a parse error because it wasn't really the end of the message. The actual root of that issue was code like this: { char buffer[MAX_STRING_CHARS]; ... strncpy( buffer, input, sizeof(buffer) - 1 ); ... } No buffer overruns are possible, but buffer is not forced to be zero terminated if on the stack. I'm pretty sure this was a result of copy-and-paste code where buffer used to be a static with a guaranteed zero, but it made me find several other places where similar things were happening. I had started using a Q_strncpyz() function a while ago that guarantees a trailing zero and doesn't require the -1, but it turned out that between code I had written a long time ago, and code that either Cash or Brian had added, there were still a lot of normal strncpy calls around. A lot of them were wrong, too. Either missing the -1, or missing the dedicated 0 fill in. Crashtest #4 was a variation on the first part of #3. Only one of these attacks so far has been a server crasher. * fixed crashtest 4 * fixed crashtest 3 * fixed jumping-over-item pickup prediction error * made "Couldn't load sound" a developer only warning * fixed demo recording not including portal surface entities * precache grenade bounce sounds 1999-05-11 * clear game memory at init, which fixes the stuck-at-intermission problem on mac servers * fixed mismatched free / Z_Free in demo menu * removed unused reference to sprites/plama.md3 * automatically get sounds from model name * scale sensitivity by zoom * immediately archive changes to latched cvars * cheat protect r_portalonly * don't print "XXX connected" on level restarts * fixed "give item" on levels where 0,0,0 is in solid * fixed timedemo * don't play pain falling sound if dead * fixed falling damage sound not snd specific * fixed crashtest 2 * fixed crashtest 1 * q3map_backshader * q3map_globaltexture * Some large connectionless packets can cause crashes. This one was a result of me having the maximum token size defined lower than the maximum string size. [crashtest2] * It doesn't crash the server, but fmtspec names will crash all clients that try to log on. Technically that would be an upkeep required DOS attack. I even had a "FIXME: make vsprintf safe" comment by the offending line... I am going to update the server to filter out all % chars that come in over the net to prevent any other similar things. [crashtest1] * I still have a couple things to change in the map format. 1999-05-10 * There's one known issue with the Linux dedicated server taking up way too much CPU time. * The config files from the old [1.03] build are BAD voodoo. 1999-05-10 * fixed crash case on fallback from an unsupported fullscreen * fixed overrun with very fast system connecting to a very lagged server * fixed bad Z_Free on sounds not found * fixed autoswitch with sync clients * fixed losing console field on positive histories * fixed demo recording and playback with new net code * handle signed bit fields in msg code * fixed playerstate event bit loss on encoding * fixed "bad clientnum on player entity" * reenabled corpses sinking into ground 1999-05-09 There are a few known issues that I decided NOT to hold the test up for: The gauntlet is functioning correctly, but the visuals are wrong. The designed behavior is that when you hold down attack it will scan for a target and only punch forward when it hits. The visuals currently show it punching constantly. Dynamic lighting is currently taking a really excessive amount of cpu time. If you are having performance problems in firefights, you may want to turn it off. The option is in the preferences, or you can just issue "r_dynamicLighting 0" at the console. The powerup item sounds aren't global across the entire world since I went to the client side predicted items. There are some cases when a weapon that was picked up with a predicted item and immediately fired doesn't make a muzzle flash. * fixed fs_copyfiles after ospath split * fixed look-at-killer * changed railgun impact to plasma dish * convert connect packet to infostring * put footsteps back in... * r_drawsun 0 by default to avoid probs for now * fixed event clear overwrite problem * client side predict weapon switch on item pickup * changed sound fallbacks to "visor" from "male" * made turbulent texcoords based off of xyz instead of st 1999-05-08 There is one must-fix issue and a couple smaller issues remaining before the release candidate build, then we have to do a lot of testing on it. I made a lot of significant changes in the last week, and I'm sure there are some things we still need to sort out before we inflict it on the general public. * fixed give item bug * new first snapshot timing * moved sun drawing outside of sky shader to fix showtris * r_drawSun * handle all shader tesselations in q3map with tjunc fixups * different flatness epsilons for edge vs border grids * reorganize sound directories * removed footsteps on non-metalic and non-water surfaces * fixed bug with multiple looping sounds * client side predict teleporters, go to "hyperspace" * precache remaining liquid sounds * don't fire jumppad events if upward velocity 1999-05-07 * changed grabbed items to SVF_NOCLIENT instead of EF_NODRAW now that the pickup event is on the player * clear event flags with event on reset * move playerstate to netfield bit communication * fixed configstring delta sequencing issue after initial gamestate * extended the netgraph: short red lines are missing client to server packets (need to drop 3 in a row) * extended cg_debugevents * increased cl_maxpackets to 30 * fixed bug with console field not getting drawwidth set * fastsky implies noportals * changed fastsky color * q3map now fixes tjunctions at fog boundaries * build optimized tree with visible hulls of sides * adjusted plane culling to avoid some cracks * r_facePlaneCull * fixed too-lax colinear collapse to avoid some cracks 1999-05-05 * client side predict item pickups running over items was one of the few remaining locally perceived signs of lag * new point-in-patch test code * fixed pathname errors when mac users had slashes in their paths: "B/W mac". 1999-05-04 * seeded random numbers differently on tourney restarts * fixed events on initial snapshots * removed g_maxentities configuration, set by G_ENTITY_BITS * cl_motd 0 to allow never sending request packets * fixed map cache clearing bug * cg_drawFPS 1 for running fps counter in corner * remove all teleport destination pads * moved checkmap out of cgame * moved time positioning out of cgame * made usercmd overrun freeze in place instead of snapping back * slightly increased shotgun spread * protected against using a cleared clientinfo * use snapped origin from players for linking to prevent * slight prediction errors during player collisions 1999-05-01 * list of updates, a rehash of John's .plan Mac specific - improved networking stability - improved device scanning - improved speed - improved memory checking - improved sound latency Generic - global motd/update server - added drop shadow to field characters and fixed scrolling - fixed edge-of-bounce-pad misprediction error (server side) - removed broken weapon-stay dmflag - made menu gfx never picmip - cheat protect r_lightmap - cheat protect r_nocurves - clear sound buffer before any file IO - continuous scoreboard / ping update when tab is down - put version number on menu background - dim out behind floating menus - fixed server crashing string bug - adjusted scoreboard for 8 players - show hostname on connection screen - fixed null model warning on startup - more space for hostname on local servers screen - sv_privateClients, sv_privatePassword - "server is full" message on connect screen - archive handicap in config file 1999-04-30 * vmtest framework, q3asm work * converted scene building to procedural style allows better error checking, better performance characteristics when interpreted, and is a setup stage for SMP optimizations in the renderer if I get around to it * protected some potential div by 0 areas in cgame 1999-04-30 * rework versioning for architecture tracking * use a seperate endpoint for address resolves on mac * hide OTLook warnings if "developer" isn't set * defered mac renderer scanning until after mode set so 8 bit desktops don't confuse it * global motd/update server * fixed view model animations on models with custom anims 1999-04-28 * converted sound positioning away from callback method * increased mac memory zone by 5 megs * new memory allocator for temporary render use during init * converted cmodel references to handles and range checked * converted sound references to handles and range checked * converted file references to handles and range checked 1999-04-27 * cgame converted to use local buffer based lerpTag * cgame converted to use local buffer based argv [both: for interpretation (LCC bytecode/QVM)] * new sound code to remove latency * added drop shadow to field characters and fixed scrolling * fixed edge-of-bounce-pad misprediction error (server side) * remove broken weapon-stay dmflag * made menu gfx never picmip * cheat protect r_lightmap * clear sound buffer before any file IO * use GetOSEvent instead of WaitNextEvent on mac when fullscreen removes hitches caused by other tasks and gives a performance boost * continuous scoreboard / ping update when tab is down * put version number on menu background * fixed toggle cvar bug * dim out behind floating menus 1999-04-26 * converted cvar allocation to indexes to allow range checking * cgame converted over to use vmCvar_t instead of cvar_t needed for interpreted cgame * fixed server crashing string bug * adjusted scoreboard for 8 player * show hostname on connection screen * fixed null model warning on startup * more space for hostname on local servers screen * fixed mac Open Transport memory buffer bug this was causing most of the mac crashes * made Info_ValueForKey() case insensitive * sv_privateClients, sv_privatePassword this allows you to reserve slots on a public server for password access while allowing most to be freely available * "server is full" message on connect screen * archive handicap in config file * cheat protect r_nocurves * byte order independent zip checksum * removed cl_stereo, use glConfig.stereoEnabled ----------- quake3/CHANGES.id ----------------------------------