You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
Input = 2014
Case "2014": #Include Keyboard2014.DBA
Case "2015": #Include Keyboard2015.DBA
ignorePause as boolean `if true, update will continue to run when gameplay is paused.
ptr as integer `pointer to function
mark as integer `timestamp of last update call
cycle as integer `ms after last timestamp before calling an update again. used to determine which updates get processed in a given loop.
priority as integer `used to determine the order in which the updates being processed this loop are handled.
`note: Be carefull when using cycle delays and dependant priorities that the settings for linked updates work with each other as expected.
` for example updateA (priority 2, cycle 0) needs the results of updateB (priority 1, cycle 5000), updateA will fire every loop but will only get new data every 5 seconds due to reliance on the slower updateB
` thus updateA will effectively have an apparent cycle of 5 sec, but it will continue to tie up much more processing time, reusing old data every loop.
`TODO: instead of priority, use a comma delimited string of other required updates.
`TODO: add 'processed' flag which gets reset at top of main for all updates on which timer() - .mark > .cycle (ie ready to run update)
`TODO: if a required update has not processed, defer current update and re-attempt similar to how gui elements get resolved.
Login to post a reply