Ramsey Nasser on Nostr: somewhat related to the p5.js discourse that's been going around I've been thinking ...
somewhat related to the p5.js discourse that's been going around I've been thinking about update loops and how limiting they are when people building interactive software/creative code are almost invariably actually building state machines.
frameworks like processing, p5, openframeworks, even engines like unity basically bottom out on the idea that you are going to write a function that is going to be called once a frame. that's what separates interactive software from event driven software like servers and batch processing software like command line utilities. the thing runs independent of user action, driven by the passage of time itself.
so at the ground level this makes sense, a frame locked update loop is unavoidable. but with nothing else all you can really do with that is build *functions of time*. this is fine for simple animations, the kind of stuff you see in into processing materials, and by reading from input each frame you can do a little more than that, but you still don't really have a story for *state* that outlives the frame.
how do you make different levels? menus? change the gameplay after certain events happen? more importantly, how do you build any of those things in a way that allows you *to continue to iterate* as the project grows and you get new ideas?
these are all state machines, and an update loop alone is not enough to express them. and update loops are all you get in most frameworks.
Published at
2025-05-23 16:03:05 UTCEvent JSON
{
"id": "2831a41d397fc5fae4b79a57e8ca504e0b3c1c21a598a5046f0c9f91c9fa7db9",
"pubkey": "f392639a0fd7e3ec19370ddd7521304e49c50c9146d30202b4ced90ba4d76a96",
"created_at": 1748016185,
"kind": 1,
"tags": [
[
"content-warning",
"update loops"
],
[
"proxy",
"https://merveilles.town/@nasser/114557988709688825",
"web"
],
[
"proxy",
"https://merveilles.town/users/nasser/statuses/114557988709688825",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://merveilles.town/users/nasser/statuses/114557988709688825",
"pink.momostr"
],
[
"-"
]
],
"content": "somewhat related to the p5.js discourse that's been going around I've been thinking about update loops and how limiting they are when people building interactive software/creative code are almost invariably actually building state machines.\n\nframeworks like processing, p5, openframeworks, even engines like unity basically bottom out on the idea that you are going to write a function that is going to be called once a frame. that's what separates interactive software from event driven software like servers and batch processing software like command line utilities. the thing runs independent of user action, driven by the passage of time itself.\n\nso at the ground level this makes sense, a frame locked update loop is unavoidable. but with nothing else all you can really do with that is build *functions of time*. this is fine for simple animations, the kind of stuff you see in into processing materials, and by reading from input each frame you can do a little more than that, but you still don't really have a story for *state* that outlives the frame. \n\nhow do you make different levels? menus? change the gameplay after certain events happen? more importantly, how do you build any of those things in a way that allows you *to continue to iterate* as the project grows and you get new ideas?\n\nthese are all state machines, and an update loop alone is not enough to express them. and update loops are all you get in most frameworks.",
"sig": "4df03e9c8fa4dd3d508982f1f69f3ce26ff2ef63ef627798017a5809bd81aaf9a10d5e628cfabb0c7251c58693a352bb20eca8c1103b3aecf85df684a4accac0"
}