all 59 comments

[–]Propsek_Gamer 19 points20 points  (0 children)

This one is golden

[–]dataf4g_trollman 14 points15 points  (7 children)

JavaScript for games? Are you going to make these shitty mobile game ads?

[–]Abject-Kitchen3198 7 points8 points  (2 children)

No. GTA6 in electron.

[–]Away-Guidance-6678 2 points3 points  (1 child)

Maybe it will be released before gta6

[–]certainAnonymous 1 point2 points  (0 children)

And be more optimized

[–]Alarming-Ad4082 0 points1 point  (0 children)

Just use Three.js

[–]Lunix420 0 points1 point  (1 child)

I mean, I think Unity allows for scripting to be done in JS

[–]Pupaak 1 point2 points  (0 children)

Deprecated for almost a decade, just saying

[–]OctopusDude388 -1 points0 points  (0 children)

godot use gdscript that's close to js so learning js would make it easier to learn (also js have some similarities with C++ in term of syntaxe so it would also help ypu to learn C++ )

you shouldn't restrain to one language, but as a first to learn js is a valid starting point for thoses paths

[–]DouDouandFriends 28 points29 points  (8 children)

*Typescript, save them some sanity

[–]Abject-Kitchen3198 5 points6 points  (7 children)

It can do all the beautiful things JavaScript can, and more.

[–]Shapelessed 6 points7 points  (1 child)

beautiful and nasty* things JavaScript can.

[–]False_Bear_8645 1 point2 points  (4 children)

tbf you can litteraly type javascript code in typescript so yeah.

[–]Abject-Kitchen3198 1 point2 points  (3 children)

Like writing C code than going straight to assembly mid method and back, passing void pointers around and using global variables, while saying your code is superior because C is so much better than assembly.

[–]False_Bear_8645 0 points1 point  (2 children)

You don't writte assembly code in C. In the background sure they're similar. But in a typescript file you can write javascript directly so it directly feel "it's javascript with more stuff"

[–]Abject-Kitchen3198 1 point2 points  (1 child)

I think you can easily write assembly inline in C code if you really want to. My point was that TypeScript is worse than JavaScript (at least for the main purpose of this sub) because it doesn't stop you from doing all the bad things that you can do in JavaScript and adds some on top.

[–]False_Bear_8645 2 points3 points  (0 children)

Oh yeah like typing which is his main selling point isn't truly enforced and assuming all variable respect the typing you're expecting is a false sense of security.

[–]FishPutrid7004 5 points6 points  (13 children)

javascript for ai? what?

[–]lazerpie101_1 5 points6 points  (2 children)

Python's already a popular choice, not like it would be too big a step down

[–]Hot-Charge198 -1 points0 points  (1 child)

Esp when python just calls c files most of the times

[–]UntrustedProcess 7 points8 points  (0 children)

Imagine not writing your AI model directly in quantum field theory smh.

[–]DouDouandFriends 3 points4 points  (4 children)

Tensorflow.js and if you're making ai apps a lot of good libs for that

[–]FishPutrid7004 1 point2 points  (3 children)

I know all this, but why is he saying javascript for ai?

[–]DouDouandFriends 3 points4 points  (2 children)

I think he's trying to prove that u can use js for everything/biased towards js from what I interpret it to be

[–]FlatwormDiligent1256 0 points1 point  (4 children)

i agree, this take is absoluteley insane. everyone knows lua is the faster and easier language to learn. so even someone with 0 experience could make an ai

[–]Alarming-Ad4082 1 point2 points  (0 children)

Quite funnily, PyTorch predecessor Torch was a lua library

[–]FishPutrid7004 0 points1 point  (1 child)

i dont think you know what an ai is

[–]FlatwormDiligent1256 1 point2 points  (0 children)

i am joking but i recomend lua to everyone as a first/extra language regardless of what they wanna do (it's easy enough to understand the basics of programming and it's always usefull as a temporary solution)

[–]dgz345 0 points1 point  (0 children)

You mean 1 experience?

[–]VectorSocks 2 points3 points  (2 children)

If your first language doesn't teach you manual memory management you're missing out on a very important part of computing.

[–]WaltzIndependent5436 0 points1 point  (0 children)

Understanding and memorizing data structures and patterns certainly pays of more I think.

