Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 137 posts ] Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
 Post subject: So, what's next after v16.12?
PostPosted: Thu Dec 29, 2016 10:09 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Besides the addition of new toys, a lot of work in v16.12 was invested into 'polishing' what was already there. This meant some very visible changes (like the new Modules tab in Nexus and Nexus Ultimate) but mostly a lot of under-the-hood optimizations to performance plus fixes for minor visual glitches and some long outstanding hard-to-diagnose bugs, etc...

Unfortunately so many changes to the code also ended up introducing a couple of new glitches which were not detected until after the official release.

Personally I would release a new version as soon as a serious bug is fixed, but users generally do not like too many updates in a short period of time. Doing this also makes an application look bad even though the intention is good (i.e.; fix a bug as soon as it is detected).

So, the next version will be mostly a maintenance release to v16.12, but since I had to wait a while anyway, I couldn't resist adding some more toys and polish in the mean time.

So, what's new in the next release, besides the bug fixes to v16.12?

1. Smooth scrolling in the Shelf.

The devil is in the details. It always is. Sometimes it's not the feature itself that makes you go 'Ahhhh' but how much attention to detail was given to it.

The Shelf (tabbed dock) supports multi rows of icons. Up until now scrolling the Shelf meant a new icon row would instantly replace the previous row. Now the icons smoothly scroll up and down (but speeding up to keep up with you if necessary).

Image

I bet not a lot of people noticed (unless, perhaps, if you happen to have more than two active docks), but a similar thing was done in v16.12 to the scrolling in the Docks & Shelves tab in Preferences.

Details.


2. New 'Next Desktop Background' internal command.

Switches to the next wallpaper when Windows is in slideshow mode.


3. New 'Moon Phase' module.

After being on a limbo for a very long time, development of new modules really picked up the pace lately. This is mostly due to the insane amount of work done from v15.9 onward to 'unify' all the code related to the Winstep modules. It totally paid off, as adding new modules is now both quick and easy.

Or should be.

For this version I wanted to add a new module that was somewhat interesting but at the same time easy and quick to implement. A 'filler', you can say, since more useful modules (such as a disk monitor module) will require further changes to the module engine beneath.

So why not a Moon Phase module? I mean, how hard can THAT be?

Image

Turns out it is actually quite complex if you want to do it right, as I quickly found out.

As most of you have probably noticed by now, I don't like to do half-baked things. My vision for this module involved realistic phase change animations with realistic shadows, accurate viewing angles, etc... For instance, did you know that the moon in the Southern hemisphere appears upside down from the point of view of someone in the Northern hemisphere (and vice versa, of course)? Yes? Ah, but did you know that the moon wobbles? :) This movement is called 'moon libration', by the way.

There were two ways I could go about this: either use pre-rendered frames showing all the phases of the moon, or render the earth shadow myself on top of a static image of the full moon.

