Closed heiner closed 2 years ago
This guarantees we write to the buffer from before and therefore need to only update the delta, saving us a few memcopies potentially.
Fixes #133.
Note for posterity - we do this in the tty observations where the callback from the virtual terminal on updating part of the screen involves writing to the observation. (cf - https://github.com/facebookresearch/nle/blob/main/src/nle.c#L69-L118)
Note for posterity - we do this in the tty observations where the callback from the virtual terminal on updating part of the screen involves writing to the observation. (cf - https://github.com/facebookresearch/nle/blob/main/src/nle.c#L69-L118)
Yes -- and specifically for the tty_chars observation it makes a lot of sense to only update the actually changed characters, like the actual tty would do. We also only write tty_cursor if it changed. Calling set_buffers
after reset() was always broken in those cases (but also never part of our API anyway).
This guarantees we write to the buffer from before and therefore need to only update the delta, saving us a few memcopies potentially.
Fixes #133.