Re: OidZone and Crash Course update
- Posted by Robert Craig <72614.1667 at COMPUSERVE.COM> Dec 28, 1996
- 1724 views
Michael Packard writes: > BTW if anyone can give me a more accurate way of determining elapsed time > in Euphoria (I need at least .01 second accuracy) I can make OZ run faster > on slower machines. (by dynamically changing the object speeds as the The tick_rate(x) library routine has already been implemented for Euphoria v1.5 for DOS. It lets you increase the DOS clock tick rate from 18.2/sec to whatever you like, within reason. On a 486, tick_rate(100), i.e. 100 ticks per second is no problem. On a fast Pentium, 1000 ticks per second is ok. The Euphoria time() routine will then advance in smaller, more precise units. I found that Peter Blue's Space Invaders game can be made to run much faster when tick_rate is set higher and the main loop is timed at something less than 1/18 second. Actually, on a Pentium-150 Space Invaders spends over 90% of it's time in a while-loop, waiting for the 1/18 sec clock to advance. Of course none of this does you any good until I release it. So I'm going to put a kind of "experimental" alpha release of v1.5 on the Euphoria WEB page early next week. I might only ZIP the necessary files, ex.exe, machine.e and maybe a couple more. In addition to tick_rate() you'll also get the new "with profile_time" feature that lets you do time profiling of your code. Some more features are in the works but you won't see them yet. Since it's now obvious that a new release is coming fairly soon (a few months away), effective today, any new person who registers for the current shipping release (v1.4b) will be allowed a free download from the WEB of the Euphoria Complete Edition v1.5 for DOS when it's finalized. Some people have asked about the upcoming Windows (WIN32) version. It's not meant to supercede the DOS version. It will run using the the WIN32 API (Application Programmers Interface) that is supported by Windows 95 and Windows NT. It will not require DOS or any DOS extender. It will initially be rather primitive. It will let you call 32-bit C routines in .DLL files, in particular you will be able to call WIN32 API routines (which exist in .DLL files on every Windows 95 or NT machine). For example, in the WIN32 API, one of the over 1000 C subroutines is called PlaySound(). PlaySound() will play a .WAV sound file with various useful options. You'll be able to call this routine from your Euphoria program. (.WAV can be done now in the DOS version too, thanks to Jacques efforts). There are lots of other useful routines like that. The details of all this will be worked out over time as the product evolves. The DOS version will remain the "main" version of Euphoria for the forseeable future and will continue to be enhanced. Currently the 2 versions share most of their code. The core language and most of the library routines are the same. The Windows version can currently execute any plain text-mode Euphoria program (such as ed.ex, search.ex, lw.ex) in a "console" text window, exactly emulating the DOS version. You can run these programs from the command-line just as with the DOS version. This was a useful first step to prove that all the DOS-dependencies in Euphoria could be isolated and emulated where-possible using WIN32 calls. Pixel graphics, Windows GUI support, and more will be added in the future. -- Rob Craig Rapid Deployment Software