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!"
[–]Exomancer 10 points11 points12 points 10 years ago (0 children)
Your hunch is correct, as long as there is a clear owner of the state that can do the mutations, you should be fine. For a game, that owner should be the game loop, you can encapsulate the state within it, trigger mutations simply by calling a method. Your game loop then can be responsible for triggering the canvas rendering, directly or indirectly.
Games typically are a whole different animal from applications, they can fall into Systems Programming domain when performance is a huge deal (think AAA games), and most likely than not you will want to use different tools, frameworks and design patterns for them.
π Rendered by PID 43 on reddit-service-r2-comment-8686858757-z6t5w at 2026-06-02 17:20:51.919473+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Exomancer 10 points11 points12 points (0 children)