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

Warm Reloading for maximum productivity #26

Open
44100hertz opened this issue Jun 1, 2023 · 1 comment
Open

Warm Reloading for maximum productivity #26

44100hertz opened this issue Jun 1, 2023 · 1 comment

Comments

@44100hertz
Copy link
Collaborator

44100hertz commented Jun 1, 2023

package.loaded.MODULE = nil enables MODULE to be required a second time, which allows us to reload files on demand.

combine this with putting xpcall inside each bind-love hook, plus an "error mode" as technomancy has implemented -- this would allow us to reload a broken file as well.

This could be taken even further, by adding a "debug mode" where we can break out of the current scene and interactively choose which files to reload when pressing F5 (thru inspecting the package.loaded table)

The watch-reload approach doesn't enable us to preserve state between reloads. In theory, this does.

@winny-
Copy link
Collaborator

winny- commented Jun 2, 2023

Some kinds of state:

  • loaded program and its data structures
  • initial state changes in the code updates
  • function changes in the code updates
  • macro updates (if they are handled differently)
  • Clearing any error handling status (when and why)
  • graphics data
  • sound data

Sounds like it's already been proven in existing fennel games... maybe we give it a shot, but time box it to about 2 hours of effort. After the game jam we could explore it more thoroughly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants