This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ramdor72's profile picture

Clock Tower - Analogue Clock Face

Started by ramdor72, 29 December 2012 - 05:15 PM
ramdor72 #1
Posted 29 December 2012 - 06:15 PM
I though you might be interested in a build a friend and I are working on at the moment. We wanted to have a working clock dial on our clock tower so I started working on a ComputerCraft implementation.

We built a fairly loose representation of The Elizabeth Tower which houses Big Ben in London. Here are a couple of videos :)/>

[media]http://www.youtube.com/watch?v=I1EPyz0WpqY[/media]

[media]http://www.youtube.com/watch?v=RrgOIGW0C-s[/media]

and now with chimes :D/>

[media]http://www.youtube.com/watch?v=M2MYcgp91bc[/media]

and colours



Hope you enjoy :)/>.

The code for the clock dial can be downloaded here : http://pastebin.com/LGNUpDzz
The code for big ben chimes can be downloaded here : http://pastebin.com/bJEmGyeD

Cheers for such an amazing mod :)/>
Dlcruz129 #2
Posted 29 December 2012 - 08:17 PM
Very nice!
Khalamov #3
Posted 31 December 2012 - 08:32 AM
Fantastic! Will you be uploading the version with the iron note block chimes as well? I need to start building a tower for this.
ramdor72 #4
Posted 31 December 2012 - 02:06 PM
Fantastic! Will you be uploading the version with the iron note block chimes as well? I need to start building a tower for this.

cheers guys :)/> I've now added the info for the chimes to the original post.
dmitchell94 #5
Posted 17 January 2013 - 03:00 PM
The video doesnt work :(/>
sjkeegs #6
Posted 18 January 2013 - 01:51 AM
The video doesnt work :(/>
All three worked for me.
ramdor72 #7
Posted 18 January 2013 - 02:38 AM
The video doesnt work :(/>

Strange :s Anyway, direct links are…




http://www.youtube.com/watch?v=I1EPyz0WpqY
http://www.youtube.com/watch?v=RrgOIGW0C-s
http://www.youtube.com/watch?v=M2MYcgp91bc
theoriginalbit #8
Posted 18 January 2013 - 02:47 AM
dude that is awesome! You're one skilled builder and coder… :)/>
coryb2007 #9
Posted 18 January 2013 - 08:29 AM
Quick question, does this clock have to be 6x6 monitors, I am asking cause I was curious if it could be smaller or if it was hard coded. Never mind looked at the code and answered my own question.
xxxredportalxxx #10
Posted 18 January 2013 - 10:15 AM
Fantastic bit of code ramdor! Your one skilled lua coder ;)/>
redeye83 #11
Posted 22 January 2013 - 07:54 AM
can I use this on my server? This would be awesome in my train station
ikke009 #12
Posted 23 January 2013 - 12:13 AM
Haha that chime is awesome :D/>
ElectricOverride #13
Posted 23 January 2013 - 09:09 AM
Amazing! Would it be allright if I look at the code, I have been wanting to make a small kind of one.
ElectricOverride #14
Posted 23 January 2013 - 09:28 AM
The video doesnt work :(/>
All three worked for me.
Same, all fine for me!
Mads #15
Posted 23 January 2013 - 10:01 PM
Cool! This is actually very nice, and well done.
xInDiGo #16
Posted 24 January 2013 - 12:25 PM
very cool! may have to use this in my builds!
ramdor72 #17
Posted 29 January 2013 - 02:05 PM
heh thanks guys for the feedback :)/>

Yeah, feel free to use it and change it. Put a link to a pic or vid in here if you get it up and running.
ramdor72 #18
Posted 21 May 2013 - 09:54 PM
Recently updated this to calculate best fit/size on startup, and to use 0.5 font scale to increase the resolution. Links in original post are still valid.

Cheers.
ramdor72 #19
Posted 22 May 2013 - 07:41 AM
Changed a bunch of stuff today.

Re-worked the circle code, added colour support and it now finds an attached monitor.

cogilv25 #20
Posted 22 May 2013 - 11:33 AM
this is pretty epic! why are there creeper heads on your mini map..?

EDIT: the only problem I can see is if you have more than one monitor it will only display to one of them
ramdor72 #21
Posted 22 May 2013 - 12:51 PM
this is pretty epic! why are there creeper heads on your mini map..?

EDIT: the only problem I can see is if you have more than one monitor it will only display to one of them

They like to creep up on me ;)/>

yeah if you have them on different faces of the computer, it only uses the first one it finds.

Also working on some issues with setTextScale on large screen atm. Not sure if it is a bug or what, but stuff doesnt always get redrawn. If you press enter on the console, it'll redraw the whole line. A strange one atm.
ramdor72 #22
Posted 22 May 2013 - 01:13 PM
Ok, have fixed the issue with the setTextScale and large monitor grids. It seems that the monitor grid needs time to reset to the new scale, otherwise corruption/missing characters occur. I added a 1sec pause after the scale and all is well.

Other people have posted about this exact issue in other threads.

EDIT: it isnt 100% fixed. Fingers crossed it get fixed in next release of CC
Vorg #23
Posted 27 May 2013 - 12:32 AM
Would it be possible to sync the clock to in game world time? I know there is another program here that gets your time zone real world time which would also be an interesting option.
cogilv25 #24
Posted 28 May 2013 - 03:26 PM
Would it be possible to sync the clock to in game world time? I know there is another program here that gets your time zone real world time which would also be an interesting option.

You could Sync it every 5 minutes or something (user adjustable?) to real world time found on the internet but I'm not sure how useful that would be in game unless you had a clock for real time and another for game time… could be cool :)/>
Goldstrike #25
Posted 24 September 2013 - 08:30 AM
I have found an issue on a server with this. When a player leaves the area and comes back the screen is black except the lines where the hands are. I have tried spot loaders and chunk loaders but it doesn't solve the issue. Any ideas how to fix?
mrdawgza #26
Posted 24 September 2013 - 08:44 AM
This looks brilliant! I'm so going to use it.
overfritz #27
Posted 07 October 2013 - 12:17 AM
Works on latest CC, both clock and chimes. I have them setup in my space station room with GalactiCraft, and I have another PC with Plastic Glasses enabled. The combo works like a charm.
ramdor72 #28
Posted 10 October 2013 - 10:04 AM
I have found an issue on a server with this. When a player leaves the area and comes back the screen is black except the lines where the hands are. I have tried spot loaders and chunk loaders but it doesn't solve the issue. Any ideas how to fix?

I filed a bug report in one of the betas way back about this, some issue related to screen size. Nothing was done about it though. I'll do some testing later to see if it is fixed in later versions.

EDIT: tested with 1.56 and it seems like the problem still exists with large monitors (i tested with 5x5). I will look into it some more when I have time.