7 ms·
> so why not use a better language to start with? Perhaps consider that for many programmers, TypeScript is JavaScript, and TypeScript is that better language.
by eropple 4y ago
> so why not use a better language to start with?
Perhaps consider that for many programmers, TypeScript is JavaScript, and TypeScript is that better language. I've put a decent amount of thought into using TypeScript for games because it allows for a flexible, expressive data model in a way that few other languages do. The performance might be a problem for some flavors of games, but I'm interested in discrete simulations almost exclusively, where it doesn't matter at all. But TypeScript allows effectively encoding intent into data structures and into code in a really ergonomic and pleasant way, while also running on virtually every gaming platform on the planet.
(Rust, etc. are fine. If that's your bag, that's great. I'll write Rust if I need to, but I don't enjoy it, and don't seek out opportunities to write it.)
- krapp 4y agoTypescript as its own thing, with real types, not compiling to JS or being limited to its semantics, I could get behind as a language for game scripting.
- imtringued 4y agoIn don't know what you mean by discrete simulations but I would expect simulation games to be more performance intensive because of unbounded complexity vs say an FPS game.
- eropple 4y ago"Discrete simulations" are things like turn-based strategy games, roguelikes, and so on. You can think of it as "automated board games" in a lot of ways. https://en.wikipedia.org/wiki/Discrete-event_simulation https://en.wikipedia.org/wiki/Discrete-event_simulation In truth, I think V8 is almost certainly more than fast enough for real-time games (real-time in the gaming sense, not in the OS sense); Mono is fast enough for Unity, even, and Mono is creaky and slow, with a really poor garbage collector, on its best day. But for the stuff I'm interested in, I just don't care at all.