Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-21-2011, 06:05 PM

Im sorry, but the rounding thing doesn't work, I just tried for about 20 minutes to get it to work, but the thing is that there is no function to round to a certain decimal place. I even tried to compensate for this by doing multiplying the decimal by 100 (to get the two digits past the decimal place), round that number to get rid of the rest of the decimals, and then divide by 100 so that those two decimal places would be the only ones showing, but for some reason it did not work and kept showing long decimals. It is a flaw in Alice's programming, maybe one that they can fix.

I'll attach here what I tried to do in the stopwatch method so that you can see, but it didn't work. Look at the Duration change that I made to the While statement there, that is why it updates faster than every 1 second. There are also a few other errors in your program.
Attached Files
File Type: a2w Live Clock Beta Version 1.5.a2w (134.6 KB, 11 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-21-2011, 07:46 PM

Quote:
Originally Posted by Dameria View Post
Im sorry, but the rounding thing doesn't work, I just tried for about 20 minutes to get it to work, but the thing is that there is no function to round to a certain decimal place. I even tried to compensate for this by doing multiplying the decimal by 100 (to get the two digits past the decimal place), round that number to get rid of the rest of the decimals, and then divide by 100 so that those two decimal places would be the only ones showing, but for some reason it did not work and kept showing long decimals. It is a flaw in Alice's programming, maybe one that they can fix.

I'll attach here what I tried to do in the stopwatch method so that you can see, but it didn't work. Look at the Duration change that I made to the While statement there, that is why it updates faster than every 1 second. There are also a few other errors in your program.
Great job! Thanks for helping! I will base Beta Version 2 off of Beta Version 1.5, not Beta Version 1!
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-22-2011, 10:18 AM

Quote:
Originally Posted by David B View Post
Great job! Thanks for helping! I will base Beta Version 2 off of Beta Version 1.5, not Beta Version 1!
All I did was change one thing though! If you have already worked on beta version 2, dont just redo everything youve done. Just add what I have added, it would take litterally 2 seconds. Also you dont need to do the whole rounding thing because it didn't work for me (did it work for you?). All I did other than the rounding was to set the duration of the stopwatch to refresh every 0.05 seconds.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-22-2011, 11:00 AM

Quote:
Originally Posted by Dameria View Post
All I did was change one thing though! If you have already worked on beta version 2, dont just redo everything youve done. Just add what I have added, it would take litterally 2 seconds. Also you dont need to do the whole rounding thing because it didn't work for me (did it work for you?). All I did other than the rounding was to set the duration of the stopwatch to refresh every 0.05 seconds.
I posted in a previous post in this thread that I would scrap the stopwach all together, and restart it from scratch, but I think that after what you did, that won't be necessary. Also, I am not sure why you said that the rounding thing in your version of the stopwatch didn't work, because as far as I can tell, your stopwatch is working perfectly. The only problem I still have with the stopwatch is that the pause/restart system only works once, then it stops working all together. This problem will probably be the last problem to be fixed, but as far as I can tell, at this point, this is the only problem. Everything else appears to be working perfectly. If you can help me fix this problem, please do so.

Here is a picture of your stopwatch in action!


Last edited by David B; 02-22-2011 at 11:22 AM.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 02-22-2011, 11:54 AM

I think what dameria means is that when the last digit ends in "0", it becomes truncated (cut off.) For example the stopwatch would be like:

...
5.25
5.26
5.27
5.28
5.29
5.3 <-The zero is cut off
5.31
5.32
...

Hey! Guess what though! I just so happened to download the stopwatch program in this thread and modified it so the extra zeros appear! What I did was test if the number was divisible by ten (after multiplying it by 100 and flooring it.) Would you guys like me to post this modified version?


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-24-2011, 04:20 PM

Quote:
Originally Posted by reuben2011 View Post
I think what dameria means is that when the last digit ends in "0", it becomes truncated (cut off.) For example the stopwatch would be like:

...
5.25
5.26
5.27
5.28
5.29
5.3 <-The zero is cut off
5.31
5.32
...

Hey! Guess what though! I just so happened to download the stopwatch program in this thread and modified it so the extra zeros appear! What I did was test if the number was divisible by ten (after multiplying it by 100 and flooring it.) Would you guys like me to post this modified version?
Yes! Post it as Beta 1.75! Thank you for all of the help you guys are giving me! As for the zero being cut off, it really doesn't bother me that much, but it would be nice to fix.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-24-2011, 05:55 PM

Actually, my version was not working like that. What was happening with me was that it still showed a huge amount of decimals afterwards, so its weird that it worked for you but not for me, I even have the new version of Alice 2.2 installed. Hmm, thats really weird haha I have no idea why it is like this:
Attached Images
File Type: jpg Alice Stopwatch.jpg (56.5 KB, 43 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 02-24-2011, 06:21 PM

Quote:
Originally Posted by Dameria View Post
Actually, my version was not working like that. What was happening with me was that it still showed a huge amount of decimals afterwards, so its weird that it worked for you but not for me, I even have the new version of Alice 2.2 installed. Hmm, thats really weird haha I have no idea why it is like this:
That's odd, considering I worked off of your template for beta 1.75. Anyways, here is my version. I basically checked for divisibility and concatenated the extra 0's if it was necessary. Let me know if my version works for you Dameria.
Attached Files
File Type: a2w Live Clock Beta Version 1.75.a2w (208.1 KB, 9 views)


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-24-2011, 07:04 PM

Quote:
Originally Posted by Dameria View Post
Actually, my version was not working like that. What was happening with me was that it still showed a huge amount of decimals afterwards, so its weird that it worked for you but not for me, I even have the new version of Alice 2.2 installed. Hmm, thats really weird haha I have no idea why it is like this:
I'm sorry, but I have no answer as to why that is.
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-24-2011, 07:08 PM

I will be releasing beta 2 within the next hour, so please wait if you are going to help me out. Thank you.
   
Reply With Quote
Reply

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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.