Caterpillar

Daily Thought - 2024-06-11

< back to list

So, how am I going to implement interactive programming?

I already had it working in a previous prototype, where I built a system of content-addressed code fragments. Every piece of code had a hash that identified it (and its position in the script) uniquely. Based on that, I was able to create a not-too-complicated algorithm to substitute updated code at runtime, while leaving program state intact.

Unless I come up with something better on the way, I intend to just use that same approach again. There's one difference this time: The code runs in the browser, but it's edited outside of that. Updates have to be sent through a development server. Another difference is, now that code is running a game. Which I expect to (eventually) run at 60 frames per second and beyond.

<< previous thoughtnext thought >>