Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

docs(changelog): record group corridors, crossings and borderless

Olcay Seygana334511adadc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99c78e136..e14106daa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -99,7 +99,7 @@ found and fixed — EA's own, not port damage.**
- A unit turns onto whatever is actually shooting it, then resumes the advance.
- Otherwise it picks the worst thing in range: anything armed before anything that is not, then the more dangerous of the two, and worth fades with distance so it is never the far one it walks the field for. A group ordered through a base no longer stops for the first dozer it passes while the artillery beside it keeps firing.
- Ctrl on the attack-move click no longer shells the ground instead.
-- A big selection arrives as a crowd. Two hundred units told to attack-move used to spread along a line and three hundred told to move mostly stood still: the group tried to hold its shape all the way in. Now everyone heads for the spot you clicked and takes the nearest free ground to it.
+- A big selection arrives as a crowd. Two hundred units told to attack-move used to spread along a line and three hundred told to move mostly stood still: the group tried to hold its shape all the way in. Past forty units everyone now heads for the spot you clicked and takes the nearest free ground to it. Below forty the group keeps its spacing on the way in, because that is what stops a dozen tanks arriving in single file.
- Troop Crawlers wait for their squad to climb back in, up to ten seconds.
- One man who cannot get back aboard no longer parks the Crawler for the rest of the attack move.
- Their squad stays out until the area is clear, instead of piling back in after every kill.
@@ -280,6 +280,7 @@ found and fixed — EA's own, not port damage.**
- The clock and frame-rate readout is drawn on top of everything.
- The superweapon countdowns are pictures now, not a list of names: the same strip treatment, in the top right corner, under that readout. Each one wears its own seconds and a sweeping clock, the next to land sits at the right hand end, and if you are watching more than eighteen of them the rest become a count.
- Every button's corner markings - the hotkey, the price, the time, the number queued - sit flush in the corners instead of floating a few pixels inside them, and are set a size smaller than the button's own text: four labels at full size were eating the picture they were meant to annotate.
+- The messages in the top left corner - out of money, building captured, a unit lost - are set a size smaller, the same notch the superweapon countdowns were taken down by. They are notes on the battlefield, not part of the panel, and at full size a run of them was climbing over the fight they were reporting.
- A superweapon's wait is written in plain seconds - 200, not 3:20 - so it compares with every other countdown on the screen at a glance. Once it is charged the number goes away entirely and the picture itself breathes in your colour, which is the one thing you want to catch out of the corner of your eye.
- The countdown inside a strip picture lost its black backing plate. On a picture that small the plate was most of the picture; the number now sits straight on the sweeping clock.
- Every picture in the row stands in a tray - the same tray your general's powers stand in down in the corner, your own side's copy of it, so the American, Chinese and GLA strips each carry their own metal. The tray is turned back to front, because that bar grows out of the right hand corner and the strip grows out of the left, so its heavy rail leads the row instead of standing between every pair of pictures. It is never stretched to fit, and the trays close up behind each other by exactly what that bar closes its own up by, so the row reads as one run of metal rather than a line of loose boxes. The strip is flush against the left edge, and a black rectangle laid over the battlefield is gone.
@@ -338,7 +339,7 @@ found and fixed — EA's own, not port damage.**
- What you have selected wears a white frame just outside its bar, so a selection is still readable in a crowd where every unit carries a bar - and the bar itself keeps its owner colour all the way round.
- Lamps, barrels, rocks and bushes no longer wear health bars.
- Bridges no longer float a health bar over the middle of the river. There was never anything under it: the span is part of the terrain, and the bar belonged to an invisible marker standing in the water.
-- The bar is part of the unit now: click it and you select whoever it belongs to. Zoomed out, an infantryman is a few pixels of helmet under a bar that is far easier to hit, and a unit half behind a building still has its bar in the clear. It only answers clicks that would have missed everything anyway, so it never takes a click away from the unit you were actually pointing at, and right-clicking bare ground under a bar still orders a move.
+- The bar is part of the unit now: click it and you select whoever it belongs to. Zoomed out, an infantryman is a few pixels of helmet under a bar that is far easier to hit, and a unit half behind a building still has its bar in the clear. It only answers clicks that would have missed everything anyway, so it never takes a click away from the unit you were actually pointing at, and right-clicking bare ground under a bar still orders a move. And it stands down the moment you have something selected: with a force in hand your clicks are aimed at the ground, and a bar hanging over that ground used to cost you the whole selection and hand you back a single passer-by.
- The city itself stops wearing them too. A building nobody owns shows a bar only if there is something to do about it - troops can go inside, or it can be taken. A row of houses does not, and neither does the concrete apron each of them stands on, which is a separate two-thousand-point object that was drawing a second bar down at street level.
## Twenty-two-year-old bugs, found by testing
@@ -361,7 +362,9 @@ found and fixed — EA's own, not port damage.**
- The writing on screen grows with your monitor now. Every panel is stretched to your resolution and always was, but the text inside it stayed the size it was drawn at in 2003, and what growth there was stopped dead at twice - so on a 2560 wide screen a command bar three times its original size still wore eight point lettering. The keys on the build buttons, the prices and the build times were the worst of it: at 2K they were drawn, and unreadable.
- The strip of everything your base is building follows the screen too, instead of staying a row of postage stamps under a command bar three times its size.
- Widescreen resolutions are back in the options menu.
+- Borderless fullscreen: start with `-borderless` and the game fills the screen at your desktop resolution with no frame and no display mode change, so alt-tab is instant, nothing on the desktop gets shuffled around behind it, and a second monitor stays usable. Screen-edge scrolling works there, the way it does in fullscreen. The loading picture still opens as its own small window with your desktop around it, and the game only takes the screen once it has something to draw.
- Picking High detail gives you high resolution textures. The setting was ignored: the resolution came from a machine benchmark that answers 'low' on anything modern, so there was no way to ask for better.
+- The main menu plays its battle again instead of showing one still picture. The game asks Windows how much memory the machine has and compares the answer against a 256MB minimum, and on a machine with more than 4GB installed that answer arrived as minus one - so the better the machine, the more certain the game was that it did not meet the 2003 minimum. It switched off the animated menu, forced textures down and, at the preset detail levels, took the trees out. It reads the real figure now.
- The Default button in the options menu no longer throws away your resolution. It reset the display along with everything else, dropping you to 800x600 with no undo.
- Text does not vanish at large sizes. Any font over 100 points simply failed to load, which on a 4K screen is a missing line of interface.
- Zoom further out, with the whole map drawn instead of black corners.
@@ -439,6 +442,8 @@ found and fixed — EA's own, not port damage.**
- The coarse route is widened along its whole length, not just at the start.
- The main search stops after 20,000 squares and hands back a partial route.
- Units heading the same way take the lane beside the traffic instead of joining the back of it. Ground another unit is already driving over costs a little to plan through, so a column spreads into parallel lanes at the gate it forms at. Over twenty-four full matches the time units spend standing behind each other dropped by a third, and the searches to do it cost 6% more squares - the price is capped, or a crowded route would be worth walking around the map to avoid.
+- A group you send across the map travels abreast instead of nose to tail. Up to forty units it is given one corridor wide enough for the whole group and split into columns, so it crosses a gap side by side and the outside of the column takes the wider way round. Where the ground is too tight for a full-width corridor - a bridge, a ramp, a gap between two cliffs - the group is given the widest corridor that fits instead of being dropped back to every unit for itself, which is what used to turn exactly those crossings into a single queue. The columns then close up to whatever width the ground allows and open out again on the far side, and a unit whose place in the column would put it in a cliff or a wall takes the middle of the road instead of driving into the rock and stopping. The gap between columns is measured off the units you actually selected rather than fixed at a guess that was narrower than a tank, so a group of tanks spreads wider than a group of scout cars and side by side means side by side instead of a trip spent shoving. Two units sharing a column drive one line, in file, which is what a column is for, and they arrive on that same spacing rather than piling onto one spot. The route itself is straightened as it is handed out: a corner is only driven if it is a real corner, so a group crossing open ground goes in long straight runs rather than nodding left and right the whole way, which is both faster and how a column of tanks is supposed to look. That corridor is only skipped for selections larger than any hand ever drags a box around.
+- Routes now look ahead in time, not just in space. Every unit on the move leaves a note of *when* it expects to be on each square and which way it will be facing, and a route that would put you on a square somebody else wants at that same moment, coming the other way, costs extra to plan. Traffic going your way is free - the unit in front of you is about to not be there, and a queue along one road is what a road is for. So two groups sent through each other pick their gaps before they meet instead of grinding to a halt nose to nose in the middle. In the model of this movement code, sixteen units crossing each other on open ground cut the time spent standing still by a quarter, arrived sooner, and the planning itself cost under one percent more.
- Long turns went from 513 to 201, and the worst from 2,976ms to 243ms.
- The distance guess now prices diagonals and turns, so the search actually steers.
- The straight-line shortcut only runs from a square closer than anything tried before.