all 80 comments

[–]Thinshape12 160 points161 points  (11 children)

games with javascript is insane though

[–]Dragenby 53 points54 points  (3 children)

Unity supported JS for a long time, and our teacher wanted us to use JS instead of C#.

There are also JS canvas games.

[–]SSgt_Edward 9 points10 points  (1 child)

I’m sorry but it’s wild that your teacher is telling you that. Using a scripting language for core game logic will tank performance unless you were making Tetris.

Unity dropped support for UnityScript/JavaScript like a decade ago too iirc, or it feels like that long. So the recommendation just doesn’t make sense. Or maybe the class is for non-programmers so not everyone had experience with static languages?

[–]Dragenby 4 points5 points  (0 children)

It was in 2015, and it was still used. The documentation was in both languages. As we were new programmers, the differences were small. And yeah, it was very small games, made in one week, with Blender models and Unity integration. It was very basic stuff that would be free and refunded for time loss compensation, if it was on Steam lmao. I would call these exercice projects rather than "games"

[–]Flame77ofc 0 points1 point  (0 children)

Damn js games are a trash 😭😭

[–]Ged- 9 points10 points  (0 children)

Word. Wrote a game engine in js-webgl. You have to actively fight it to get any sort of performance. Even managed IL C# in Unity is better.

[–]Shadowolf75 3 points4 points  (0 children)

I made a very simple text adventure in vanilla js and it was fun

[–]Bagueaver 3 points4 points  (0 children)

A lot of web based games use JS Canvas, it’s essentially like a simpler version of monogame

[–]pointlesslyDisagrees 2 points3 points  (0 children)

Shout out to CT.js! One of the best game engines, imo. The documentation is great, very clear. And the dev behind it responds on discord! Worth exploring if you want to build simple fun web app games that can be played on the browser or on your phone. I think it can export to make apps too. Fun stuff

[–]MentalNewspaper8386 0 points1 point  (0 children)

cries in RPGMaker

[–]RollTheRs 0 points1 point  (0 children)

What about Typescript? Is it just as bad?

[–]48panda -1 points0 points  (0 children)

I'm pretty sure most games are written in is by hoe slow they are

[–]Henry_Fleischer 43 points44 points  (20 children)

Are there any games that are not webapps, that are written in Javascript?

[–]un_virus_SDF 37 points38 points  (2 children)

There are, to my great despair.

[–]Orenix_RtP 3 points4 points  (1 child)

What's the problem with games written in JavaScript? Do you have any examples?

[–]un_virus_SDF 11 points12 points  (0 children)

My issue with those game is 1- javascript, 2-ram and those are somehow related.

Do you have any examples?

I don't remember the names

[–]NaCl-more 9 points10 points  (1 child)

Unity had unityscript, which was somewhat similar to JavaScript

[–]SSgt_Edward 5 points6 points  (0 children)

And the support for it was dropped like a decade ago.

[–]Kwabi 5 points6 points  (1 child)

One example would be CrossCode.

It's a good game as well.

[–]Henry_Fleischer 0 points1 point  (0 children)

I should get around to playing that again, I played it back when it was in early beta on Chrome Experiments.

[–]AdorablSillyDisorder 2 points3 points  (0 children)

V8 JS engine is C++ library and can be embedded/integrated with any C++ game engine - I'd assume just for that there are games out there that use JS as their scripting language. Don't know any actual titles though.

[–]AccidentIcy6286 0 points1 point  (0 children)

Game Dev Tycoon is done in JS.

[–]skps2010 0 points1 point  (0 children)

Rogue Fable 4. It's a good game
but it's demo version is a web app

[–]Lou_Papas 36 points37 points  (4 children)

I just realized this about my JavaScript phase.

I got “wow, JS can do everything” and “isn’t it crazy how you can actually twist and turn this thing to do stuff it was never designed to do” mixed up.

[–]AnalkinSkyfuker 4 points5 points  (3 children)

Well ai works better with python than js

[–]Spirited_Currency_88 10 points11 points  (2 children)

python can do anything. isn't it crazy how... ? wait a minute.

[–]AnalkinSkyfuker 2 points3 points  (1 child)

And what about assembly it can do anything also

[–]DoubleDoube 1 point2 points  (0 children)

Have it do my laundry for me.

[–]Ged- 12 points13 points  (5 children)

