Advocating Go for game development (golang)

  Рет қаралды 6,017

Brent Farris

Brent Farris

Күн бұрын

I write and modify game engines as both a job and a hobby. I've recently started using Go and written a 3D Vulkan based game engine in Go and I've got some thoughts about it.
Twitter ► brentfarris.com/twitter
Website ► brentfarris.com
GitHub ► brentfarris.com/github

Пікірлер: 30
@anthonygg_
@anthonygg_ 6 ай бұрын
I cant agree more. I have been saying this for a long time. I'm happy I'm not the only one.
@purpasmart_4831
@purpasmart_4831 2 ай бұрын
Go is the true successor to C. It's just so damn simple and easy to write code.
@BrentFarris
@BrentFarris 17 күн бұрын
It was also partly designed by Ken Thompson, who partly designed C as well while writing Unix. So, there is a link to the similarities.
@0runny
@0runny Жыл бұрын
Thank you for this video. I looked at Go a few years ago and again recently, I noticed that the Go team has been busy working on performance improvements in many areas. My requirements are quite stringent in that I handle large amounts of floating point data and perform numerical computations in parallel. I found Go performance to be poor, however, I think it was my implementation which was creating too many objects and thus stressing the garbage collector. Since then Go has made many improvements, specifically the ability to pool objects so you can reuse them rather than create them from new. Also memory arenas look like a great addition, hopefully the Go team will make it fully available in future versions of Golang. Additionally, there are great analysis tools available to see where objects are allocated on the heap versus the stack. Anyways, thank you for your video. I will definitely re-try Go for my performance heavy application.
@user-cb3le9oh9p
@user-cb3le9oh9p 5 ай бұрын
Go is my first deep dive into a compiled language. I'm using it to develop a game (with help from the very nice raylib-go library) and have been very happy with the experience.
@dmitrypetrov7902
@dmitrypetrov7902 Жыл бұрын
This is really nice!
@Mikenight120
@Mikenight120 5 ай бұрын
GO MENTIONED💯
@savingday
@savingday 2 ай бұрын
Great insights!
@victorjosey8756
@victorjosey8756 7 ай бұрын
I agree with you 100%
@jamesbutler4334
@jamesbutler4334 10 ай бұрын
Hi, I was excited by your thoughts about Go for game engines. I have a question for you regarding rts games. A few developers and I have been looking at scaling above 10,000 unit and it occurs to me that Go concurrency model might be effective for that.
@AlbertBalbastreMorte
@AlbertBalbastreMorte 6 ай бұрын
how is that going?
@abdlhamidwaziz9164
@abdlhamidwaziz9164 Жыл бұрын
go go go ❤
@ashtwenty12
@ashtwenty12 8 ай бұрын
Any suggestions on leg up frameworks for a game engine? Us fyne just gui stuff?
@evolgames3657
@evolgames3657 8 ай бұрын
Raylib
@amrojjeh
@amrojjeh 13 күн бұрын
Could you elaborate more on the GC? I've heard problems of how Go can "stop the world" to delete all its objects and that can cause serious stutter. Do Unreal and Unity implement their GC differently so that the world is never stopped or is that something which you work around regardless of which GC you use? Thanks!
@haze6277
@haze6277 17 күн бұрын
I also think that it would be good for game dev, but for my particular usecase it wasn't suited well: - i want my game to work on riscv (and not only on linux). And use proprietary llvm build for max perf. - golang has only generic riscv support, and i would need to add another target by myself - there are not a lot of gamedev libraries, and they often maintained by one person and semi-abandoned (like with c) - so i choose bevy, Rust already has my target listed (albeit 3rd tier support), and it actually easy to add one by myself. - Or i could use c, but useful libs that i has are maintained often by one person (raylib, flecs, imgui etc)
@BrentFarris
@BrentFarris 17 күн бұрын
Indeed! Use the right tool for the job and balance that with what you want to do and the time you wish to invest.
@PamellaCardoso-pp5tr
@PamellaCardoso-pp5tr 13 күн бұрын
Or you could use C++ which is the standard language for gamedev in the industry? Like... its much easier to find good libraries for the language Unreal Engine 5 relies on... just saying
@memsom
@memsom Жыл бұрын
Is your engine available?
@BrentFarris
@BrentFarris Жыл бұрын
Not yet, I've got some go specific stuff to work out after the port that I want to get done first. Just trying to avoid too many irrelevant issues being created. I'm planning on putting it up publicly after though.
@mariobroselli3642
@mariobroselli3642 4 ай бұрын
How is c or Go compared to Elixir or Clojure or Scala?
@AtomicalYT
@AtomicalYT 3 ай бұрын
All those languages are functional languages. The issue with that is that functional programming is built on immutability, which means things can't be changed once created. This means you always need to create new memory to update your state which not only takes time but also puts more pressure on the garbage collector. Garbage collectors are only as slow as you let them be, and if you constantly create new memory that has to be managed by GC, you let them be very slow. Plus, Go compiles to native machine code whilst Elixir, Clojure and Scala run on virtual machines which have much more overhead than a native executable. Whilst BEAM and JVM have JITs that can narrow the gap a lot, native machine code will always be faster. Plus, JITs will also eat up your memory as they have to track a lot of stuff.
@mariobroselli3642
@mariobroselli3642 3 ай бұрын
@@AtomicalYT why is Gleam faster than the other functional lang?
@miguelborges7913
@miguelborges7913 3 ай бұрын
@@mariobroselli3642 Beam is a better VM.
@gregandark8571
@gregandark8571 17 күн бұрын
"Go is the modernized C" Ok, so what about Odin Programming Language?
@gregandark8571
@gregandark8571 17 күн бұрын
Also my last question: How Go could be seriously praised for being the modernized C if it can't even do inline assembly or stuff like SIMD ???
@BrentFarris
@BrentFarris 17 күн бұрын
Go, Odin, Zig, Rust, etc. are all in the same boat. Also, Go can do Assembly, I have a video on how to do SIMD vector operations in Go if you're interested in learning. No, it's not inline directly in the code, but with some tweakes on the compiler, you can get it injected inline. Sorry, I'm not into language flame wars, I generally use about 4-5 different languages a week on average. I am not tied to any one language. I think well designed code can be done in any language.
@gregandark8571
@gregandark8571 17 күн бұрын
@@BrentFarris One moment. In the reality if you wish to push Golang further it's native capabilities like doing SIMD, inline assembly etc, then you must include C inside of it. In fact i throw Golang in the wastebasket exactly for this reason ......... So basically saying that Go is like a modern C is completely wrong, at this point Odin which looks very similar to Go can be defined as the true modern C, because it's completely independent from it if compared to Golang.
@ViolentFury1
@ViolentFury1 5 ай бұрын
cringe
I'm making a game in Go... My Experience
9:44
Coding with Sphere
Рет қаралды 15 М.
Making Golang 13x faster with Assembly code
32:28
Brent Farris
Рет қаралды 20 М.
Golang Physics Performance
5:27
UnitOfTime
Рет қаралды 140 М.
This Will Make Everyone Understand Golang Interfaces
21:03
Anthony GG
Рет қаралды 46 М.
The standard library now has all you need for advanced routing in Go.
13:52
Game Development in the Go Programming Language
12:56
Gamefromscratch
Рет қаралды 40 М.
Go and SDL setup for game development (golang)
21:36
Brent Farris
Рет қаралды 4,1 М.