Welcome, Guest

Author Topic: What should happen when Universe Sandbox loses focus?  (Read 6478 times)

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
What should happen when Universe Sandbox loses focus?
« on: January 05, 2011, 12:45:37 PM »
Currently when Universe Sandbox loses focus the screen fades and it only updates the image every .7 seconds.

I'm thinking about removing the fade and dramatic frame drop when you switch to another window. I know that a few people have been confused by this and it makes it impossible to casually run a simulation that you want to casually watch while working in another window.

What should happen when Universe Sandbox loses focus?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: What should happen when Universe Sandbox loses focus?
« Reply #1 on: January 05, 2011, 04:06:35 PM »
In the options menu, be able to set the time when it fades, and frame rate after it fades, or disable both. Everyone's happy.  :)

Chaotic Cow

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 588
  • President of Bovine Relations
    • Facebook
Re: What should happen when Universe Sandbox loses focus?
« Reply #2 on: January 05, 2011, 04:13:18 PM »
In the options menu, be able to set the time when it fades, and frame rate after it fades, or disable both. Everyone's happy.  :)

Bingo.

People love options.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: What should happen when Universe Sandbox loses focus?
« Reply #3 on: January 05, 2011, 04:16:29 PM »
There's arguably already too many options in Universe Sandbox. :)

I like what this article says:
http://gettingreal.37signals.com/ch06_Avoid_Preferences.php

Be sure to read the note at the bottom: "Preferences Have a Cost"

----

It's only going to work one way... So how would you like it to work?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: What should happen when Universe Sandbox loses focus?
« Reply #4 on: January 05, 2011, 05:10:03 PM »
I moved a few posts that were commenting removing features to 'Everything Else' as they weren't contributing to this conversation in a productive way.

Please remember that other users are browsing this forum and it's important to me that this section (Universe Sandbox 2 Discussion) is helpful to everyone.



While I like the approach of avoiding preferences I'm not talking about removing planets, moons, simulations, or any of the major features. My goal is to create the easiest and most fun to use astronomy software and carefully considering every feature and option that's added (and reconsidering and refactoring existing features) is important in achieving that goal.

Also consider that I read that book over a year ago, so no need to worry about some dramatic paradigm shift to Universe Sandbox 2 updates. I provided the link to provide a new perspective and rebuttal to the reply: just make it a preference.

Constructive criticism, commentary, and thoughts are always welcome.
« Last Edit: January 05, 2011, 05:14:34 PM by Dan Dixon »

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: What should happen when Universe Sandbox loses focus?
« Reply #5 on: January 05, 2011, 05:12:06 PM »
Sorry. I overreacted.

What is the difference between a preference and an option?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: What should happen when Universe Sandbox loses focus?
« Reply #6 on: January 05, 2011, 05:16:27 PM »
Thanks Darvince. No worries.

I'm using the words 'option' and 'preference' interchangeably. For the purposes of this discussion they are one in the same.

And perhaps my comment came across as harsh:
"It's only going to work one way... So how would you like it to work?"

If there's a good reason to add some options for how Universe Sandbox handles focus then I'll add them, but at the moment I struggle to come up with any (note that currently it only works one way so I'm not removing any options; I'm just aiming to make something that already works even better).

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: What should happen when Universe Sandbox loses focus?
« Reply #7 on: January 05, 2011, 05:25:29 PM »
A checkbox (like 20 fps or 0.6 fps) if its an option, otherwise, quicken it to 5 frames per second while in another window.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: What should happen when Universe Sandbox loses focus?
« Reply #8 on: January 10, 2011, 01:20:01 PM »
Any thoughts or comments on what the latest version (2.0.14) does when it loses focus?

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: What should happen when Universe Sandbox loses focus?
« Reply #9 on: January 27, 2011, 07:48:56 AM »
I think it's better for those who want to run a casual simulation.
Perhaps a setting that makes Universe Sandbox not plot where the planets are so that you can run a non-casual simulation about x10 faster without losing accuracy?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: What should happen when Universe Sandbox loses focus?
« Reply #10 on: January 27, 2011, 11:16:20 AM »
When US loses focus, does it continue to screen the sim (when it takes a video)? Or does it output blank images, or whatever is on top of it?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: What should happen when Universe Sandbox loses focus?
« Reply #11 on: January 27, 2011, 04:19:22 PM »
If you minimize Universe Sandbox it stops drawing the screen, but still draws the screen even if another window is completely covering it (outside of custom code, I'm not sure there's any way of doing this, but I might be wrong).

When Universe Sandbox loses focus it sets its process priority to "Below Normal" and when you switch back, it resumes at "Normal" priority. (These are the same as the process priorities in Task Manager)

Either way... Drawing the screen doesn't take as much time as you might think once you have over 100 objects with mass, there the gravity calculation become what take the longest.

Saturn and its moons (with about 60 objects spends about 1/3 of the time drawing the screen on my machine).

So even without drawing the screen there's no way to get a 10x speed increase. :)
« Last Edit: January 27, 2011, 11:19:18 PM by Dan Dixon »

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: What should happen when Universe Sandbox loses focus?
« Reply #12 on: January 27, 2011, 04:37:12 PM »
Well if you make it NOT draw the screen, you could save alot of time! So by speeding it up, and keeping the calc speed the same (or just making it a bit less accurate) tahdah!