Every effect so far made something and drew it, which is how they run into the pools. The ones that touch the screen itself do not: no sprite, no unit, no image, no bullet. And several of them are the only sane way to get what they do.
| Game brightness | One address, on a scale of 0 for black to 31 for full brightness. It leaves the UI alone, so the console, the minimap and your text stay readable while the battlefield goes dark. |
|---|---|
| How to use it | Ramp a few steps per cycle for a fade, slam it for a flash, hold it low for night. One shipped map sweeps 11 up to 31 across 210 writes. |
| Fog mask | Sits right beside brightness and shares the same 0 to 31 scale, with unexplored, explored-but-fogged and visible all in one table. |
Clearing a mask does not make units visible or selectable. You removed the darkness, not the fog state - making things visible is the vision side of the system.
Putting different values in different mask bytes draws a pattern - vertical stripes, tested in 1.16.1. That is a genuine screen-space drawing primitive and nobody in the corpus appears to have used it, which makes it somewhere worth looking.
| Write 0 | Update the fog of war now. |
|---|---|
| Alternate 0 and 1 | Fast fog updates. |
| Hold it at 0 under a per-frame hyper | With single-frame hypers, revealed areas never re-fog. |
So a map where anywhere you have been stays visible is one write rather than a scheme of revealer units. Vision, on the other hand, is genuinely per player - the shared-vision table is a bitmask per player, which makes vision the proper route to "only this player sees it". A unit's position is shared with everyone, so that route does not work.
| Screen tile position 0x57F1D0 | Writable, but it does not move the camera. What moves is the DRAWN TERRAIN - the camera and the units stay where they are, so units appear to slide over the ground. It is a local display value, not a camera value, and it differs per machine. It sits 12 bytes from the tileset at 0x57F1DC - near enough that a sloppy write reaches the wrong one. |
|---|---|
| Screen pixel coordinates | Read only - for knowing exactly where the view is. |
| The F2 · F3 · F4 saved positions | The three saved slots, each stored as X plus 65536 times Y. |
Every camera value is unshared. Keep a camera effect inside a player loop and never feed one into a shared action, or the game drops. And a per-pixel camera crashes when a player whose mouse or keyboard scroll speed is 0 or 1 scrolls upward.
The well-known “smooth CenterView” scripts move the camera by writing the screen pixel coordinates at 0x62848C and 0x6284A8. On Remastered both are read only, so writing them is the EUD-error path. They are 1.16.1-era material - still widely copied, and they do not run as written. Reading them is fine.
What actually works on Remastered is what the cammove plugin does: it does not write the camera at all. It writes the four edges of a location straight into the location table and calls CenterView - the precision comes from the rectangle, not from the camera.
| It returns early | It returns immediately when the multiplayer flag at 0x57F0B4 is 0 - it does nothing in single player, so testing alone looks broken. |
|---|---|
| Reading | Reads 0x62848C and 0x6284A8 for where the camera is now. |
| Deceleration | Fixed point times 256 for the inertia and the speed cap. |
| Writing | Writes the location's four edges, calls CenterView, and puts the destination tile coordinates in the same action list. |
The widescreen correction is the part worth copying. It assumes a screen width of 640, then measures where the camera actually landed after the CenterView and corrects the assumption from the error - converging on the real width within a frame or two. If you write your own camera, do this instead of hard-coding 640.
And the camera is unshared to begin with, so moving it from a shared condition like Always() moves everybody's screen. The standard fix is to gate the write on which player this machine belongs to.
Memory(0x57F1B0, Exactly, 0) // 이 기계가 1피일 때만 / only where this is player 1
The rule comes in a pair: when the target is unshared you must gate on a local condition, and when the target is shared you must not.
One last thing: how big the screen is appears in no table. The only way to find out is CenterView - and the trick is to use the fact that CenterView clamps at the map edge.
- 1CenterView on the exact centre of the map. Nothing clamps there, so the camera lands exactly on it.
- 2CenterView on a corner. There it stops half a screen short.
- 3The difference between the two is half the viewport.
The map centre is tiles times 32 over 2: 4096 on a 256x256 map, 2048 at 128x128, 1024 at 64x64. And the published helper stores half the real pixel size in screenSizeX and screenSizeY as a convenience - double it if you want the real figure.
Measure once in onPluginStart and it is wrong for anyone who resizes the window mid-game, with nothing to tell you. If an effect depends on the screen size, re-measure on every CenterView.
Screen shake sits on top of that measurement: CenterView a few pixels off, every frame. Without the measurement there is no way to know whether the shake has pushed past the edge.
Desync, and the local playerThe five pools the engine draws from