How does Spacewar! compare visually, real vs emulated screen?

Space war I suspect needs real display hardware for the best results.
How do the emulations (of the screen) compare to the real thing?

Actually, I can’t tell, since I’ve never seen the original. I’m told, the emulation is pretty good, but it is certainly not perfect.
I tried to match older analog photos, regarding the focus and amount of blur/bleed. This works pretty well, but, I think, you can “zoom” in on the original for greater detail. The length of the trails depends on the lighting conditions, this can be several seconds in a dark room. One of the challenges was to render this by what a web browser could deliver on an average computer in 2012, so, in order to reduce load, the trails may be on the short side. (But again, it does match what you see on photos.)

One problem is that you can’t capture the impression of the real screen in any frame-based media. Famously, P-7 phosphor has a short bright-blueish immediate response and a long warm-yellowish-green sustain. And it’s the latter, which produces the trails. On the real screen, this color transition is an analog process, which happens all the time. So the colors blend and you never see the bright blue, rather, it’s more like a constant, fluid transition. On frame based media, be it on film or on video, this is chopped into time slices and every dot, which is activated while the shutter is open and the media is exposed will show up distinctively in blue. Which is not what you see in real-life.
(With video, there’s also the problem of exaggerated blur/bleed, caused by partial over-exposure of the bright pixels.)

I tried to work around this by synchronizing the screen rendering with the jump to the beginning of the main loop, so that both spaceships are drawn at once. (Otherwise, if just one half a spaceship is drawn, this would really show.) For this, my emulator has a breakpoint set for the location of the jump to redo the main loop, which is configured for each version of the program. (If there is a separate main loop, like for the visual score display, there is another one for this alternative main loop.)

This doesn’t really work for the display hacks like the Minskytron, though, for which these render in constant time slices – and look more like on video.

What’s not emulated that great at the moment is the dot gain for repeated or lengthened activation, it’s more on the small side. If you look at the background stars, the brighter ones should be a bit bigger. (I had this much better in the beginning, but when I added some code for a more analog impression of the fading trails, I never found the sweet spot again. I’m trying to recreate various factors, for which there’s quite a number of parameters to fiddle with – and as one aspect may improve, some other thing, which was working quite well, breaks away. Particularly, it’s about modelling an electrostatic effect, where broader spots of charge will hold on longer than smaller ones. Time for compromises…)

There’s also the question of what detail is actually revealed at what distance. E.g., the Type 30 display at the CHM has a damage in the phosphor layer, where the phosphor is torn and delaminates at a certain spot. (No alarm, they do have spares!) You can see this if you focus in closely, but not at any normal viewing distance. In any emulation, we’ll have to decide for a viewing distance (the “subject” in paintings) and a corresponding threshold in detail and how things visually merge. And this will be always deliberate.

Overall assessment: It’s good enough to give an impression of the behavior of the real thing, but it’s by no means perfect.

I welcome any feedback, especially by anyone who has seen the “real thing” and can compare!

3 Likes

PS: I should point out that nowadays the screen emulation doesn’t really look like how it used to. Reason for this is that for several years, now, browsers typically render a canvas graphics at double-resolution (for every pixel set, there are four) and then scale this down, for the benefit of high-res displays. This has subtle effects on the look.

I may add that this is a bit frustrating: while you may do your best to come up with a suitable emulation, accurate to a granularity of 5 nanoseconds and pixel-perfect to given constraints, modern browser will reduce timing effectively to just a hundredth of a second (for side-channel attack mitigations) and modify your image by some random, software and hardware dependent amount. (It may end up thinner, or blurrier, or even sharper, etc., whatever the scaling algorithm works out on the given display hardware with that particular browser and/or OS.) Which somewhat reduces the likelihood of future investments, as there’s just not sufficient known ground for any attempts at accurate modelling for a particular outcome. It’s much more loosely aiming at an intended result than it used to be.

2 Likes

I think this is true for most older hardware/displays like CRT. But emulation is getting better and better and like on MAME one can choose from many vintage styles. It’s also similar for sound emulation.

You can watch videos on YouTube from the original hardware. Of course the feeling and lights might be different. And if you have 2 displays each of them might be different if one is much older or even defective. But who can afford original hardware/displays anyway?

1 Like

As mentioned, video capture is problematic: frame based media will overemphasize the color change and CCD chips will react to the brighter, fresh activation with blur and blooming, as these portions are overexposed. E.g., if you stop anywhere in the Minskytron section, there are distinct blue and green sections, according to what was active during the entirety of the exposure. (The activation time is actually less than 5 nanoseconds, which is also where we get the bright blue. Add any response time needed for the phosphor to ramp up to activation and you’ll probably get about 2/3ds to 3/4ths of this.) And for Spacewar, the freshly drawn ships are clearly overexposed. This works in the other direction, as well: as the yellowish green of the long sustain may be underexposed, it may appear more focused than it actually is. (Moreover, there are image sharpening algorithms involved after the “de-mosaic” of the original capture data.) – You do get an overall impression, but it’s really hard to gouge from video what’s really going on.

Oh, sorry I missed that.
Maybe one should use a hi-speed or other special camera filming from the original. And then checking each frame maybe with help from computers or AI.
Without comparison with the original it’s difficult.

I wonder what’s the difference between your emulation and others like MAME.
MAME is known for being very accurate, not sure for non-CPU games. And they recently completely changed the source for CRT emulation.

Personally, I don’t like this game (2 players only).
And my eyesight isn’t good enough anymore.
How much do you guess is your emulation close to the original?
90%, 95%?
Do you emulate also the imperfections (beam not meet 100% exact locations?)

At one point, it did match old photos 100% and things like spot gain on single resolution displays. Since then, I added some code for the electrostatic effects and haven’t found that sweet spot again, though. So spot gain is probably just a bit off, erring on the lower side. And things like persistence really depend on environmental conditions. (It does match with what you see with the “Minskytron”.)

(Spacewar! emulation, colliding ships in single resolution rendering, w/o HTML-canvas back-buffer.)

I haven’t seen the MAME code, yet. May be interesting to have a look…