hot code reloading FTW! we can now use c++ as our "scripting language" :)
Say goodbye to turnaround times and never stop the game just cause the code changed.
thanks to @asylumSquare for pointing me to the highly inspirational @cmuratori (and ofc thanks casey!) #notmadewithunitypic.twitter.com/CsysDytHe1
-
Show this thread
-
I have seen people doing this a couple of times, but what's the drawback? Why isn't hot reloading standard in programming?
2 replies 0 retweets 0 likes -
As far as i'm aware, you can't keep the state of global variables inbetween code reloads. That might be a problem, depending on the libraries you use. If you can pull it of, its awesome though.
1 reply 0 retweets 0 likes -
Replying to @GreenFoxLight @progfix and
I use gettickcount in the example but it would also work with any variable, as long as it's in the memory section of the executable, not the DLL. Might post an update as soon as we have some more graphics for our game. The method is explained in
@handmade_hero episode 21-231 reply 0 retweets 2 likes -
Replying to @winterworksGmbH @progfix and
Yeah, but having global variables work in the DLL might be necessary, depending on what you're doing. I worked around this by having the executable provide me a chunk of memory to store the DLLs global variables. But that only works for my own code.
2 replies 0 retweets 0 likes
You can also just put the DLL's globals into the EXE and have it link to them there automatically.
-
-
Replying to @cmuratori @progfix and
... that seems like a way better idea. Thanks a lot!
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.