Since I wanted realistic animations when you go back and forth in time to find the position and phase of the moon at a specific date, the first method would require at least 59 frames (that's one picture of the moon taken every 12 hours for a whole month/moon cycle). The result is as realistic as it gets, of course, but it has three major drawbacks: first the full animation uses about 1,45 MB, second, time resolution is limited to 12 hours and, finally, the only way for the user to customize the module would be with another animation.

Using a single static image of the full moon solves all those problems:

Customizing the module is now a simple question of supplying an alternate image of a full moon - the application will take care of all the rest. It will even determine/use the correct shadow size for the moon inside the alternate bitmap.

Earth shadow position, angle, etc, can now be shown to the minute (yes, the math formulas are THAT accurate) and, of course, you're using a single 116 KB image instead of a full blown 1.45 MB animation.

The first problem I run to when taking this approach was how to make the earth's shadow using GDI+ (the answer is two overlapping alternate-filled arcs). The second problem was that realistic shadows do not have hard edges - they're heavily blurred.

So I had to implement a Gaussian Blur function based on well known algorithms - and was in for a shock once I finally got it running: blurring the shadow was unbearably slow. As slow as 3-4 frames per second - tops.

So I ended up implementing an alternate - but an order of magnitude faster - box blur algorithm. Much better but still too slow.

Ended up solving this problem by only blurring the alpha channel (that's all you need really) and creating a shadow bitmap that is 2.5 times smaller than the target moon bitmap (this of course makes the shadow even blurrier when you enlarge it to the final size, which, in this case, is actually a good thing).

As all other modules, the Moon Phase module has two styles the user can choose from: the simple one on the left, and the realistic one on the right.

You can't see it from the static image above, but in the Modules tab the icons animate by moving the time 4 hours forward with each frame - this way you can see the earth shadow go round the moon.

Unlike the simple moon style, the realistic moon becomes smaller and larger as the moon gets closer to and further away from the earth. It also 'wobbles', just like the real moon. And finally, it is tilted according to where you are on earth (remember, people in the southern hemisphere see the moon upside down to us, but this is not an abrupt change, the tilt of the moon changes gradually as you get closer to the earth's poles - i.e.; it depends on the user's current latitude coordinate).

To calculate the tilt we need to know the latitude and longitude coordinates of where the user is (calculating the altitude and azimuth of the moon at a specific time also requires these coordinates). Luckily, the service used for the Weather module's GeoIP location (originally intended to automatically select a city and country for the weather module based on the user's IP address when the application runs for the first time) also gives us this information.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Thu Dec 29, 2016 11:32 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
4. Added a toggle z-order option (Always On Top or Normal Z-Order) to the right click context menu of running applications.

Allows you to quickly set a window to Always on Top (and vice-versa) if the window itself does not offer that option.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Fri Dec 30, 2016 4:00 pm 
Offline

Joined: Thu Apr 07, 2005 2:25 pm
Posts: 331
Nice. How hard would it be to implement the Moon Phase into the Weather Module?


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Fri Dec 30, 2016 11:52 pm 
Offline

Joined: Sat Jun 30, 2007 5:00 pm
Posts: 144
Location: Far East
Jorge, please keep multi-monitor reserved space and individual taskbars on the list.

_________________
Cheers!

Chuck


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 5:43 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Gregory2001 wrote:
Nice. How hard would it be to implement the Moon Phase into the Weather Module?


Hmmm... I understand where you are coming from, but I'm not sure about that being a good idea for a variety of reasons.

But I'm thinking in terms of replacing icons... and perhaps that is not what you mean, but rather a 'merge' of the two desktop modules.

Chuck wrote:


Multi-monitor reserved space is quick and easy to implement... individual taskbars, however, are really going to be a lot of work. Not the kind of thing I want to get into right now with v16.12 needing a maintenance release ASAP.

Anyway, getting back on track: still very much work in progress (not even sure yet if I should move the OK button to inside the image or leave it as it is), but I think it's looking good:

Image

Image

Image

Last one is with an alternate moon image. Out of curiosity, which of the two do you guys like best?

I tried several different full moon images and they all look great because, as I said, the size of the shadow automatically adapts to the size of the moon.

Anyway, clicking on the calendar animates the moon into the new position for that day. Static images don't do this animation justice, of course.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 6:14 am 
Offline

Joined: Sat Jun 30, 2007 5:00 pm
Posts: 144
Location: Far East
Just keeping the multi-monitor support on your radar! :)

Looks like the alternate moon image has some sort of shadow band in the image itself going right down the middle. Even without that, I think the first actual moon image is better.

That said, you *could* let the user decide in module options... 8)

_________________
Cheers!

Chuck


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 6:33 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Chuck wrote:
Just keeping the multi-monitor support on your radar! :)


Keep it up then. Just don't want you to get disappointed. :)

Chuck wrote:
Looks like the alternate moon image has some sort of shadow band in the image itself going right down the middle. Even without that, I think the first actual moon image is better.


Yes, there is a graphics glitch with GDI+ that I'm still trying to solve when using anti-aliasing to draw the two filled arcs that make up the earth shadow. Apparently this only happens under certain image sizes - the alpha gets 'glitched' where the two arcs join. Using the first moon image, for instance, it never happens.

GDI+ is weird! :)

Chuck wrote:
That said, you *could* let the user decide in module options... 8)


Oh that's the beauty of it, they can already via the 'Change Icon' mechanism available for all the modules. That's how I did it there too. :)

All you need to do is get a hold of *any* PNG image displaying a full moon. The actual size of the moon in relation to the bitmap's size doesn't even matter, because of the adaptive shadows.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 11:41 am 
Offline

Joined: Sat Jun 30, 2007 5:00 pm
Posts: 144
Location: Far East
winstep wrote:
Keep it up then. Just don't want you to get disappointed. :)

For the record, I'm way more interested in the space reservation than the separate taskbars. 8)

As for the rest, I'm really impressed with what you have done with the modules. Great work!

_________________
Cheers!

