4 ms·
That's really cool. How is the IO of rendering "recorded"? I don't know lua well enough to tell - i suppose it must be that each pixel color is being recorded,
by chii 11y ago
That's really cool. How is the IO of rendering "recorded"? I don't know lua well enough to tell - i suppose it must be that each pixel color is being recorded, and the replay simply blit it back?
- meric 11y agoThanks! As long as the screen can be described entirely by the IO rendering functions and the state within the recorded Lua data structures, there's no need to record each pixel color - simply replay the IO rendering functions in the same order using the same Lua state. The prototype takes advantage of the fact during every frame the screen is reset, and is rendered from scratch. The prototype's "time travelling" works by going back to the very beginning of the program, and replaying every single step. Even if the screen isn't reset every frame, as long as the program can reset the screen when it goes back to the beginning, it will be able to handle replaying the graphics IO. With "additive" IO functions, such as `print`, which "adds" rather than "resets" the terminal on each "frame", I think there will be a need to replace those functions with an alternate set that does IO through a medium where past additions to the output can be modified. e.g. using ncurses instead of terminal, to show program output.
- deleted 11y ago[deleted]