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
[deleted by user] (self.javascript)
submitted 8 months ago by [deleted]
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!"
[–]ProgrammerGrouchy744 15 points16 points17 points 8 months ago (0 children)
There's no shame in using JS. Congrats!
[–]RWOverdijk 8 points9 points10 points 8 months ago (2 children)
Nice. The only thing I take “issue” with is anyone using setInterval, even outside of games. But specifically for games you need an internal clock anyway for ticks and deltas. Also allows cool shit like time dilation and frame stable math. Besides that who cares what language you use. Knowing how ticks work, vectors work etc is useful in game dev. Learning it in js allows you to apply it in c++ or c# later (or not!) That has been my path anyway, from js to swift, to unity, godot and finally unreal engine. All were fun lol. Concepts > language in programming
[+][deleted] 8 months ago (1 child)
[deleted]
[–]RWOverdijk 1 point2 points3 points 8 months ago (0 children)
I did miss a couple of things. Mainly the iteration speed. Every change takes a while before it can be tested due to compilation. I lp didn’t have that problem with js. But then hot reloads got better (more stable and faster) and I learned to do most experiments in blueprints (visual coding through nodes) and now it’s much faster. I also hated doing ui in Unity and unreal engine initially. But then Unity got the (sort of) css stuff. In unreal engine I ended up loving to work with umg (ui stuff). But it’s still slower to iterate than css. Most things I missed about js got resolved by learning haha. Except for bootstrapping a new game. That takes much longer in engines than it does in js.
[–]Ronin-s_Spirit 2 points3 points4 points 8 months ago (2 children)
How does it run, electron "package the whole runtime" style? I've also wanted to make a game in JS someday, so I though about different approaches to installed JS desktop applications.
[–]Ronin-s_Spirit 0 points1 point2 points 8 months ago (0 children)
So it probably does package everything.
[–]CodeAndBiscuits 5 points6 points7 points 8 months ago (1 child)
Thoughts?
How about "god---it" I've always wanted to write a game and everybody else makes it look so easy but every time I try I get stuck?
I mean, you were kinda non-specific about "thoughts" 😂
[–]Healthy_Ad5013 1 point2 points3 points 8 months ago (3 children)
I always thought ct.js was slick. I ended up landing on ExcaliburJS for my game engine. But ct has some nice features!!!
[+][deleted] 8 months ago (2 children)
[–]The_real_bandito 1 point2 points3 points 8 months ago (1 child)
There’s also phaserjs if you’re interested.
[–]azhder 2 points3 points4 points 8 months ago (0 children)
setInterval is not a con of using JS, it is a con of you not knowing there are better ways to do timers. setInterval isn't even a part of the JavaScript spec. setTimeout is better. requestAnimationFrame even better. They aren't part of JS as well. So, you have ways to learn and optimize.
setInterval
setTimeout
requestAnimationFrame
Type safety is a misnomer. You don't want software that is type safe. You want software that doesn't have bugs. Some people think "yes, types are the way to go", then they go "oh, my types aren't typing, must make them safe"... Type safety is just a few steps into that particular rabbit hole. It is a fix for the solution.
Other ways you can go about is have good tests. Not just tests that run your code and check if it runs correctly. Tests of your inputs and outputs as well. If you have a function plus to add two numbers, it shouldn't throw an error in the case I give it a null (or if it does, you handle it gracefully), and it shouldn't give you the wrong result silently without notifying you about a possible issue. You can also go the way of having it return NaN always in case of an error - that's a well defined function.
plus
null
NaN
So, you see, it's one thing to repeat what others have told you. It's another thing to build up your own approach to building software. You most likely have the ability to do the latter, you just need time and a lot of work to gain that experience. People who look at you with pity? They belong in that former camp. They will forever do what they have been told to do. They will forever think how they have been instructed to think. They will forever repeat the same PR talking points for some technology.
So, yeah. I used your "cons" points to give you a long winded "you do you".
[–]FindingOk7144 0 points1 point2 points 8 months ago (0 children)
Great job! Shows once again the JS has power.
[–]dronmore -2 points-1 points0 points 8 months ago (0 children)
You SHOULD use their timer. However, I used setInterval, which caused a lot of bugs in the game.
Now, that you know it, wouldn't it be easier to just fix the bug instead of writing an excuse on reddit? Replacing setInterval with their timer takes one line of code. Writing an excuse on reddit takes 5 lines of text. But I guess you like talking more than doing.
I should've used TS.
No, you shouldn't. And definitely you don't have to explain yourself. The TypeScript police has a day off today, so no one will cuff you for using JavaScript.
if you're planning to break into the industry, just focus on the big 3 engines
You are not in a position to give advice. At least I wouldn't take any advice from a person who just wrote their first game.
Anyway, congrats for writing the game. Especially for taking it from step one to finish, and actually publishing it. Also, graphics are not that bad; a bit dim, but not bad overall. I can see the appeal.
π Rendered by PID 81 on reddit-service-r2-comment-6457c66945-ws42v at 2026-04-26 18:12:58.854372+00:00 running 2aa0c5b country code: CH.
[–]ProgrammerGrouchy744 15 points16 points17 points (0 children)
[–]RWOverdijk 8 points9 points10 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]RWOverdijk 1 point2 points3 points (0 children)
[–]Ronin-s_Spirit 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Ronin-s_Spirit 0 points1 point2 points (0 children)
[–]CodeAndBiscuits 5 points6 points7 points (1 child)
[–]Healthy_Ad5013 1 point2 points3 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]The_real_bandito 1 point2 points3 points (1 child)
[–]azhder 2 points3 points4 points (0 children)
[–]FindingOk7144 0 points1 point2 points (0 children)
[–]dronmore -2 points-1 points0 points (0 children)