Chuck


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 6:11 pm 
Offline
User avatar

Joined: Fri Mar 19, 2004 1:25 am
Posts: 228
Wow Jorge, all that work for a Moon phase :-) Amazing and appreciated. Personally, I like the second moon pic, the alternate. This will be a nice addition for sure. Thanks.


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Dec 31, 2016 10:09 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
You guys will be able to provide your own preferred moon pics if you want. :)

I optimized the blur code even further, which allowed me to make even softer shadows (the softer/more blurred the shadows are, the more realistic they look, but the more processing power is used by the blur function).

Softer shadows look amazing, but also mean the initial phase changes after the full and new moons are not so clearly visible. In part because of this, and also because harder shadows go a lot easier on slower systems, I decided to add a user setting to configure how hard or soft the shadows are.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Tue Jan 03, 2017 10:11 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Image

I have to admit that I've been having fun doing this, it's coming together really nicely.

You obviously can't see it because it's a static image, but the star field is permanently moving behind the moon, calendar, panel and buttons.

When you click on the Play button, the moon animates as time accelerates at a rate of 3 hours per frame. The scrolling of the star field becomes faster too.

When you click on the Info button, any playing animation stops and I use the new Gaussian blur function to blur the background behind the panel, so the information in the panel is readable. The star field behind the panel keeps scrolling, however. :)

I also just started adding moon zodiac information. I intend to add a new 'zodiac' button to the row of buttons at the bottom: clicking it will toggle the calendar between displaying moon phases to moon zodiac signs, for those who are into it.

The continuously scrolling of the background is surprisingly very light on resources (to accomplish this I use several image planes which are then composed into a single image for rendering on the screen) and uses barely any CPU. However, the moon animation is pretty heavy because of the need to continuously blur the earth shadow - to prevent the CPU from being overwhelmed on slower systems, an adequate refresh rate is permanently being computed.

Something else I've been meaning to talk about: remember that idea for background silent updates, like Google Chrome does? I'm not sure yet if I'll ever implement something like that, but there is a middle ground:

I use FileZilla as an FTP client, and one of the things I like about it is what happens when there is a new update: you get the prompt, click OK, you see a progress bar as the update installs itself and the application restarts without the need to press anything else. Truly a one click update.

In contrast, with Winstep you have to go through a UAC prompt and then a couple more setup screens. I suppose I could enable Innosetup's 'silent mode' so setup just does its thing without any prompts to the user (unless there is an error). In this case all you would see would be the UAC prompt.

What do you guys think?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Wed Jan 04, 2017 12:08 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Ah, and just so you see the difference: super optimizing the gaussian blur function allowed me to use a heavier blur than before (the heavier the blur, the more processing power is required).

First image was before, second image is now:

Image

Image

See how much more natural/realistic the shadows are, even in the smaller moons in the calendar? And the first image already has some shadow blur, with no blur at all (i.e.; hard shadow) it just looks like the moon is made of two separate halves glued together. :)

You can also see what the problem of scattering the light/shadow is: the phases are not so well defined (even though that is what it looks like in real life). I had to use an image of the moon on the 18th of December vs 17th of December to better compare shadows now and then.

As I said above, I will let the user decide how much blur to use for the shadows. Less blur means less realistic but more defined shadows and faster to render.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Fri Jan 06, 2017 12:47 am 
Offline

Joined: Tue Mar 22, 2016 9:40 pm
Posts: 28
I love all your hard work, and appreciate it. For me personally, Winstep extreme has always been software that I actually enjoy buying. I love tinkering and the options are endless with Winstep extreme. Love your dedication! :D


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sat Jan 07, 2017 2:53 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Thanks, Douglas! Always nice to hear something positive. :)

I still can't believe I spent over a whole week working on a single panel, but that's what happened with the Moon Phase calendar. Thank God I finally finished it or I would be throwing up moons (and food!) all over the place pretty soon now! :P

I added animated icon support to the Moon module, so now you can provide your own moon animations (or image sequences) if you want. I'll probably upload the NASA moon animation I have to the Theme's page of the Winstep web site after this version is released.

I also added the zodiac part to the moon calendar (e.g.; moon is in Pisces), but I didn't want to mix astronomy with astrology so I kind of kept them separate. :) If you click the Zodiac button, the moons literally rotate to show the moon's zodiac signs for those days. Click it again and the signs rotate back to moons.

Image

Clicking the clock button opens a time selector that you can use to know more information about the moon at a specific time.

