Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Real-Time Clock (http://www.alice.org/community/showthread.php?t=3294)

 Dameria 10-30-2009 05:07 PM

Real-Time Clock

1 Attachment(s)
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...)

 xxledzeppelin2x3 10-30-2009 11: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!?

 Dameria 10-30-2009 11: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.

 x2495iiii 10-31-2009 02: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!

 Dameria 10-31-2009 01:35 PM

1 Attachment(s)
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!)

 cardsfan527 10-31-2009 01:50 PM

looks great

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

 Dameria 10-31-2009 01:54 PM

[QUOTE=cardsfan527;12796]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[/QUOTE]

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.

 x2495iiii 10-31-2009 03: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?

 Dameria 10-31-2009 03: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.

 x2495iiii 10-31-2009 03: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!

All times are GMT -5. The time now is 10:16 AM.

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