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 the HUD scale, the key screen and the supply points

Olcay Seygana397b07b19fc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5eea487ba..4078522b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -91,7 +91,8 @@ found and fixed — EA's own, not port damage.**
- Ctrl on the click advances the group at the slowest unit's pace.
- A plain click lets each unit run at its own speed.
-- Artillery, rocket infantry and Scud launchers search as far as they shoot.
+- A unit on attack move looks half as far again as it can shoot, and nothing to do with how far it can see. The two have nothing to do with each other: artillery outranges its own eyes and found nothing this way, while a scout with a long view stopped for things it would spend a minute driving to. One rule, measured against the gun.
+- An aircraft only makes that long look forward. It cannot stop and it turns in a wide circle, so a target off to one side or behind is one it has to come all the way round for - which is how a flight of bombers ends up orbiting a corner of the map instead of arriving. Inside sixty degrees of the nose it looks the full distance; outside it, no further than it can already shoot, so it still takes what it is passing.
- Attack-moving through a base shoots the base; buildings were filtered out.
- Aircraft make their pass, fly home, rearm and resume your order.
- Nothing walks off the map chasing a target that keeps retreating.
@@ -333,9 +334,13 @@ found and fixed — EA's own, not port damage.**
- Supply piles and docks say what is left in them, in cash, over the pile. No more guessing which expansion is worth taking from the art on the model.
- Every build button carries its price in the top right corner, opposite the build time already in the other one. It was only ever in the tooltip, which means hovering one button at a time to compare two of them.
+- A structure's button says what it does to the power grid, in the fourth corner: what it draws, or what a plant puts back. Money and time were already on the button and power is the third thing a base spends; it was the one figure you had to hover for, which is the wrong way round for the building you are putting up because the lights went out.
- A worker fetching or handing over a box shows a bar while it works.
- That bar is now the work itself. A worker used to reset it to empty at the very moment it finished and then walk away, so every trip looked like it left mid-handover; and after taking its last box it stood at the pile for one more full loading cycle, taking nothing. It leaves the instant the load is done - which is a little more money per trip, on every worker you own.
+- Supply points refill themselves, slowly, and faster the more of a base has grown around them. A warehouse used to be a fixed lump of money that ran out and left the map with nothing to fight over: whoever mined out the middle first had the game, and the second half of every match was played on income neither side could earn any more. A box comes back every forty seconds standing on its own, every twenty with one supply centre built near it, every thirteen with two - up to what the point started with, never past it. Both sides expanding onto the same patch make it richer and then have to decide which of them keeps it.
+- Workers stop hesitating on their way in and out. A dock has a queue outside it and a worker treated its place in that queue as a destination: it drove to the spot, stopped dead, waited a frame, drove to the door, stopped again, and only then went in - twice a load, and nearly every load with nothing else queued. With the dock empty it drives straight in.
- Hackers show how far off the next payout is. So do the black market and the oil derricks.
+- A hacker working from inside an Internet Center shows what it earns. The green figure floats over the building on every payout, the way it does over one sitting in the field. It never appeared, because the game asked the hacker whether it could be seen and a garrisoned unit is not drawn at all - which is the one place a hacker is meant to work.
- Factories take a hundred units in the queue, not nine. The build queue only ever had nine buttons and that had become the limit.
## Health bars
@@ -355,6 +360,7 @@ found and fixed — EA's own, not port damage.**
## Twenty-two-year-old bugs, found by testing
+- A civilian car no longer drives into your base in the first minute of every game. A map's civilians are owned by a computer player like any other, and the scouting pass looks for anything of that player's that can drive - so it was picking a parked car out of the scenery and sending it to a start position. A side with no faction and no build list has nothing to learn from the map and does not scout.
- A rifleman pulled off an oil derrick mid-capture left it flashing and chiming for the rest of the match, and the derrick changed hands anyway with nobody standing on it. Walking away now stops the capture, whether you or the computer gave the order.
- Every countdown on screen was a second too long. Rounding up a whole number of seconds gave a whole number plus one, so a ten second build said eleven - production queues, buildings going up, superweapons, all of it.
- A Chinese silo researching an upgrade while its missile charged drew both bars and both countdowns in the same row of pixels. They stack now.
@@ -376,7 +382,7 @@ found and fixed — EA's own, not port damage.**
- A page no longer says its own name twice. Every tab used to open onto a heading repeating the word already written on the button you just pressed, with a rule under it dividing nothing from nothing.
- An open dropdown covers what is under it instead of the other way round. The list of resolutions grew downwards behind the labels below it, so half the entries were readable and half were words on top of words.
- Every button, slider and checkbox is the artwork the game already had, down to the fonts and the hover colours. The four panels the original screen used for video, audio, scrolling and network moved onto a page each without being touched inside.
-- Writing a line into `Options.ini` by hand still works, and the screen shows you what is in there when it opens. Window mode is read before the window exists, so it applies the next time you start; antialiasing applies the next time the display device resets.
+- Writing a line into `Options.ini` by hand still works, and the screen shows you what is in there when it opens. Window mode takes effect the moment you accept it; antialiasing applies the next time the display device resets.
- The Defaults button still resets what it always reset, which is the original settings. The new rows keep their values.
## It fits your monitor
@@ -384,9 +390,18 @@ 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.
- On a widescreen monitor the command bar is three pieces instead of one stretched strip. It was drawn for a 4:3 screen and every measurement in it is multiplied by your resolution separately across and down, so at 16:9 the whole thing came out a third wider than it is tall: square build pictures as rectangles, and one slab of metal across the entire bottom edge. The radar now sits hard in the left corner, the build grid in the middle, the selected unit's panel hard in the right corner, each at the size it was drawn at, and the battlefield shows through the two gaps that opens. At 4:3 the three pieces meet and it is the bar it has always been. The three pieces reach the screen: the paintings stop a pixel or two inside their own edges, which left a hairline of ground down both sides and along the bottom, and anything that close to an edge is now that edge. The American middle piece stands on the bottom edge like the other two sides' do, instead of hanging ten units high with a band of battlefield under the build grid, your money now sits in the middle of its readout instead of riding the top rim of it, and the build buttons are centred in the panel they are drawn on instead of pushing against its left edge with a strip of empty metal on the right. The stray pixels along the right-hand edges of the pieces are gone: a one-pixel light line down the side of the middle piece, and a lit speck sitting in the battlefield next to the bottom corner of the Chinese radar. Both were the same thing. The bar's artwork was being rescaled as it went to the graphics card, which left the last column of each picture holding a mirrored copy of it, and the last column of pixels on screen drew from there.
-- Widescreen resolutions are back in the options menu.
+- The rest of the interface is drawn at the command bar's size, not the screen's width. The queue strip, the superweapon countdowns, the generals' powers bar down the right edge and the rank screen were each measured against how wide your monitor is, and the bar they sit beside is measured against the smaller of the two dimensions - so on a 16:9 screen a queue picture came out a third bigger than the build button it is a picture of, and the power slots were oblong where they were drawn square. One size for all of it now, and it is the bar's own.
+- The writing on a build button keeps its size against the button. The hotkey letter, the price, the build time and the queue count were sized off how wide your monitor is while the bar they sit on is sized off the smaller of its width and its height, so the wider the screen the further the lettering grew away from the cameo underneath it. One size for both now, and it is the bar's.
+- Every key the game answers to is in the options screen, and you can move any of them. The keyboard screen has been in the game since 2003 - the code for it, anyway; the layout it needed was never shipped in any data file, which is why the button that opens it was authored hidden and parked off the right edge, and why its Assign button had an empty body with a comment where the work should be. It is built now: every command in one list with the key it answers to beside it, click a row and press the key you want. A key can only mean one thing, so whatever was on it gives it up. Your changes go in `Keybinds.ini` next to `Options.ini` and hold only what you moved, so a patch that adds commands does not wipe them - and none of it is in the multiplayer checksum, so two players in one match can hold completely different keyboards.
+- Minimising the command bar sends the radar and the whole middle off the bottom of the screen, and they slide back up when you bring them back. The old minimise dropped the bar a tenth of the screen and left a strip of metal, a readable money box and the top of the radar dish lying along the bottom edge, which is neither the bar nor out of the way. The selection panel stays where it is, because that is where the button that puts the rest back lives.
+- The arrow on a dropdown is square at every resolution. It was drawn into a slot of a fixed 21 pixels wide however tall the box around it was stretched, so the bigger the screen the more the arrow was squeezed.
+- The promotion screen closes when you press its key again, however fast you press it. The screen fades in, and the fade drives the window itself for several frames either way - so a second press during the fade read the screen as still shut and opened it again, and a press just after it was closed was undone by the fade's next frame.
+- The command bar stops changing under you while you are using it. With nothing selected the bar shows one of your builders so you can place a structure without picking a dozer first, and it showed whichever one happened to be idle - so a dozer finishing a building on the far side of the base took the bar over, dropping a half-typed build hotkey and taking the structure off your cursor. The builder you are working with keeps the bar.
+- The command bar's artwork moves with the command bar. Minimising it slid the buttons off the bottom of the screen and left the metal they sit on painted over the battlefield; the same painting stood still through the slide the bar makes when a match opens. It travels with the bar and goes with it.
+- Widescreen resolutions are back in the options menu, and the list works during a match. It was greyed out the moment a game started, because changing it rebuilt the menus and then pushed the main menu over whatever you were playing. It rebuilds the menus for later and leaves you on the battlefield with the command bar back up.
+- The rank screen is one painting instead of a stretched one. It is sized from that painting at the same scale as everything else and centred on the screen, rather than multiplied out separately across and down from the corner it was authored in - which on a widescreen monitor made it a third too wide and pushed it off centre.
- 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.
-- Fullscreen, borderless and windowed are one saved setting now, so borderless no longer means adding a switch to your shortcut every time. `WindowMode` in `Options.ini` takes 0, 1 or 2 in that order; a switch on the command line still wins for that one run.
+- Fullscreen, borderless and windowed are one saved setting now, so borderless no longer means adding a switch to your shortcut every time. `WindowMode` in `Options.ini` takes 0, 1 or 2 in that order; a switch on the command line still wins for that one run. Picking a different one applies when you press Accept instead of the next time you start the game: the window loses or gains its frame and the display device is rebuilt on the spot. Borderless takes your desktop resolution and nothing else, so while it is selected the resolution list greys out and the other two modes hand it straight back.
- Antialiasing is a saved setting as well: `MSAA` in `Options.ini`, 0 for off through 4 for sixteen samples. `-msaa 4` still works and still wins for that run. Whatever your card will not give is stepped down instead of refused, so asking for six samples gets you four rather than nothing.
- 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.