Hi all!
I've been playing with the idea to integrate a code editor in to my system and being able to code my game in-game kinda.
I did get as far to being able to code and run the code and then quit the game, change code and run the game again.
However it would be more practical and more interesting if I didn't have to quit the game to change the code, instead hot reload the code.
Would anyone have any recommendations how to go about this?
One thing I have considered is to simply, save the state of the game with the new parameters, reload with the new parameters and load the state. So it is not really hot reloading anything, only make it looks like it does. But in reality I only restart the game with new parameters.
An other approach I think could possibly be using threads. I did play around with threads but my problem is that it would require me to refactor my entire system in to threads and I am not ready to do that. But maybe I should.
I would appreciate any recommendations you have.
Thank you.
Hot reloading code at runtime?
Re: Hot reloading code at runtime?
Check: https://github.com/usysrc/LICK
or this: https://github.com/clofresh/love-module
But as I understand you would rather take a snapshot (object state dump) and then reload that dump with the new code. Anyway, these two libs can help.
or this: https://github.com/clofresh/love-module
But as I understand you would rather take a snapshot (object state dump) and then reload that dump with the new code. Anyway, these two libs can help.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: Hot reloading code at runtime?
I've had some success with :
https://github.com/rxi/lurker
https://github.com/rxi/lurker
Re: Hot reloading code at runtime?
Thanks a lot. I'm going to have a look at these libs.
Who is online
Users browsing this forum: Google [Bot] and 7 guests