Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo functionality #139

Open
rollerozxa opened this issue Sep 17, 2023 · 2 comments · May be fixed by #184
Open

Undo functionality #139

rollerozxa opened this issue Sep 17, 2023 · 2 comments · May be fixed by #184

Comments

@rollerozxa
Copy link
Collaborator

No description provided.

@griffi-gh
Copy link
Contributor

griffi-gh commented Dec 4, 2023

how should we approach this?

intermediate saves is probably the easiest approach to implement.
i.e. we could just create a full level save (in-memory or as temporary files) before each action and restore them on ctrl-z. The game already has mechanisms to quickly and seamlessly reload saves with basically no side effects.

we can also do it by storing just the positions and properties of objects and restoring them;
this requires more integration within the game to make it undo-aware.

should we also support redo?

@rollerozxa
Copy link
Collaborator Author

Well the former sounds easier, as long as we've got memory to spare (we don't have as many low-mem mobile devices we need to support nowadays like there was in 2013). Having to save an entire level file in memory (zlib compression and level thumbnail and all) for each change sounds excessive, so some sort of intermediary that faster to save and preferrably memory efficient. (store delta encoded differences of the level buffer? I dunno)

@griffi-gh griffi-gh linked a pull request Oct 15, 2024 that will close this issue
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants