Open craftworkgames opened 5 years ago
This is really cool. I think the lua language may also do this, we can try the lua language
I'll be keeping an eye on this. This feature would be awesome!
@craftworkgames You might be interested in some code I quickly wrote when thinking of handling assets. I wish I had more time to work on getting the project going 😞. In essence, an "asset cache" would have the responsibility for hot swapping. The "asset loader" is responsible for getting the asset into CPU memory, whether that would be via reading from disk or via a network.
@LithiumToast yeah thanks mate. I remember when you started that project. It's a shame you've not had time to work on it but I get it. We've all got our lives to live.
A while back I experimented with the idea of hot-reloading game content while the game is running. This is could be a pretty cool feature of Extended if we get it right.
The idea of hot loading isn't new. It's quite common in front-end web development these days. If you've used it I'm sure you'll know how awesome it can be. For those that haven't, the main advantage is that you can make changes to your game while playing it. It can really boost development time because you can rapidly iterate and change things until they look right.
Here are some references:
More importantly I've got this gist with some of the code I used to experiment with this idea a while back. I'm pretty sure I got a little further than this at the time, but I must've lost that code somehow. Anyways, it will still make a good starting point.
https://gist.github.com/craftworkgames/98a9eee11be1399915fd7d6f1e20818d