Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
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 1548 times)
0 Members and 1 Guest are viewing this topic.
Offline javapunk

Senior Newbie





« Posted 2003-02-22 12: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 Knight


Medals: 13


falling into the abyss of reality


« Reply #1 - Posted 2003-02-22 13: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! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline javapunk

Senior Newbie





« Reply #2 - Posted 2003-02-22 14: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: 2


pixels! :x


« Reply #3 - Posted 2003-02-22 15: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 Knight


Medals: 13


falling into the abyss of reality


« Reply #4 - Posted 2003-02-22 15: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! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline JuddMan

Senior Duke


Medals: 1


Your Ad Here


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

AHH!

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

Click to Play
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


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

that looks pretty b0rked ._o

弾幕 ☆ @mahonnaiseblog
Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #7 - Posted 2003-02-24 17: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! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
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.

Longarmx (35 views)
2014-10-17 03:59:02

Norakomi (25 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (75 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!