Settings

Theme

Show HN: A tutorial for building a 2D game engine with Go and OpenGL

nik-os.com

17 points by onikolas7 2 years ago · 2 comments · 1 min read

Reader

This is a tutorial on how to build a 2D game engine with Go and OpenGL. The tutorial is based on the work I did for my own hobby game engine and I am writing it as a way to improve my code and understanding of the material (firm believer in the Feynman Technique).

There are currently three tutorials and the plan is to release one every other week. Appreciate any feedback.

mario-main 2 years ago

I'd love to follow along with this series, but I'm on MacOS (OpenGL is deprecated for us). Any alternatives? I guess I could try to challenge myself by applying the concepts I learn with your articles with Metal or Vulkan + MoltenVK. Is that a good idea for a beginner like me? I have no experience in graphics programming.

  • onikolas7OP 2 years ago

    Translating the OpenGL code to Metal/Vulkan will likely be a lot of work. Have a look at [1] which is something like tutorial 1 in the series. Its super verbose!

    OpenGL 4.1 was silently supported up to some version of OSX. Not sure if that is still the case. You could try changing: import github.com/go-gl/gl/v4.6-core/gl to import github.com/go-gl/gl/v4.1-core/gl and see if it works.

    [1] https://github.com/KhronosGroup/Vulkan-Samples/blob/main/sam...

Keyboard Shortcuts

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