Sorry your browser is not supported!

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.

Work in Progress / Run functions in DBPro independently (keyword: threads) [STYX 1.10 beta]

Author
Message
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 20th Oct 2006 15:25 Edited at: 21st Oct 2006 02:28
New in STYX 1.10 are the commands SET INTERVAL SYNC ON and SET INTERVAL SYNC OFF. The latter allows you to run Intervals* independently from the main loop. That means that you can do time intensive calculations while there's still something going on in the actual game.

In the example "Intervals2.exe" there's a rotating cube while DBPro does 6,000,000 square root calculations at the same time. Additionally it updates the clock display every second.
The example "No Intervals.exe" shows an implemenation without intervals.


Source code "Intervals2.exe"



Source code "No Intervals.exe"




* Intervals is a command set in STYX that allow you to automatically call DBPro functions in definable intervals for a given number of times.

Attachments

Login to view attachments
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 20th Oct 2006 19:09
Wow! That sounds REALLY usefull!

EZrotate!
TextureMax!
3D Character Maker!
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 20th Oct 2006 20:05
Well it hopefully is.

I wouldn't mind if those who tried it would posted the FPS with calculations on and off, as well as the average calculation times.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 21st Oct 2006 02:29
I was just informed that the zip file contained two almost identical exe files. Ooops .
So the attachment (first post) now contains the mentioned "Intervals2.exe" and "No Intervals.exe".

Please check it out and report back. (BTW: You don't need STYX to run those demos).

Login to post a reply

Server time is: 2024-11-23 19:45:21
Your offset time is: 2024-11-23 19:45:21