SCRMaps
/
Sign in

Effects on the screen itself: brightness, fog, vision, camera

Effects that are not drawn with units at all - they cost no sprite, no unit, and so they never hit the limits.

13 min read

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.

Brightness and fog
게임 밝기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.
쓰는 법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.
안개 마스크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.

The fog update counter
0을 쓴다Update the fog of war now.
0과 1을 번갈아 쓴다Fast fog updates.
매 프레임 하이퍼에서 0으로 둔다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.

The camera
화면 타일 위치Writable, in tiles - which is what lets you move the camera smoothly without CenterView.
화면 픽셀 좌표Read only - for knowing exactly where the view is.
F2·F3·F4 저장 위치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.

What cammove does
먼저 빠져나감It returns immediately when the multiplayer flag at 0x57F0B4 is 0 - it does nothing in single player, so testing alone looks broken.
읽기Reads 0x62848C and 0x6284A8 for where the camera is now.
감속Fixed point times 256 for the inertia and the speed cap.
쓰기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
0x57F1B0 differs per machine, so it turns a shared trigger into a per-machine one. It is safe here because the thing being written is itself unshared - the same trick around a shared target is exactly what desyncs a game.

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.

Desync, and the local playerThe five pools the engine draws from
Sign in to track your progress