it's possible to make game in pure go lang and have same performance as this game in c++ ?
No, but you won't be making anything that complex anyway even python will do probably if you are beginner
same performance as C++? forget it. If your Go code is faster than your C++ code then your C++ code is bad. C++ gives you more freedom and heavy compile-time optimizations Go gives you higher developer productivity and convenience you have to chose between one or the other. Go also isn’t ideal for game development since it requires cgo to interface with things like OpenGL, DirectX and similar APIs. Cgo is not Go and there are a lot of reasons to avoid it!
calling from go to c is slow because go has to store the stack in order to restore it later on due its nature based on coroutines, so probably you won't get same performance as c++
Обсуждают сегодня