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.

The 20 Line Challenge / 3D Clock (DBPro Only)

Author
Message
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 14th Oct 2002 23:51
Hey all, give this a try, it's a 3D Clock with some face border effects.

Plop [http://www.fridaynightsoftware.com/public/time.dll]this DLL[/url] into your "Dark Basic Software\Dark Basic Professional\Compiler\plugins-user" folder in order to get the code below working.

The DLL currently contains 7 DBPro-extending time related functions:




only 16 actual lines of code (which could be less). now I wait on my slap on the wrist for writing a DLL to get the time.
-= i only do what my rice krispies tell me to do =-
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 14th Oct 2002 23:57
Here's a screenie of it (hoping the image tag works because it gave me an error):


-= i only do what my rice krispies tell me to do =-
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 15th Oct 2002 02:07
You could have used the get time$() and get date$() commands to get the time and date
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 15th Oct 2002 03:23
He could - but isn't it far nicer to just have a "get minutes()" command? His 20 liner is more a demonstration of the ease of writing additional commands for DBPro than it is a 20 liner!

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 15th Oct 2002 18:19
In addition to the ease of use (thanks Rich ), there's also the fact that the normal get time$() would use the same system calls that I do, and from there it would have to build the string and return it. From our side, we'd then need to parse the string out and get our values.

[sheepishly]I was just trying to squeeze out extra clock cycles![/sheepishly]

-= i only do what my rice krispies tell me to do =-
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Oct 2002 01:03
I just like to have everything in one self contained file, no dll's, no media. But then I haven't really tried writing external files. In fact I have (gasp!) no idea how to write dll's and stuff.
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 16th Oct 2002 01:20
this EXTENDS dbpro. your compiled program WON'T require the use of DLLs or external media.

have you tried this out? notice that you don't have to call LOAD DLL or CALL DLL? that's because the get minutes(), get seconds() etc. commands are actually recognized by the compiler and become part of the compiled instructions carried out by the app.

-= i only do what my rice krispies tell me to do =-
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 16th Oct 2002 04:23
It's true.. Chip has written new DBPro _commands_, not just "call dll" stuff. Much much more interesting and a first for DB (any version)

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 16th Oct 2002 18:10
sheesh...it doesn't even look like anyone's trying this out! i've only had 9 downloads of that dll! ha!

oh well...at least I got that truly posh comment from Rich

-= i only do what my rice krispies tell me to do =-
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Oct 2002 19:24
That looks interesting. How would you go about writing a dll to add some new dbpro commands which are recognised by the compiler? I'd really like to learn how to do this.

Nice clock, by the way .
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 16th Oct 2002 21:04
one of those DBDN membership benefits, for the time being. I'm helping Lee by testing out the extension SDK. I've already started a couple of tutorials and will make them public once the SDK is released.

otherwise, you can join DBDN and ask Lee for the kit!



-= i only do what my rice krispies tell me to do =-
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 16th Oct 2002 22:57
I'm impressed. :o
I think I have to learn much more.

"If you can't make it good
make it look good."
Bill Gates
ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 17th Oct 2002 01:23
D Man...this should help you to understand the code better. This is essentially the same thing, only in the uncompoodled version. It reads much better.



-= i only do what my rice krispies tell me to do =-

Login to post a reply

Server time is: 2024-04-20 06:59:47
Your offset time is: 2024-04-20 06:59:47