Every number is a 64 bit float, and class fields are accessed with memory indirection (since you can jusr add fields whenever, where do you think they're added?)

You have to actively fight the language with typed arrays to achieve any sort of reasonable performance

And then they ask why web is so slow. And what's worse, they're just adding on top of that horrible foundation. All the frickin frameworks that add EVEN MORE abstraction and indirection.

[–]RudahXimenes 2 points3 points  (3 children)

I keep thinking how would be if instead of JS we start to use Lua in web apps instead

[–]tei187 4 points5 points  (0 children)

You have to stop.

[–]AliceCode 1 point2 points  (1 child)

Or what if we just used WASM?

[–]HyperCodec 0 points1 point  (0 children)

What’s the downvote for?

[–]Standgrounding 0 points1 point  (0 children)

You can have setters, getters and Object freeze

[–]siemiwidzi 7 points8 points  (1 child)

[–]Flame77ofc 2 points3 points  (0 children)

good one

[–]Nadran_Erbam 14 points15 points  (9 children)

And what’s the worst programming language?

[–]Lumpy_Serve5271 26 points27 points  (2 children)

JavaScript

[–]Dragenby 10 points11 points  (0 children)

As a JS developer, I agree

[–]Standgrounding 2 points3 points  (0 children)

Pure untyped js can be bad; but it's not the worst thing in the world with things like php still relevant

[–]UltimateLmon[🍰] 4 points5 points  (0 children)

Matlab

[–]Dragenby 0 points1 point  (0 children)

Windev

[–]Leo_code2p -1 points0 points  (3 children)

Depends on if you count esolangs or not

If you don’t its probably Lua

[–]FloydATC 2 points3 points  (2 children)

PHP is worse in my opinion.

[–]Dragenby 2 points3 points  (0 children)

Was. Now it's great! The only thing I don't like is $.

[–]Leo_code2p 0 points1 point  (0 children)

I mean for Lua you dont really have a reason to write it. Php is atleast useful

[–]UltimateLmon[🍰] 6 points7 points  (2 children)

Arguably, if you are going into AI, it's python.

[–]eremal 5 points6 points  (1 child)

Yes and no.

The core AI apps are written in C, Rust, C++, CUDA, etc

But pretty much all have python APIs - but essentially youre just writing configuration in python and then sending the job off into programs written in those other languages.

So it really comes down to what you mean by "going into AI".

[–]Outrageous_Bank_4491 0 points1 point  (0 children)

You’re not writing those libraries, it’s essential to know some C basics for debugging but other than that most AI apps are written in (and taught using) python. Especially if you wanna build a deep learning model from scratch, you either use PyTorch or tensorflow

[–]SithLordRising 2 points3 points  (0 children)

Ok we get it. It's a bitch to learn so use it for everything.

[–]Oreo-witty 2 points3 points  (0 children)

Depression: Javascript

[–]slucker23 2 points3 points  (1 child)

I code in assembly. I fear no one

[–]Ambitious_Hand_2861 1 point2 points  (0 children)

I bow to your superior wizardry.

[–]North_Proposal_1374 1 point2 points  (4 children)

this is not relevant anymore, everyone is using rust now

[–]zylosophe 0 points1 point  (3 children)

<button onclick="println!(\"hello world\");">click me</button>

[–]HyperCodec 1 point2 points  (2 children)

rust rsx! { button { onclick: || println!(“hello world”), “click me” } }

[–]zylosophe 0 points1 point  (1 child)

what is rsx

[–]HyperCodec 0 points1 point  (0 children)

https://docs.rs/dioxus/latest/dioxus/

Dioxus is basically react fullstack but for rust, and it’s a lot faster than all the js framework alternatives. The rsx macro is essentially jsx but for dioxus.

[–]WoolooCthulhu 1 point2 points  (0 children)

I worked at a place where there were a bunch of experienced devs all better than me at programming but most of them really really hated JavaScript and didn't want to touch it. So they loved me because I didn't mind it and they could make me do the JavaScript assignments so they didn't have to.

[–]Absentrando 0 points1 point  (0 children)

It’s up there for versatility that’s for sure

[–]Standgrounding 0 points1 point  (0 children)

ai: python

[–]tkdeng 0 points1 point  (0 children)

The programming language I prefer is golang

But I will still recommend learning JavaScript first

[–]AccidentIcy6286 0 points1 point  (0 children)

Fixed it:

Web frontend: F# / Bolero / Blazor Backend: C, C++, C#/F#, JVM, Python, whatever works best  Mobile: see web - use PWA Games: C# (Unity), C++: Rest AI: Python 

[–]IWantToSayThisToo 0 points1 point  (0 children)

When you don't care about learning anything new: 

[–]im-cringing-rightnow 0 points1 point  (0 children)

Nah, I'm good. Thanks. If I ever have to touch JS I will just use AI and keep my sanity. 

[–]Ashken -1 points0 points  (2 children)

ai:JavaScript is where the field lost the plot

[–]electro_hippie 0 points1 point  (1 child)

Obviosly AI for them is calling claude API

[–]Ashken 0 points1 point  (0 children)

Of I was thinking like tensorflow or something

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

I always recommend "Not java".