Nixie Clock ScreenSaver

Post screenshots, binaries and projectfiles of the projects you have made with ZGE that you want to share!

Moderator: Moderators

Post Reply
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Nixie Clock ScreenSaver

Post by jph_wacheski »

I recently got an Ardurino and have been looking at some of the cool projects ppl have posted,. when surfing around the net I happened on a site about Nixie tubes,. and thought a clock would be cool. The price of all the gear is a bit much, so I just built a virtual one in ZGE!

I modified the photo from here; http://en.wikipedia.org/wiki/Nixie_tube

Latter I may do the whole thing modeled in 3d ? as even this ver. makes a nice clock that look cool from accross the room.

Anyway the clock code I devised is;

Code: Select all

int zH=getSystemTime()/3600;
int zM=getSystemTime()/60-zH*60;
int zS=getSystemTime()-(zH*3600+zM*60);

  if (zH>12) zH-=12;   //12 or 24 hours

string h=intToStr(zH); if (length(h)<2) h="0"+h;
string m=intToStr(zM); if (length(m)<2) m="0"+m;
string s=intToStr(zS); if (length(s)<2) m="0"+m;

t.text=h+m+s;
Cheers

Opps! I had a typo,. or a cutNpast-o in there;

Code: Select all

string s=intToStr(zS); if (length(s)<2) m="0"+m;
//from above should have been
string s=intToStr(zS); if (length(s)<2) s="0"+s;

This made the digits jump around some,. it is fixed in the attachment.
Attachments
NixieClock_03.zip
266kb ziped .scr (fixed)
(265.6 KiB) Downloaded 1218 times
Last edited by jph_wacheski on Fri Feb 18, 2011 3:48 pm, edited 1 time in total.
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Never heard of Nixie tubes before but I like this screen saver! Thanks to the flickering effect they don't look like static bitmaps. Also the clock script is neat.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

yeah,. that is done with the BitmapLoad and a couple of BitmapBlur componets, that way, I only needed to have the actual number font file in the project once and modify it at run time to generate the blur bitmap.
iterationGAMES.com
Post Reply