Settings

Theme

Ask HN: Best new or modern languange for game dev?

13 points by makufiru 10 years ago · 18 comments · 1 min read


So I'm currently a full stack javascript developer. I'd like to learn a new/modern language (Go, Clojure, etc) and also tinker with some game development in the process. What language with that criteria has the best libraries or would lend itself best to game dev?

joeld42 10 years ago

C/C++ (or possibly C# if you count Unity) is still the only choice for "real" game dev.

But Haxe (http://haxe.org/) has some great momentum these days, and with a bit of cleverness can target native and web at the same time. Checkout out http://snowkit.org/ and http://haxor.xyz/ for some examples.

It might also line up nicely with your javascript background.

Dart + StageXL (http://www.stagexl.org/) also looks like an appealing choice, especially if you're coming from the JS world. It lacks an easy way to build a native target, though.

But pretty much any language out there has bindings for input, graphics and sound, so if you're more interested in just learning a new language, use whatever you want.

  • Profan 10 years ago

    I'd second Haxe, there's a lot of nice things going on in that space, and the language itself[0] has a lot of nice [1] features too, things like algebraic data types and static typing make me slightly less queasy with the idea of writing a game which also deploys to the web (and somewhere else for that matter once you realise you want a native app). (writing a game in it myself right now too)

    You're probably going to be going through some more untested ground (compared to working in straight JS if you're going for web), but I quite like working in Haxe personally, and the #haxe irc channel at freenode is very helpful :)

    I think it's weird to say process doesn't matter, it definitely does, the fact that (some parts of) the gamedev world sticks almost entirely to "tested" technologies is more a sign of it's conservativeness than anything else. (okay, it's not just that (cue endless memory and performance arguments), but in large part, it really is!, okay and sure friction may be slightly less in something which is more well used, but that's not an excuse to not go for the interesting alternatives!)

    So for the OP, if you want to learn an interesting, but sort of fringe language, take a look at haxe (people like: http://grapefrukt.com/) use it for game dev for example!

    [0] http://haxe.org/manual/lf-pattern-matching-guards.html [1] http://haxe.org/documentation/introduction/language-features...

    • thethinker1032 10 years ago

      I third Haxe. From what I've read and done in it, it is a extremely nice language to work within. I just wish it had a bit more tutorials for people to learn from.

Eridrus 10 years ago

If your primary goal is to learn a modern language, and you're ok with it being maybe a bit too modern and not quite polished yet, Rust is a very interesting choice.

It seems like it could fit well with the needs of game developers since it offers fast and predictable performance, compared to anything with a garbage collector, but it also offers compiler infrastructure to make it a lot harder to shoot yourself in the foot, though it does feel restrictive to start.

Piston is a game engine that folks have written in rust that you might be interested in playing with: http://www.piston.rs/

  • rsaarelm 10 years ago

    Chiming in for Rust. It's trying to be a C++ killer, so it has a shot at a very entrenched part of the current game development ecosystem. It's definitely not a safe and solid bet yet though, the whole language might still end up fizzling in the marketplace, and even if it thrives, it might not end up getting a foothold in professional gamedev.

    If you want to learn a modern language with interesting ideas and a robust paradigm for developing efficient programs, and are happy to work in the single developer indie gamedev space for the time being, Rust is good and occasionally mindbending fun.

    It depends a bit on what OP wants here though. You're not going to get a job writing a game in Rust for anyone else anytime soon. If you want to be an industry game programmer, you pretty much have to know C++. Knowing Rust will help in learning C++, but if you want to be sensible and efficient, you'll just go straight for C++.

    If you want to go the indie route, nothing stops you from starting your own game project in Rust right now. But again if you want to be a sensible and efficient indie game developer, you'll pick up an established engine like Unity, and start making your focus-group tested game concept with market projections and publicity plan using all the ecosystem juice you can get. Rust has no established engines yet, Piston is work in progress and doesn't have any big games done with it, so your game development endeavor is going to be more about developing your own basic engine technology than being an efficient and competitive player in the indie game marketplace.

  • sabarjp 10 years ago

    I'm going to agree with this choice, especially since the OP wants something new.

    Since the OP comes from a JavaScript background, the static typing and low-level of Rust will be great things to learn. One also gets first-class functions that aren't insanely verbose (a problem with C# and Java 8). The structure of the game engine will also translate well to the more popular languages in game dev (C++, C#, Java).

    OP, keep in mind that older languages do keep getting updated so that they stay fairly modern. In particular, Java 8, C# 6.0, and C++14. C++ especially is very common in the game dev world.

matt_s 10 years ago

Since others have indicated C/C++, you should check out handmadehero.org - it will give you a taste of C/C++ programming for a game. I started watching the beginning youtube videos and haven't been able to keep up because of lack of time. He starts out with basics in C - structs, etc. and by the time I dropped off we were moving something around the screen.

bribri 10 years ago

This clojure wrapper for libgdx has been fun to play with https://github.com/oakes/play-clj and a relatively accessible way to write games in a functional way. You can run it on Android and iOS as well.

tthayer 10 years ago

I'd venture to say "The one you know best". If you find yourself struggling to do something in the language of your choice, see how others are accomplishing it and then decide.

  • makufiruOP 10 years ago

    In this case, I'm actually using game dev as the excuse or motivator to learn a new language. So the one I know best doesn't necessarily apply here. Haha

ashleyp 10 years ago

Wth's a full stack Javascript developer? I know what a full-stack developer is. Are these the same?

  • makufiruOP 10 years ago

    Javascript frontend (React/Angular) Javascript backend (Node.js) Javascript DB (MongoDB)

andrewmcwatters 10 years ago

That's kind of a backwards goal (instead of trying to make a game, and moving towards the technology that enables that) but to entertain your question: there isn't one.

The game development community doesn't really buy into the crap that the web development world does. People care more about results than process there, and as a result, care far more about performance and ease of development, too. That means using tested technologies.

Large game engines are built in C and C++, and their exposed scripting APIs are provided in Lua, C#, and JavaScript.

I don't know anyone that writes games other than Flash ones that don't subscribe to the language ecosystems of the ones above or general game development ecosystem that you can take seriously.

Game development is a multidisciplinary field, don't test the waters there for playing around with a new language. You're missing so much more when you make that your goal.

  • makufiruOP 10 years ago

    So you're saying I should embrace C/C++/a scripting language and not try to chase something new? I think my main reason for both requirements was so that I could learn something that'd help me in my current position, and also get started on the path I'd like to be on: toward game development.

    • CyberDildonics 10 years ago

      You should decide what you are really trying to accomplish, because learning a trendy language and game development are not really on the same path. Maybe you could learn Go and use GLFW, but if you want to do things you can't do in javascript you will likely want to learn C++11/14 and get familiar with a couple of solid libraries. Cinder might be worth checking out.

    • georgefrick 10 years ago

      If you are a full stack JavaScript developer looking at game development, then you might look at Phaser JS. It wouldn't involve learning a new language, but I've found its fun to work with both privately and professionally.

    • andrewmcwatters 10 years ago

      I don't understand the mentality, though. If you want to make games, make games. There isn't a "path" towards game development, you just make them.

      If you want to fool around with languages, you can do that without making games, but you don't have a game concept.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection