AW: Cross-Platform Game Loop
Gameloop.... Ganz einfach...
UI Thread...
Delphi-Quellcode:
Mavarik
TTask.Run(Procedure
begin While GameRunning do begin Starte Stopuhr... Warte bis alle Threads ein Frame erzeugt haben Stoppe die StopUhr SingnaleThreadNextFrame; if StopUhr < 16 then Sleep(16-Stopuhr) Syncronize(DisplayFrame); end end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz