Swap it like it's hot

Ever since watching stumbling upon a few videos where people hot-swap code in order to demonstrate game physics tweaking, I wanted to know how they do it. Turns out in Python it's really easy*. Just reload(module) and the magic starts happening. See some random guy demonstrating this here.

It comes with a few pitfalls, though:


I'm like 70% through the process of making my game updateable while running, the last steps I can think about ahead of time are:


Today is (hopefully) probably the only day in which I'm going to focus on trying to make this happen. If I end up stuck in developing this feature it's best I just dump it, as it will probably not pay off in the timespan of a week. I'm sure there's better ways to do this, but this is my first try at this. :)


My current engine model is as follows:


If you want to look at the atrocious in-development code, see here: https://github.com/shundread/pyweek24