Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Real-Time Clock
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default Real-Time Clock - 10-30-2009, 04:07 PM

I have been working on this the past few hours as I thought about how I would go about doing this. At first I thought it would be too hard for me, but as I started thinking I started to do things step by step, and eventually I found out how to make the clock work based on the real time!

Please x2495iiii and dubastot and Chris101b try my program and tell me what you think! This program actually taught me more about the math of using Alice, so I am glad I made it.

When you start the world, the hour, minute, and second hand go to the appropriate place on the clock, and then tick accordingly every second. The clock is very accurate, and just in case the timing of Alice is a little off, the clock resets itself to the correct time every 10 minutes (you can change this within the program, I have notes in it to explain how).

Also, the hour hand might be different for you. I had to subtract 4 hours from what it would originally display. I don't really know why, but I think it has to do with the GMT time and my timezone. It is set to U.S. Eastern Time Zone, so you might have to change it accordingly (see notes in program for how to change the hour hand), but run the program first just to see if it gives you the right hour, and if not than change the math so that it does.

I hope you like it! (Although I don't know how useful this program will be...)
Attached Files
File Type: a2w Clock2.0.a2w (438.4 KB, 417 views)

Last edited by Dameria; 07-15-2010 at 09:22 PM.
   
Reply With Quote
Old
xxledzeppelin2x3
Guest
 
Status:
Posts: n/a
Default 10-30-2009, 10:17 PM

very nice, but i think the 2.0 version should include a way to change the hour and minute hands to the correct time!?
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-30-2009, 10:18 PM

It should be the correct time, well at least the minute hand should be. There are directions within the script explaining how to change the hour hand. I think it might be different time zones that might be the problem.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-31-2009, 01:24 AM

Really, this is excellent work, and I could honestly see myself using this to animate clocks properly in Alice games. Great job!

I'm not sure why you had to subtract 4 hours from the time, but I live in the same time zone you do (GMT -5:00) and it was exactly four hours slow until I changed it back.

Still, wonderful work. I honestly get a kick out of accurate, yet simple projects like these because they're like gadgets in the sidebar (of Windows Vista): neat little programs that are fun to collect and fun to play with. Awesome job!


(')>
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-31-2009, 12:35 PM

Ok, I have been working on this for a while now, and I made a better version of the Clock. The reason why I had the hour wrong is because I was using Alice 2.0 and there must be an error while using time on that version. I downloaded 2.2 today and I actually like it a lot better (although it will take a while to get used to). The time for me actually works correctly on 2.2 for me, so I fixed that.

New Additions:

I added a new clock design that will be noticeably different from the old one that I had in the first version. This one is a modern clock now, HOWEVER you can also click anywhere on the clock to change it back to the original Clock wooden design from the first version (if you like that one better).

Also, I think this is cool, I added a new Digital Clock in the regular Clock, so now not only will you see the ticking clock version, but a digital one as well. Thank you cardsfan527 for the post of your digital clock, you helped me to design the one that I used for my program!!! You really helped a lot.
If you do not like the look of the digital clock, you can click anywhere on the digital clock and it will disappear, and click again for it to reappear.

Oh and I also added an AM / PM on it so that it will tell you whether it is lets say 2:46 AM or 2:46 PM instead of just 2:46. The AM is to the top left of the clock, and PM is on the top right. I did not make any scripts to make these disappear.

Please try the program and tell me what you think, or if there are any errors, and what I should add for version 2.1 (and if there are a lot of changes, version 3.0!)
Attached Files
File Type: a2w Clock2.0.a2w (439.4 KB, 121 views)

Last edited by Dameria; 10-31-2009 at 09:35 PM.
   
Reply With Quote
looks great
Old
cardsfan527
Guest
 
Status:
Posts: n/a
Default looks great - 10-31-2009, 12:50 PM

Hey, first, thanks for the recognition. Second, this clock looks really nice, and very accurate. I like the user input for what hour it is, but when i put in my input it only changes the regular clock, not the digital. Other than that, looks perfect--great job
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-31-2009, 12:54 PM

Quote:
Originally Posted by cardsfan527 View Post
Hey, first, thanks for the recognition. Second, this clock looks really nice, and very accurate. I like the user input for what hour it is, but when i put in my input it only changes the regular clock, not the digital. Other than that, looks perfect--great job
Hmm, the user input thing was supposed to be disabled, did you enable it? I think I should actually take it out completely if it is automatically enabling when you open the program.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-31-2009, 02:38 PM

Hang on a sec, I just got a nasty error in Alice and I'm trying to fix it. It might take up to an hour, unfortunately, but I'll definitely leave my feedback when it's fixed, alright?


(')>
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-31-2009, 02:43 PM

Oh, do you mean with my program or Alice in general? I hope its not my program, because I am not getting any errors with it.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-31-2009, 02:54 PM

Alrighty, I got it fixed, and I have to say LOVE it! Seriously, this makes me wish I could run Alice rpograms in the background, just so I could keep this open! This is great!

Seriously, awesome job!


(')>

Last edited by x2495iiii; 10-31-2009 at 04:27 PM.
   
Reply With Quote
Reply

Tags
clock, time

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.