AI War:Current Post-8.000 Beta
Revision as of 17:14, 16 September 2014 by Dominus Arbitrationis (talk | contribs) (→Official 8.014 Now With Moar)
Contents
- 1 Prerelease 8.015
- 2 Official 8.014 Now With Moar
- 3 Official 8.013
- 4 Official 8.012
- 5 Official 8.011
- 6 Official 8.010
- 7 Official 8.009
- 8 Official 8.008
- 9 Official 8.007
- 10 Official 8.006
- 11 Official 8.005
- 12 Prerelease 8.004
- 13 Official 8.003
- 14 Official 8.002 Lock And Load
- 15 Official 8.001 Oiling The Engine
- 16 Pre-8.0 Release Notes
Prerelease 8.015
(This isn't done yet, we're still working on it.)
Official 8.014 Now With Moar
(Released September 16th, 2014)
- The "sort ship textures" option has been removed from the settings window, because it literally had no performance benefit anymore (and yet still would make ships look a little odd in close zoom when they passed one another).
- Put in a protection against a (possibly rare or new or both) division-by-zero bug in the health bar rendering code.
- Thanks to FluidDynamite for reporting.
- A major new addition to the render pipeline has been created, and is now in use not only here but also in Spectral Empire and The Last Federation. This new systems does highly-efficient sprite batching, which makes the framerates absolutely skyrocket when there is a lot of stuff on the screen at once (big battles, ahem. Previously on machines that would chug if there were thousands of shots onscreen at once (for instance), those now render incredibly efficiently.
- The amount of performance load this removes is frankly staggering. In one performance regression test savegame, there were 25,317 enemy ships invading a system. This was leading to 5,875 draw calls at times, which is just astronomical. With the batching, that 5,875 translates to merely 162, and everything is still drawn visually the same as it was before. With the batching on, during this battle the game was running in realtime speed with 50fps framerate (a drop from the target of 60fps, but not a heavy one for that scale of battle).
Official 8.013
(Released September 11th, 2014)
- Fixed an issue from 8.008 and onwards where if you were centering on some ships that were moving, they would appear to be blurry and jump around.
- Thanks to Fleet Unity for reporting.
Official 8.012
(Released September 10th, 2014)
- Reverted the do-while logic that was introduced in 8.009, which was causing ship movement to be extremely jerky even on high framerates. All the other improvements since then have been retained, as they were actual improvements, but that one wasn't working out.
- Thanks to FluidDynamite, Recombinant, and Fleet Unity for reporting.
Official 8.011
(Released September 10th, 2014)
- Converted a dictionary lookup to an array lookup for the far zoom icon renders. This possibly saves a tad of RAM, and almost certainly saves some CPU time.
- No longer compressing the far zoom icons, as that was making them ever so slightly blurry, most particularly on some machines more than others.
- Thanks to Fleet Unity for reporting.
- The last few versions have forced vsync on, but this is now a settings option that is merely on by default (so you can turn it off if it doesn't seem to be working well).
- The game also again now uses the Application.TargetFramerate setting, which it used to use, but hasn't lately. We're not super convinced that this works as advertised on windows, but perhaps this was making a difference on linux.
- Thanks to DrNoid for inspiring this change.
Official 8.010
(Released September 10th, 2014)
- In recent versions, the game had been updated to only redraw itself when the simulation actually changed. Aka, if ships hadn't moved, then don't clear the screen and draw them again -- that wastes CPU power and potentially makes your entire framerate slower since it's trying to keep something approximating precise timing, and wasting cycles on something that literally has no visual effect is detrimental to that.
- Well, one unintended side effect of this was that when you make certain interface changes -- zooming in and out, panning the screen, selecting units, drawing the selection box, etc -- it would not realize that it needed to go ahead and do a redraw when those things changed. So that made those things feel very choppy and simspeed-bound. Eep!
- Now the game looks at all those specific cases and says "consider the display in need of a redraw if one of these things has happened, even if the simulation has not yet had another step."
- If you find some case that was missed where there is still lag on some input piece when you're on the slower simulation speeds, then please do let us know. We marked all the ones that we found, which should be all the major ones, at least.
- Thanks to Zair for reporting.
Official 8.009
(Released September 10th, 2014)
- Put in some prevention code to prevent the screen from completely stopping rendering if for some reason it thinks the last frame just isn't rendering.
- Adjusted the recently-rewritten game timing code to now use Time.deltaTime instead of a stopwatch.
- A stopwatch is still used to detect runaway slow frames -- that's a big part of why it was used before -- but now the central timing is not based off of the stopwatch. The freezes in the non-menu graphics that people were seeing since the new timing was introduced was likely resulting from this.
- Put in yet another fix to a potential cause of the recent sometimes-main-graphics-freeze-but-menus-still-work issue. Basically there was a while loop that perhaps was coming back as false the first time on some occasions, and now it is a do-while loop to make sure that can never ever happen and it always renders at least one frame in these cases.
Official 8.008
(Released September 9th, 2014)
- The game now uses vsync in order to cap the framerate and avoid out of memory errors. If you are running below your screen refresh rate, which is super common, this still shouldn't affect your actual game speed adversely.
- For some players, it seems that with the framerate being able to just run too fast and thus cause a lot of transient memory, this would cause the game to lock up.
- A major shift to how the game pools sprite objects internally has been made; now there is one global pool regardless of sprite size, rather than a separate pool per sprite size. This adds a small bit of overhead to some draw calls (and none at all to many), while at the same time saving a fair bit of internal RAM.
- This reduces the starting memory of the game by about 20MB.
- Made several key simplifications to require less matrix math on the CPU attached to each draw call.
- The game is now compressing textures in memory much better, which leads to a much smaller game RAM usage. It also leads to faster rendering and lowered video-ram usage. The downside is that the image loading process is a bit slower, because it has to go through a one-time image compression process each time it loads an image. The tradeoff is really substantial in terms of RAM savings and GPU performance, however.
Official 8.007
(Released September 9th, 2014)
- Undid the change to make the game use DrawMeshNow so much in the prior version, as this may have been causing freezes and hitching for some players. And it didn't seem to be helping players overly much.
- Thanks to Daggus for reporting.
- Updated the game code to reuse materials for same-texture draws, rather than using quite so many materials as it was before.
Official 8.006
(Released September 8th, 2014)
- The game only uses DrawMeshNow again, since it seems to have better performance than DrawMesh in the specific context of AI War. This may be the root of the graphics performance woes that some folks are seeing.
- Thanks to blackied and Bud Backer for reporting.
Official 8.005
(Released September 7th, 2014)
- Completely rewrote the frame-scheduling/limiting code and the way that frame draws are calculated in order to solve some severe performance issues that the game has been having since the upgrade to the new unity engine.
- The issue that was happening was really kind of a confluence of events of different architectures clashing with one another. It wasn't bad code on anybody's part per se, but it was older engine code of ours clashing with newer unity engine code. Now our code has been updated with their revised engine in mind, and the result is seemingly the fastest AI War yet, although we'll see what other people report.
- Thanks to Bud Backer and blackied for reporting.
Prerelease 8.004
(Released August 29th, 2014)
- Fixed an issue that causes a crash while (auto)saving when the game is run with the steam overlay enabled (and, probably, the report-high-scores option on).
- Thanks to map66, spot888, and ArnaudB for reporting.
Official 8.003
(Released August 25th, 2014)
- Fixed a bug in the previous version that was preventing shots and explosions from drawing at all in far-zoom.
- Thanks to Toll, Dragondraikk, and others for reporting.
- The nebula intensity and max loading threads sliders are now wider, and also show their values. This lets you adjust them with better precision, and actually see what their current value is.
- Note that for the max disk threads slider the only values it allows are:
- 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 440, 480, 520, 560, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 2000, 2200, 2400, 2600, 2800, 3000, 3500, 4000, 4500, 5000
- Thanks to Kahuna and Vyndicu for inspiring these changes.
- Note that for the max disk threads slider the only values it allows are:
- Also, to answer a great question about the "max loading threads" feature from the prior version:
- Question: "I don't quite understand what this things does. Does it affect performance? If yes.. how? What would happens If I set it to minimum and what if I'd set it to maximum?"
- Answer: It affects disk loading only. So in other words, think of it like this:
- 1. If the number of max disk threads is 10, and you need to load 4000 items, then it will start loading 10, and then as soon as 1 finishes then it puts another in the list, and then another when the next one finishes, and so forth.
- 1.a. Assuming that the loading time and processing time are about even, then this is really just as efficient as any other method. However, that is NOT the case, because once something is loaded off disk it needs at least a few ms to convert its format from PNG into a GPU-specific compressed texture format that is prepped for being able to be sent along the bus immediately at any time to the GPU.
- 1.b. Even assuming that you only had a single-core processor with no hyperthreading or anythinig, case 1 is still somewhat less efficient because your CPU is still able to split things between threads, and your disk IO (which is the biggest bottleneck for any sort of loading operation) is not being fully utilized during the time when there is texture compressing, etc, going on.
- 2. In the case that we've been using for a while, we used 140 threads at max. So in the case where you need to load 4000 items, the likelihood of your disk IO ever being underutilized is basically zero. The ratio of CPU-processing time to the number of threads to the amount of disk IO at all available on modern hard drives -- even SSDs -- is such that unless you had the fastest SSD possible paired with a 15 year old CPU somehow, then you'd likely not be wasting any disk I/O. Even with theoretical future hardware, as long as CPUs remain equal to or faster than HDD loading speeds when it comes to these sorts of operations, it's perfectly fine. And that's highly likely.
- 3. However, in the case of the Unity bug, it can randomly tack on an extra 3-10 seconds of CPU "processing" where it does NOTHING. It just sits there, not even spinning cycles or using CPU capacity. What is it doing? I have no idea. It only affects certain systems, and never has affected one of mine. It did affect one of Keith's systems a year or so ago, but does not any longer. Anyway, in this case, Unity is basically "helpfully" simulating your having the worst CPU in the world, paired with whatever your hard drive is. 3-10 seconds to process that texture!? My 800mhz 2001 laptop could have managed better than that.
- 3.a. In this case, the amount of concurrency matters a lot. If you have 4000 threads to load, and you set a maximum of 4000 threads loading at once, then basically it throws everything at the disk I/O at once. The operating system is going to go "whoa, buddy, you guys are going to have to get in line because you just asked me for a mess-ton of stuff at once." So your disk I/O will be pegged at full capacity, which is what we want. But the OS manages which things get loaded first, and that's fine with us because order doesn't matter. Meanwhile, on the CPU side, while each of these 4000 threads "spaces out pointlessly" for 3-10 seconds, they are all pretty much doing it simultaneously for the most part, or at least close to that, rather than doing it a few at a time. This makes it so that those stupid space-outs happen more on top of one another rather than one after another, in other words.
- Anyhow, that's how it helps with that particular issue. How will this affect performance during the rest of the game? Basically it won't. It only affects things like loading graphics and music, and it only has any effect at all when there are more than 140 of them that need to load at once. That almost never happens during the game itself, and if it did happen then that would be a case where you'd get a moment of lag anyway, and if you fall into case #3 above, then it would actually HELP your performance. But in the case of a few images popping in every so often, those are in 2s and 3s, or even a few dozen at once, not 4000 at once, heh.
- In terms of negative side effects, there really are none... except that on certain OSes, the number of disk calls are directly tied to the number of threads in a program in general, and the max thread count is set to something like 256. So in those cases, if you exceed 256 threads, you get a crash. Hence my not cranking this up automatically for everyone.
Official 8.002 Lock And Load
(Released August 25th, 2014)
- Fixed a bug where at certain middle-high levels of zoom a wormhole would be drawn twice, with the second being in a spurious and variable visual location.
- Thanks to Toll for reporting.
- A new Preload All Images settings option has been added to the graphics tab.
- Defaults Off. With this option enabled, all of the textures for the game are loaded immediately at startup. This causes the game to load slower at first, but then prevents any need for images to load later on during gameplay.
- Thanks to Aklyon and doctorfrog for inspiring this change.
- A new Max Loading Threads settings option has been added to the graphics tab.
- Default 200. Setting this to progressively higher values will make more images/etc try to load from disk simultaneously. On some operating systems (like OSX), there are hard limits on how many threads can be running at a time. In those cases the limit is often 256, so going above 220 is probably not a great idea. For other operating systems, you may be able to crank this up and have better concurrent loading speeds.
- Previously the default was 140, but 200 should be safe for all OSes.
- Thanks to Aklyon and doctorfrog for inspiring this change.
- When you first load the game, it now always loads all the images for the bonus ship far zoom images. This way you don't run into load times on images in the middle of generating new map seeds in the lobby.
- Thanks to Aklyon and doctorfrog for inspiring this change.
Official 8.001 Oiling The Engine
(Released August 20th, 2014)
- Since the upgrade to the new engine version, the game has been running with 2x antialiasing on. This may have been what caused compatibility issues with some (very very - 2001 era) old graphics cards and drivers.
- Thanks to greywolf and mirkobern for helping us discover this change.
- Since the upgrade to the new engine version, the game has not been capturing fullscreen mode the same way on OSX. Fixed.
- Thanks to jerith for reporting.
- A couple of our shader definitions were slightly different in AI War compared to our later games. Nothing major, but very slightly less efficient. This may have been a factor in some compatibilities with certain outdated linux drivers (fingers crossed).
- Thanks to mirkobern for helping us discover this change.