Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Why is java application running smoother when moving mouse over it?  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
Offline tomek

Junior Newbie





« Posted 2013-09-08 02:09:07 »

I'm working with tutorial from this topic - "Fixed timestep" section. After run this code, the ball has kind of lag, but there is still 60 FPS. After I move mouse over application's window and move it in random directions, the ball is moving smoothly. It happens even if window application isn't focused! What's wrong? Can it be fixed?

I'm using Ubuntu 13.04 with Oracle JDK7

I've found that it happens with every application.

Here's video
<a href="http://www.youtube.com/v/J8SBjKncgRw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/J8SBjKncgRw?version=3&amp;hl=en_US&amp;start=</a>
Offline Andre Lopes
« Reply #1 - Posted 2013-09-08 02:41:48 »

I'm working with tutorial from this topic - "Fixed timestep" section. After run this code, the ball has kind of lag, but there is still 60 FPS. After I move mouse over application's window and move it in random directions, the ball is moving smoothly. It happens even if window application isn't focused! What's wrong? Can it be fixed?

I'm using Ubuntu 13.04 with Oracle JDK7

I've found that it happens with every application.

Do you have any example or code? That is fairly wild for me Smiley
Offline Several Kilo-Bytes

Senior Member


Medals: 11



« Reply #2 - Posted 2013-09-08 02:55:27 »

Whether a window has focus does not affect whether it receives mouse move events or not, so it would not change the effect whether your window had focus or not. Are you using the example in the first post? One problem I notice with it is that it uses outdated an interpolation value because repaint does not trigger painting immediately. Interpolation time should be calculated when the screen is painted, not later. I do not know if that is a problem in practice.

What type of "lag" is it?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #3 - Posted 2013-09-08 03:31:24 »

If what you said is true, then it's related to OS not Java. OS has duty to split processing cycling duty for each application. On some HW acceleration enabled program like game, putting them to background will decrease their share. I forget what this is called for.

Offline tomek

Junior Newbie





« Reply #4 - Posted 2013-09-08 13:10:27 »

Do you have any example or code? That is fairly wild for me Smiley

I posted link in first topic

Quote
If what you said is true, then it's related to OS not Java. OS has duty to split processing cycling duty for each application. On some HW acceleration enabled program like game, putting them to background will decrease their share. I forget what this is called for.
I think you can be right, that's why I gave you information about my OS.

I record this video. Now it should be clear
<a href="http://www.youtube.com/v/J8SBjKncgRw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/J8SBjKncgRw?version=3&amp;hl=en_US&amp;start=</a>
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (30 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (43 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!