Home Register Arcade Gallery Chatroom Members Today's Posts Log In
Go Back   Inside: SereneScreen Fan Forum > SereneScreen Products > Marine Aquarium 3 for Windows
Notices

Reply
 
Thread Tools
Old 02-01-2009, 08:01 AM   #281
jleslie
Engineer
 
jleslie's Avatar
 
Join Date: Aug 2002

Location: London, UK
Posts: 1,279
You could get an idea by looking around and comparing a quartz clock/watch with a non quartz one?
jleslie is offline   Reply With Quote
Old 02-01-2009, 08:28 AM   #282
philosopher
Registered
 
philosopher's Avatar
 
Join Date: Jul 2004

Posts: 86
Jim,

While I truly appreciate your offer of giving beta testers a free keycode, I just purchased the upgrade from V 2.6 to 3.0. $9.95 is such a small amount to pay for such a great work of art! Thank you for all your hard work.

In the comments area during purchase I sent a note about two things, but I thought I'd post them here too, so they don't get lost:

During the purchase I clicked to create a new account. It was unclear how to best return to the purchase cycle once the account had been created. I looked around for a while and finally just hit the back button a few times.

Also, using IE 7 (I use almost every browser out there since I'm a web developer myself but I happened to open IE 7 for this purchase) I immediately noticed that I got a pop-up warning about an unsecure object - http:// - being loaded on the secure - https:// - page. (This warning does not appear on firefox - it just ignores/refuses to load the object in question.)

Examining the files I was able to find an image's full path hard coded into the site's "main.js" file. That image is what is causing the warning:

var Pic1 = new Array()
Pic1[3] = '/images/titlebar/TitleBarA.jpg'
Pic1[0] = '/images/titlebar/TitleBarB.jpg'
Pic1[1] = '/images/titlebar/TitleBarC.jpg'
Pic1[2] = 'http://www.prolific.com/images/titlebar/TitleBarD.jpg'

If you let prolific know to just change the last image path listed here to be the same as the ones above it then IE users won't be told something on the page is unsecure.
Sincerely,

S. Justin Gengo
"Out of chaos comes order."
Nietzsche
philosopher is offline   Reply With Quote
Old 02-01-2009, 11:38 AM   #283
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
Thanks, I'll pass it along to Prolific.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-01-2009, 07:11 PM   #284
rps
Registered
 
Join Date: Oct 2008

Posts: 57
Originally posted by Jim Sachs:
Regarding the use of .png files as clock faces - Yes, the clock is an offshoot of the Logo system, so I could eaily put the hands over any picture. I may make it an option. But first I have to make the digital clock and calendar.

Regarding the second-hand, you are the first one to say that. Everyone else who's commented thought that the smooth-sweeping hand was great. It sure would have been a LOT easier to just move it once per second. You just need to read the Seconds field of the system time structure, and place the hand accordingly. I had to figure out the math (not my strong point) to factor in the milliseconds since the last screen refresh. The smooth-sweep looks far more elegant to me because when I see the "stuttering" hands in other programs I think, "Well, sure, they just have 60 different pre-antialiased drawings of that hand. Anybody could do that".  

What can I say? I just like the old clock from MA2.6 better!

However, since you've already done the hard part, it should be relatively easy to add a checkbox to the clock configuration tab, labeled "Smooth second hand movement" (or something like that). If it's checked, do what you're doing now; if it's not, then just reset milliseconds in the time to zero, before doing what you're doing now. Effectively, the second hand will be drawn in the same spot for 1000 milliseconds, before the "second" changes, and hand position is updated to a new spot. It should only take one line of code (plus the code to save and restore one more option) to make it work either way.

Originally posted by patscarr:
I'd like to see examples of both the stuttering and smooth sweeping in the aquarium so I could make an educated decision as to which one I like best.  
MA2.6 has the stuttering second hand; MA3Beta9 has the smooth (or sweep) second hand.

~Ralph S.
rps is offline   Reply With Quote
Old 02-01-2009, 08:01 PM   #285
rps
Registered
 
Join Date: Oct 2008

Posts: 57
Originally posted by Jim Sachs:
I had to figure out the math (not my strong point) to factor in the milliseconds since the last screen refresh.  
Why are you figuring milliseconds since the last screen refresh? The angle of the second hand (in degrees, with 0 deg = straight up [12 o'clock]) would be:

getSystemTime(systemTime)
numsecs = systemTime.wsecond;
if smoothSecondHand.checked then numSecs = numSecs + (systemTime.wMilliseconds / 1000)
angle = 6 * numsecs // 6 degrees per second

Now that you know the angle of the second hand, you can use normal trig functions to figure out exactly where the hand is supposed to be, at the current time. You don't need to figure out the elapsed time since the last refresh; you only need to know the current time.

Hope this helps, (and makes the clock code easier)

~Ralph S.
rps is offline   Reply With Quote
Old 02-01-2009, 08:13 PM   #286
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
Normal trig functions......hahahahahahahahaha!

The analog clock code is already in and working, never to be revistited. Now I'm on to the digital clock.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-01-2009, 08:44 PM   #287
rps
Registered
 
Join Date: Oct 2008

Posts: 57
Actually, having thought about it, you don't really want to call trig functions on every refresh cycle, because they're time-consuming, and very expensive (in terms of clock cycles). If I were doing this, I would create an array [0..59] of coordinate positions, representing the positions of the end of the second hand at each whole second. (The other end of the second hand is in the center of the clock, and remains constant.) This table gets initialized on startup; once you've calculated the positions, they don't ever have to be recalculated. On any drawing cycle, the "current second" is determined by reading systemTime.wSecond. For a stuttering second hand, you simply look up "position[curSec]". For a sweep hand, you can calculate the position by reading the milliseconds, and calculating the difference in position between position[cursec] and position[curSec + 1]:

dx = (position[curSec + 1].x - position[cursec].x) * systemTime.wMilliseconds / 1000
position.x = position[curSec].x + dx;

Repeat these two statements for position.y.

This code is fairly simple, it can be done entirely using integer operation (which makes it very efficient) and it's very easy to skip over the millisecond adjustment to convert from a sweep hand to a ticking hand.

I hope you'll reconsider your decision to "never revisit the analog clock code" again.

~Ralph S.
rps is offline   Reply With Quote
Old 02-01-2009, 09:03 PM   #288
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
Nope.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-01-2009, 09:24 PM   #289
henemly
asdf
 
henemly's Avatar
 
Join Date: Feb 2008

Location: Hiko, CommieFagnia
Posts: 278
Everything is perfect now. Thanks.
http://www.coltrain.byethost8.com

Last edited by henemly; 02-03-2009 at 08:26 AM.
henemly is offline   Reply With Quote
Old 02-01-2009, 09:38 PM   #290
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
You will have many choices.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-01-2009, 10:08 PM   #291
rps
Registered
 
Join Date: Oct 2008

Posts: 57
For what it's worth, I wrote a simple test program to show a moving second hand, including a checkbox to make it sweep or tick; it's "secondHand.exe" and can be downloaded from http://sickinger.net/download

The code for this has also been posted, it's "sh_main.pas". (Because I'm a pascal programmer.) The key code (that would be applicable to the MA3 clock) is less than 25 lines. (For initialization the lookup tables and drawing the second hand, with an option for sweep or ticking.)

~Ralph S.
rps is offline   Reply With Quote
Old 02-01-2009, 10:56 PM   #292
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
It's REALLY time to move on to something else. This subject is a dead parrot.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-01-2009, 11:21 PM   #293
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
philosopher - thanks for catching that HTML error. JimR has fixed it.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-02-2009, 01:10 AM   #294
tifosi
Registered
 
Join Date: Nov 2007

Posts: 8
hello Jim, nice work on the MA3 crystal clock. I'm glad to report there are no multimonitor issues so far. on the other hand, is there any intention to allow the aquarium to be switched to nighttime lighting?

I vaguely remember you mentioning it but i cant really find the post/thread.

Thumbs up for the good work. Keeping the other thumb around for the grand finale and unveiling!
tifosi is offline   Reply With Quote
Old 02-02-2009, 01:41 AM   #295
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
No Grand Finale or unveiling. Improvements will continue until they nail down the lid on my coffin.

There are all kinds of multimonitor issues, mostly having to do with users setting the monitors to different resolutions.

The user will eventually have much greater control of the background colors. The foreground "lighting" is more problematic, since MA3 uses Shaders now instead of the Direct3D lighting model. I'm working on it, though.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-02-2009, 08:42 AM   #296
iMark
Registered
 
Join Date: Mar 2003

Location: MIssouri
Posts: 105
at this point, I almost wish I hadn't heard of the new version until it had progressed, or perhaps I should quit checking the forums.....it seems that everything but the fish and corals are important..music, clocks, multiple screens...yes, I understand it's all a process... yes, I understand that the bigger the group, the more problems get sorted out earlier....I'm just to the point where I'd like to see the gist of the aquarium move forward, and I'm in a bit of a crabby mood today, so forgive me for what sounds like complaining.....
iMark is offline   Reply With Quote
Old 02-02-2009, 09:02 AM   #297
cjmaddy
Registered
 
cjmaddy's Avatar
 
Join Date: Nov 2001

Location: Lancashire, UK
Posts: 7,854
iMark, - I second that. - Hence my 'Cromwell' comment!
cjmaddy is offline   Reply With Quote
Old 02-02-2009, 10:48 AM   #298
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
I know what you mean iMark. I was just sitting down to bring the clams to life (fun) when I got a wave of complaints that the clock/calendar wasn't in yet (not fun). There are even those who want me to go back and tear apart the clock code, even though it's working perfectly.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 02-02-2009, 10:56 AM   #299
philosopher
Registered
 
philosopher's Avatar
 
Join Date: Jul 2004

Posts: 86
You're Welcome

Jim,

You're welcome. I'm glad I could help out a little bit. I try to only comment when I think it may be useful and I can potentially provide some information that may be acted on.

Clams? It will be wonderful to see the clams moving! I know the squeaky wheel gets the grease. So here's a vote for letting you have some fun and getting the clams going instead of the clock/calendar additions!
Sincerely,

S. Justin Gengo
"Out of chaos comes order."
Nietzsche
philosopher is offline   Reply With Quote
Old 02-02-2009, 11:20 AM   #300
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,788
I've got to finish up the clock/calendar first. At my age, I'll never remember where I was if I leave it half-finished.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Reply
Go Back   Inside: SereneScreen Fan Forum > SereneScreen Products > Marine Aquarium 3 for Windows




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 On


All times are GMT -6. The time now is 02:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.