Coder Diary #20 -- The 2.01 Bug-Fix Update
The 2.01 Bug-Fix Update -- So what's taking so long? Well ... bug fixing!
Especially reviewing, fixing, and testing DCGs (Dynamic Campaign Games), Random Battle generation, and all the many other "frontend" functions and game features.
"frontend" refers to the program for launching new games, campaigns, and random battles, also the editors; the program depicted here:

Little-known fact: John Tiller did not author the JTCS frontend!
The JTCS frontend was a separate project authored by one or more programmers at Talonsoft, the original Campaign Series publisher. Different in so many ways -- organization, layout, coding style, etc. -- from the other programs in the series (edmap, edit, edorg, and the game engine), the frontend has languished over the years, with few if any updates, and more than a few unfixed bugs. This was especially so as new games, and many new nations, were added to the mix.
So much of our attention over the past couple of months has been devoted to fixing frontend issues.
Also DCGs. You already know about the DCG PlayVictory() crash bug, since fixed. That was just the first among many DCG/random battle bugs we found. It's been a slow and painful process, finding and fixing the bugs, then testing the fixes. By their very nature, Dynamic Campaign tests can't be rushed (and unfortunately can't be automated). Each campaign test necessitates playing two or more scenarios. That takes time, quite a bit of it.
Here is the latest Change Log for the 2.01 Update:
General Improvements
[*]Implemented Options > Toolbar > None/Classic/Standard/Large.
[*]Implemented Options > System Colors.
[*]Implemented Help > Unit Viewer (F3).
[*]Implemented Help > Manual (F1) in edit, edmap & edorg; also Help > Unit Viewer (F3) in edit.
[*]Implemented the -X NoEncryption option implemented in all of: engine, edit, edorg, edmap.
[*]Implemented a moddable timelines.dat, for customizing nation timelines.
[*]Corrected several nation timelines.
[*]Added a new Campaign.pdt and .pdx data file for all engines.
[*]Added a new Main.pdt and .pdx data file for all engines (supply covers now all countries for 1930-1952).
[*]Added, in ai.ini and elsewhere, three new moddable A/I parameters: AI_smoke_prob, AI_blind_fire_prob, AI_dig_prob.
[*]Tweaked the highlight/selected colors for greater color contrast.
[*]The game engine now defaults to window maximized mode on startup.
[*]Adapted paradrop and airplane animations to the new Variable Animation Speed system. (Also, flight animations are now capped at 80% of the max ground unit animation speed.)
[*]Added more logreturn() calls and better exception handling for missing files.
[*]Improved frontend exception handling and crash prevention.
[*]Improved and extended frontend error reporting/logging.
[*]Eliminated many code & data redundancies between the (TS) frontend and the other four (JT) EXEs.
Graphics Improvements (for now, for West Front only; East Front and Rising Sun to follow in Patch 2.10)
[*]Most units now will have a unique 2D picture on the game counter when using graphical icons.
[*]Units were all given a military icon to add more variety to the very limited original mix. The original game had less than 90, now there are 303!
[*]Enhanced many of the 3D graphics as well.
[*]Updated all countries to include common files such as trains, supply depots, etc.
[*]Updated a lot of the Minor countries kit, especially Belgium, France, Italy, Albania, Yugoslavia, Norway, and Ethiopia.
Bug Fixes
[*]Fixed the A/I "dithering unit" bug, and implemented A/I > Prohibit A/I Backtracking.
[*]Fixed the campaign game PlayVictory() crash bug, and various other DCG-related crash bugs.
[*]Fixed various issues with Campaign.pdt, and recoded much of how frontend processes Campaign.pdt data tables.
[*]Fixed several other frontend bugs.
[*]Fixed the F2 Unit Handbook unit text bug.
[*]Fixed the broken frontend scenario list sort-by-date.
[*]Fixed several broken options settings saves/restores.
[*]Fixed the broken Options > Opaque Infobox check (selected) display.
[*]Applied various other minor bug fixes and code improvements.
[*]Added a correct Icons[3/4/5]d.bmp with Russian bases properly aligned colorwise.
[*]Added new versions of Icons[1/2]d.bmp files.
[*]West Front: All stock scenarios and Linked Campaign Games (LCG) that were affected by the Unit ID change in patch 1.03 were modified to use correct units.
[*]Added missing unit Bitmap and Bit files.
The Change Log items highlighted above will be of special interest to modders. We'll have more to say about 2.01's expanded modding capabilities soon.
A screenshot showcasing some of Warhorse's recent 2D unit icon work (from a "throwaway" DCG test game, where the purpose of the game was to lose!):
Awfully pretty, that! [8D]
Much, much work has been done in the area of error logging/reporting. Some interesting new error dialogs:

Before 2.01, the frontend quite possibly might crash at the point of that kind of error.
And another:

Before 2.01, if you specified an unsupported date, the frontend would report tersely: "Selected date is out of range. Please reselect." With 2.01, the frontend now also reports the valid date range, so you no more have to guess a proper date.
Note in the screenshot the attempt to specify 4/1930 (April 1930) as the random battle date. As you can see, the supported dates are 1/1935 to 12/1946 (these have been changed from 2.00 and before). With 2.01, you have the option to extend the nation timelines by modding the new timelines.dat file. (Again, we'll have more to say about this soon.)
Not that you would know it, but: We've been quite busy striving to make JTCS 2.01 as bug-free and polished as reasonably possible. Added a few new features along the way too.
Our hard work, and your patience, will soon be rewarded: We are in the very final stages of packaging the 2.01 Update.
There's many a slip twixt the cup and the lip, but we hope to be releasing the JTCS 2.01 Update in the very near future.
We trust you'll find it all to be well worth the wait.
Until the next time...

















