Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
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  
  Weird Event Handling Issue:  (Read 1307 times)
0 Members and 1 Guest are viewing this topic.
Offline javapunk

Senior Newbie





« Posted 2003-02-22 13:14:43 »

Ok... Here goes...
I am working with JavaNoob’s “full-screen windowed frame work” and added a resolution chooser.
So in main I create the chooser and when I get a window closed event I create an instance of my main class (Test).
So when the frame comes up “all” AWT events get buffered. Only after I break my render loop it will process the events.
But if I bypass the chooser and just create (Test) in main. All events work fine.
If you need the code I’ll post it later today.

JavaPunk
Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #1 - Posted 2003-02-22 14:17:12 »

yup, i've noticed that as well.

if you have a main render loop that has no sleep in it,
and you are using BufferStrategy+fullscreen, the Event scheduler never runs :S

even when you reduce the priority of the render down to Thread.MIN_PRIORITY, the problem persists.

Not wanting to point the finger, but I think its another bug in Suns rendering pipeline somewhere :S

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Offline javapunk

Senior Newbie





« Reply #2 - Posted 2003-02-22 15:26:52 »

If anybody wants to look at the code
http://webpages.charter.net/aarhelger/test.zip

Anybody have the source for there own ResChooser I can look at?

JavaPunk
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #3 - Posted 2003-02-22 16:08:40 »

Quote
yup, i've noticed that as well.

if you have a main render loop that has no sleep in it,
and you are using BufferStrategy+fullscreen, the Event scheduler never runs :S
[...]


yea... it eats all performance... and consumes all available cpu power.

dunno... that doesnt make any sense cuz there is nothing to do when everything is drawn/calculated and u r just waiting for the sync signal.

85fps@85hz... or 60fps@60hz... both combinations create 100% cpu payload and that's imo absolutly wrong.

from a gba demo c source:
1  
2  
3  
4  
5  
6  
7  
8  
while( AGBRULEZ )
   {
    GetKeys();
    RenderScreen();
    UpdateColors();
    WaitForVSync();
    Flip();
   }


would be nice if we were able to do such a WaitForVSync (maybe with a optinal minium msec timespan) instead of patching around with quite dirty sleep calls :]

hell. i would kill for a usable timer in java ._.

弾幕 ☆ @mahonnaiseblog
Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #4 - Posted 2003-02-22 16:21:56 »

Quote
If anybody wants to look at the code
http://webpages.charter.net/aarhelger/test.zip

Anybody have the source for there own ResChooser I can look at?


There is always my DisplayModeDialog class Cheesy

you can see it in action in this application...

http://www.pkl.net/~rsc/Balls.jar

and the source code is in this jar :-

http://www.pkl.net/~rsc/downloads/DisplayModeDialog.jar

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #5 - Posted 2003-02-24 06:15:58 »

AHH!

actually, i believe it's a swing bug cause it went away the next time i ran the program...

Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #6 - Posted 2003-02-24 07:06:40 »

that looks pretty b0rked ._o

弾幕 ☆ @mahonnaiseblog
Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #7 - Posted 2003-02-24 18:26:02 »

thats an interesting swing bug Tongue

I've got 1 myself...



its dead ez to replicate, simply waggle (such a technical term, don't you think Tongue) the bitdepth slider, then resize the window.

Now, it might be my code - but I'm not doing anything abnormal - so i'd say its Swing :S

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (32 views)
2013-05-17 21:29:12

alaslipknot (40 views)
2013-05-16 21:24:48

gouessej (70 views)
2013-05-16 00:53:38

gouessej (69 views)
2013-05-16 00:17:58

theagentd (78 views)
2013-05-15 15:01:13

theagentd (73 views)
2013-05-15 15:00:54

StreetDoggy (113 views)
2013-05-14 15:56:26

kutucuk (137 views)
2013-05-12 17:10:36

kutucuk (137 views)
2013-05-12 15:36:09

UnluckyDevil (145 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.202 seconds with 20 queries.