Clicking the little moons at the bottom right corner of the information panel (which list the major moon events around the currently selected date) will take you to that date on the moon calendar.

Hovering over a moon in the calendar pops up a balloon tooltip with some moon information for that day.

... and I think that basically wraps it up as far as the moon module is concerned! Still need to do the configuration panel though. :)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v16.12?
PostPosted: Sun Jan 08, 2017 6:31 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 8324
Ok, now that the Moon Phase module is finally out of the way, here are some of the things I still want to add or change for this release:

1. Add the pop up calendar to Nexus Ultimate.

Even though the full blown pop up calendar in Winstep Xtreme is a Desktop module and Nexus Ultimate does not support desktop modules, I always felt uncomfortable about leaving it out of Nexus Ultimate in v16.12. The iconic calendar is just incomplete without it.

The reason I didn't include it in Nexus Ultimate v16.12 was purely technical: the code library required by the pop up calendar has to do only with Desktop modules, so that code is simply not there in Nexus Ultimate.

My idea is to make a sub-set of that bigger library with only the functions required by the pop up version of the calendar module to display and include that with Nexus Ultimate.

2. Play MP3 files via an independent executable.

I've never had any problems here, but, even though it is in no way a widespread issue (the vast majority of users are not having problems either), it does seem to me that complaints about WorkShelf crashing increased with v16.12.

Crashes appear to be random and, at least in the case of one user, indirectly involve WsxMMTimer.DLL being unloaded (which should never happen). That is the Winstep DLL hosting the High Resolution Multimedia Timer used for controlling the timing of animations, etc...

Multimedia Timers are used when you need to do something that requires precision timing (1-10 ms). As the name suggests, they are often used by Multimedia applications.

In v16.12 the low quality .wav based voice files used in previous versions were replaced by high-quality MP3 files. So here is what I think *might* be happening:

There are lots of different video and audio formats out there (this has nothing to do with file extension, the same MP3 file can be encoded in a ton of different formats).

Each different format requires something called a 'codec', a small program/DLL used to compress and decompress data in a specific format (if you're interested you can read more about codecs HERE). There are hundreds of audio and video codecs/formats in use today, but Windows only *natively* supports a handful of those formats.

So what usually happens? Most users (I was no exception) download free codec packs from the net, such as the K-Lite Codec Pack, X Codec Pack, etc... These packs include a bunch of different codecs, filters, plug-ins, etc - normally gathered from different sources and put together in the same collection.

Because of this, there is no telling which of those codecs are buggy or have problems. Codec Packs are a mash of stuff, at different stages of development, coming from all over the place.

Now, when an application plays a media file (such as an MP3 file), the required codec/DLL is used to decode that file into a stream of uncompressed data the OS can actually play. The problem is that this codec DLL runs not inside the OS but inside the process space of the application playing the media file.

If the codec is buggy and crashes, corrupts memory, or does something else that it should not do, the results will be felt in the host application. And if the problem is subtle, like some kind of random memory corruption, they might not even be felt immediately or result in a immediate crash.

This is what makes it so difficult to connect the dots in order to figure out the true culprit. The application WILL crash - but only some time later, when the user doesn't even remember that an MP3 file was played 10 minutes ago - so he does not make the connection.

I'm going to try to solve this problem (if it is indeed the problem) by preventing Nexus/WorkShelf from playing the file directly. Instead a small sacrificial applet (executable) will be launched to do the actual playing. The applet will act as a proxy between the main application and the audio codec - if the codec crashes or does something nasty, it will be in the process space of this proxy applet and the main application will not (should not?) be affected.

Of course, pulling this off is not as easy as it may sound (pardon the pun). It requires precise communication between the applet and the main application, so the main application knows when an MP3 file has stopped playing, can tell the applet to lower or increase the volume of the file it is currently playing, etc...

So, it's going to be a lot of work to solve something I am not even sure that *it is* the problem. :)

3. Iconic thumbnails

On v16.2 I used another method to get the windows thumbnails used as icons for running applications. The new method is both faster and safer (the old method could cause visual glitches on sensitive applications, which is why you have an exception list in the program) and also managed to get a thumbnail in a few cases the old method could not, but unfortunately also seems to have a few drawbacks of its own which sometimes result in black thumbnails or thumbnail size visual glitches when windows are restored.

I'm probably going back to the old method and use the new method as a backup.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 137 posts ] Go to page 1, 2, 3, 4, 5 ... 10  Next
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: