GameEngine in golang
Find a file
2026-02-03 18:59:08 +00:00
Engine Object names 2026-02-03 17:12:04 +01:00
NSightProject Remove main 2026-01-28 14:38:51 +01:00
Resources Kind of working instancing 2026-02-03 13:43:10 +01:00
Scripts Todo, windows copyres 2026-01-29 18:53:33 +01:00
.gitignore Model is now rendering 🔥 2026-01-29 08:54:54 +01:00
go.mod Object names 2026-02-03 17:12:04 +01:00
go.sum Object names 2026-02-03 17:12:04 +01:00
LICENSE.md as 2026-01-20 11:41:33 +01:00
README.md Fix newcube name, init of gameobject, enable cull face, move transform, 2026-02-03 12:07:59 +01:00

Game

This is a basic project that renders stuff in a window using opengl and glfw

Troubleshooting

If windows says that the app cannot be launched on your device, try compiling with these compiler flags

-ldflags="-s -w"

TODO:

  • Make some kind of protocol for communication between graphical engine and the glue program and implement it properly
  • Embed files at compilation time so that I dont have to ship the resource folder with it
  • This would most probably pass config from some kind of global config
  • Implement instances
    • When using a model - add the renderable to the queue of the model, when rendering use opengl instancing to lighten the load

Concepts

Controls

  • The engine contains subpackages, ea Graphics, which contains all graphics logics, exposed in Public.go

  • TextureManager

    • Used for loading textures
    • Manages duplicate loads, etc.
  • ShaderManager

    • The same essentially
  • Events

    • Currently unused except for keybinds
  • Events.Keybinds

    • Used for keybinds
    • Cannot call opengl functions from within, if needed use GraphicalManager.EnqueueLoadFunction(func() {})
      • This is because the engine multi-threads events, and opengl cannot be called from a different thread than main
      • Generally do this when calling opengl calls from goroutines, it will be called exactly once before drawing the next frame

Credits

So many thanks to learnopengl.com, a LOT of the opengl code is taken from there, most of it changed up, but this project would not exist if it was not for this site https://github.com/Samson-Mano/opengl_textrendering