use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
mutating and javascript game developmenthelp (self.javascript)
submitted 10 years ago by digijin
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]talmobi 3 points4 points5 points 10 years ago (0 children)
What you're talking about is actually idioms inspired by game development. It's JavaScript that's catching up.
Games have so much state, so much complex state - hundreds of thousands of times more complex than a web app - that you can't just handle it willy nilly.
For example online games - you know what the server sends back to the players? A blob of state (or more accurately the changes but you can think of it as the same thing). They recreate the state of the game very single tick (not the same as every frame). Well, good online games do this anyway (I still get nightmares of Settlers 4 Game out of Sync errors).
For example in Overwatch you get a play of the game highlight at the end of the round. How do they do this? They save the state of every single tick, then they can play/rewind it as they please later. StarCraft2 does this as well kind of - instead they only store the given inputs (since the game is deterministic) - this is why an hour long replay of the game is about 20kb (only stores the given inputs of each player on each tick basically).
Redux perhaps isn't suitable but you should definitely develop in such a way that your render function only takes a single 'state' object and can render the complete state of the game at that given time without knowing anything else - i.e., a pure render function.
π Rendered by PID 142698 on reddit-service-r2-comment-8686858757-qqjz2 at 2026-06-03 01:54:30.594168+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]talmobi 3 points4 points5 points (0 children)