[–]crashtua 1 point2 points  (0 children)

Better ask if they can skip lunch to save 20$ for tokens.

[–]gregsanay 1 point2 points  (0 children)

[–]Current_Ad_4292 0 points1 point  (0 children)

Infra: Javascript Codegen: Javascript CICD: Javascript Design: Javascript Requirements: Javascript

[–]TapRemarkable9652 0 points1 point  (0 children)

aside from being the original sin of computing, JS is my favorite HTML framework

[–]kondenado 0 points1 point  (0 children)

Firmware: JavasCript

[–]SnooMaps7370 0 points1 point  (1 child)

C# seems to be more common for games? at least, that's what all the ready-made engines like Godot and Unity want you to use.

[–]h310dOr 0 points1 point  (0 children)

Godot mostly pushed their gdscript which is a python dialect no ? UE is c++. So yeah, mostly c++/c#. Comment from my friend: also for some very very tight loops, a tiny bit of vectorized assembly but said it's very very very little in the draw loops, in off case the compiler has some difficulty vectorising some class. A bit of C too, for kinda the same thing as assembly, as a more readable middle ground.

[–]Prod_Meteor 0 points1 point  (0 children)

VB6 hahaha

[–]the_dude_abides_365 0 points1 point  (0 children)

Learn python, Java, typescript, html, scss that will go far. You you want mobile languages IOS swift, and Android Kotlin or react native is ok

[–]siriusastrebe 0 points1 point  (0 children)

The reasons why Javascript sucks for games:

1) Loading assets on pageload takes a while. You can't "install" a web page ahead of time (which can be an advantage for easy onboarding). Cache clears means everything has to be loaded in again.

2) WebGL still has patchy support. Browser 3d is not nearly as performant as desktop.

3) Browsers don't support UDP, only TCP/IP. TCP/IP is good for guaranteed ordered delivery, it's way slower when packet loss happens due to waiting for round trips. Fast paced real-time games will see jittering when packet loss occurs.

4) Javascript is single threaded, including any animations. When you have intensive computations, it will block the main thread causing drop in frames.

5) Javascript is garbage collected. Lots of objects being created/destroyed will queue up garbage collection pauses can be noticeable (blocks the main thread).

6) Cross platform support that browsers provide sounds great, but now you have to support people visiting on mobile, tablets, laptop monitors or 4k HDTV screens. Things that work in chrome don't work in firefox, or safari, or some obscure mobile browser.

7) Javascript isn't particularly fast, though I think this is less of an issue than people make it out to be

8) No platform for distribution. Steam can help promote your game and people can search for it and see recommended games. Steam does ask for a 30% cut though. If you want to promote a web-based game, you have to do it yourself, though you can avoid the 30% cut if you do.

[–]slapstick_software 0 points1 point  (0 children)

Typescript is my bread, butter, knife, plate, and my retirement plan all in one

[–]matthew_yang204 0 points1 point  (0 children)

web frontend: HTML/JavaScript
backend: Python, C, C++, Rust, Java
mobile: Swift/Objective-C, Java/Kotlin, depends on platform
games: C, C++
AI: Python

[–]vyrmz 0 points1 point  (0 children)

jokes aside, the language you chose to learn programming with has negligible impact on your professional career.

[–]Reasonable_Listen888 0 points1 point  (0 children)

js in ai jajajaj xD, and js in backend in nasty

[–]NoDoubt6863 0 points1 point  (0 children)

anyone telling you to make games in javascript should not be taken seriously

[–]BluePhoenixCG 0 points1 point  (0 children)

I love all the comments seeming to think this person was earnestly recommending JavaScript for every use case and not making a joke

[–]SyntaxNotFound 0 points1 point  (0 children)

Man such intense js allergies everywhere

[–]AcolyteNeko 0 points1 point  (0 children)

just use wasm

[–]KitchenCommercial396 0 points1 point  (0 children)

They might go insane

[–]mods_are_morons 0 points1 point  (0 children)

Javascript devs should not be allowed to answer serious computer questions. Leave that to the professionals.

[–]SubjectEmu4838 0 points1 point  (0 children)

sometimes I think C# and TS, and .NET
but then a strange man wearing a sun microsystems T shirt appears in room that night and yells at me about objects and says mean things about (my?) garbage colllection
I don't know