🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

The Go Programming Language

Started by
8 comments, last by swiftcoder 6 years, 5 months ago

Has anyone ever used this language? Would you say it is suitable for game programming? If so what graphics/audio/UI libraries are best to use for it. The only reason that I am asking is because I will probably rewrite the code for my current project sometimes in the far future.. may in a few years. Right now I am using JavaScript which works well but eventually, as I always do, I rewrite projects to learn new stuff like languages.

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

Advertisement

I have been using Go a lot. Is it suitable for game programming? I don't think it's quite there yet, simply because there is a lack of interest in developing a UI for Go. Check out go-gl for GLFW support.

https://github.com/go-gl/glfw

It is, however, very suitable to write server-side code for your game. The UI can be served from the Javascript side through websocket. In some ways, I think it may end up be a better architecture because you are separating the game logic/data from the rendering.

No, not really. From what I read here and there, C interop is expensive and there aren't many libraries aimed at game devs.

If you want something new, you could take a look at Rust. The library economy is definitely needs maturing, but lots of people are interested to make it suitable for gamedev.

shaken, not stirred

Awesome!

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

1 hour ago, sirpalee said:

If you want something new, you could take a look at Rust. The library economy is definitely needs maturing, but lots of people are interested to make it suitable for gamedev.

It's... quite hard to use for gamedev at the moment. Don't get me wrong, I like Rust a lot, and I think it has a lot of promise, but it's in something of a rough state right now.

The nicest OpenGL abstraction, glium, is no longer being developed by its creator, and suffers from some language issues that are hard to work around cleanly. The more ambitious gfx-rs is unfortunately half way through a ground-up rewrite, and it looks like a little while till it stabilises.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

On 22/12/2017 at 3:35 PM, swiftcoder said:

It's... quite hard to use for gamedev at the moment. Don't get me wrong, I like Rust a lot, and I think it has a lot of promise, but it's in something of a rough state right now.

The nicest OpenGL abstraction, glium, is no longer being developed by its creator, and suffers from some language issues that are hard to work around cleanly. The more ambitious gfx-rs is unfortunately half way through a ground-up rewrite, and it looks like a little while till it stabilises.

You don't need to use abstractions or anything the sort. The base bindings are running without overhead, mostly, and that's what matters most.

shaken, not stirred

On 26/12/2017 at 2:55 AM, sirpalee said:

The base bindings are running without overhead, mostly, and that's what matters most.

By "base bindings", I assume you are referring to gl-rs?

It works, certainly, but being a straight transcription of the C API, pretty much the entire API is unsafe, and you lose many of the advantages of Rust's type system and borrow checker.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

On 12/30/2017 at 8:54 AM, swiftcoder said:

By "base bindings", I assume you are referring to gl-rs?

It works, certainly, but being a straight transcription of the C API, pretty much the entire API is unsafe, and you lose many of the advantages of Rust's type system and borrow checker.

You need those zero cost bindings to build safe interfaces over unsafe APIs. Yeah, you are right, the current wrappers are immature and scattered all over the place, however I think it's better to roll out your wrappers that are specialized to your needs.

Is there a C++ binding, that's well designed, flexible and offers minimal overhead? 

shaken, not stirred

21 hours ago, sirpalee said:

You need those zero cost bindings to build safe interfaces over unsafe APIs. Yeah, you are right, the current wrappers are immature and scattered all over the place, however I think it's better to roll out your wrappers that are specialized to your needs.

Is there a C++ binding, that's well designed, flexible and offers minimal overhead? 

I don't disagree in principle. But I think it is worth calling out that writing unsafe Rust is a very different process to writing normal Rust code, and it won't necessarily serve a newcomer to the language very well to start there.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement