I'm not using a rendering thread. I'm just painting after each gametick (which is fired 17 times per second).
My current idea is something about this (without the user interaction yet).
Indeed the renderer needs access to TGame as well as TLevelData (as well as user interface state) in my simple perception
Code:
TLevelData.Load(); // loads all needed graphics
TGame.Init(TLevelData); // prepare
TRenderer.Init(TLevelData, TGame); // prepare
The application loop:
Code:
if TGame.Tick then
begin
TRenderer.Render;
end;
Bookmarks