You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GameMain could be broken into several components, I think splitting into model (terrain, units), view (main opengl rendering) and controller (hud/hotkeys) might work.
This would allow all the rendering code to be split into its own system, allowing easy future extensions (3d terrain or something)
The UnitTypes currently contain graphics, it maybe be better to remove these and have the renderer map UnitTypes to graphics which would allow easier graphic modding
The text was updated successfully, but these errors were encountered:
Jup, that should be the way to go. Currently i'm implementing the new renderer which any object registers to. The renderer then fetches all the render instructions and orders them efficiently, then submits it to the driver (using either GL2, GL3 or Vulkan (gl2 support will be annoying..)).
The model (terrain, units) therefore just provides render instructions, they can even be implemented in some other subsystem and a pointer to them is returned to the renderer.
By the way, i think the current design that the "engine" is created and is then passed to some "engine-user" (in this case GameMain) is pretty good. We have to create clean engine features that can be used by a "game".
Of course all game features are implemented in the engine someday, but that way we can create engine features from the GameMain until it is empty and our structure stays clean.
GameMain
could be broken into several components, I think splitting into model (terrain, units), view (main opengl rendering) and controller (hud/hotkeys) might work.This would allow all the rendering code to be split into its own system, allowing easy future extensions (3d terrain or something)
The
UnitTypes
currently contain graphics, it maybe be better to remove these and have the renderer mapUnitTypes
to graphics which would allow easier graphic moddingThe text was updated successfully, but these errors were encountered: