You could not see what was shooting you
The game always shows the same slice of the world, about 9 tiles up and 7 and a half down from your feet. Mechs could see you from further than that, and the heavy mech could open fire from past the bottom edge of the screen - so you took damage from something you could not see. This update makes damage the one thing that has to happen on screen.
What's new
- Enemies still notice you from off screen. That part is deliberate: mechs scan, raiders spot you, and being hunted by something you have not seen yet is the tension the game is going for.
- They can no longer hurt you from off screen. An enemy has to be inside your view before its attack lands, so every shot and every swing now happens where you can see it. When it is out of view it walks in instead of standing off screen and firing.
- The heavy mech's gun was the worst offender: it reached 9.4 tiles, further than the screen reaches in any direction. It now reaches 7 tiles, so it has to close in and face you like everything else.
- The raider gunner (6.6 tiles) and the melee raiders were already inside the screen and are unchanged, so a fight you could already see is exactly the fight it was.
- One deliberate exception, written down: your base. Raiders still work on walls, doors and turrets that are off screen - sieging a building you are not looking at is the point of a raid. You and your dog are the two things that can never be hit from outside the view.
- The approach is still announced before it lands: a heavy mech walking toward you shakes the screen from 150 px out and rumbles the pad from 240 px, so what is coming is felt before it is seen.
How it was made
- First the view was measured properly, from the running game rather than from the numbers in the settings: the camera never zooms, the viewport is 480 by 270 with integer scaling, and the camera sits 12 px above your feet and leans up to 18 px toward where you are aiming. From your feet that is 147 px (9.2 tiles) of world above you and 123 px (7.7 tiles) below, and the lower reach shrinks to 105 px when you aim straight down.
- Against that, enemy sight ranges were 8.75 to 11.9 tiles - longer than the screen in every direction, which is why enemies appeared to know where you were - and the heavy mech's attack range was 150 px, 9.4 tiles. So it could stand just past the bottom edge, invisible, and shoot.
- The fix is in two parts, because either one alone is not enough. The heavy mech's reach came down to 112 px (7 tiles), inside the view below your feet with room to spare. And every attack that can land on you or the dog now checks that the enemy itself is inside the live camera rectangle - taken from the camera's own transform, so it follows the aim lean and the screen shake frame by frame. Out of view, the mech keeps walking toward your last known position instead of stopping and firing.
- Sizing the range to the aiming-at-rest view and letting the check cover the leaning view is deliberate: when you aim straight down you can see slightly less below you, and that is exactly the case a range alone cannot cover.
- The whole thing is proved by a headless test, not by feel. It measures the view from the running camera, checks every enemy's reach against what is actually visible below your feet, then drives a heavy mech in from 150 px below and from 200 px above and asserts that it lands zero damage while it is outside the view and damage once it walks on screen - with a gunner that is on screen the whole time as a control, so the check cannot pass by simply silencing everything. It also pins the one exception, so nobody can later turn the base gate on by accident.
- The two screenshots are captures of the running game: the mech below the bottom edge, and the same mech after it walked into view and opened fire.
Screens
Tools used
| Godot 4.7.2 | The view check, the range change and the test that proves it. |
|---|---|
| GDScript | Reading the camera's live transform instead of hard-coding a screen rectangle. |
| In-engine captures | The two screenshots here, taken from the running game. |
| Headless test runs | tests/test_enemy_attack_view.gd - 38 checks, including a mech driven in from above and below the view. |
How to try it
- Play the alpha at https://reasons.games/ironfall/play/
- Find a mech patrol and let it spot you - fire a shot to make noise if you want it to come. It will walk in from wherever it saw you; nothing it does to you starts off screen.
- To see the other side of it, stand at the edge of your own camp while raiders work on a wall at the far end: your base still gets attacked off screen, on purpose.
Known issues
- The ranges are a first pass. The heavy mech now closes to 7 tiles instead of 9.4, which makes it slightly more of a brawler; if it feels too close, its range is one number in data/enemies/heavy_mech.tres.
- Detection ranges are deliberately still longer than the screen, so an enemy can start hunting you before you can see it - you get the footsteps and the shake, not a marker.
- No on-screen threat indicator was added. With damage now impossible from off screen there is nothing left to warn about, and the exception list is empty rather than paying for a warning that never fires.
- No touch controls yet - the game expects a mouse and keyboard or a PlayStation-style gamepad.
- The first load is a large download (about 74 MB), so it may take a moment on a slow connection.
Ironfall dev log · Update 20 of 22 · All updates