Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jun 20, 2013 12:12 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: BUG: fps whited out
PostPosted: Sun Jan 16, 2011 4:04 am 
Offline

Joined: Mon Oct 18, 2010 3:46 pm
Posts: 54
In the top left corner the FPS is showing white blocks, they move around a bit, like something is happening, but no actualy numbers are shown. I think it's because I'm using Graphics.drawString(java.lang.String str, float x, float y).

Er, just to clarify, it shows in some of my BasicGameStates, but not in the ones I'm using drawString


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2011 7:50 pm 
Offline
Oldbie
User avatar

Joined: Fri Jul 20, 2007 9:25 am
Posts: 410
Location: Croatia
Yeah that happens to me also in loading state, but Kev can't go on to just "it happens", we need to find the cause or better runnable an example.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2011 12:26 am 
Offline

Joined: Mon Oct 18, 2010 3:46 pm
Posts: 54
Well, I don't know if it seems to be tied to DrawString specifically, but it seems to be when i've got DrawString tied to a variable location.

Like, I've got it mouseMoved checking to see if the mouse x and y are within a certain area, and I'm drawing a string at the cursor location if the cursor is within that area.

temp is an image on the screen.
Code:
if ((temp.getX() < newx && newx < (temp.getX() + temp.getWidth())) && (temp.getY() < newy && newy < (temp.getY() + temp.getHeight())){
            this.mousePosX = newx;
            this.mousePosY = newy;
}


And in render I'm drawing a string at mousePosX, mousePosY. When the cursor is off the image the fps is fine. when the cursor is over the image, the fps gets white-blocked out. If I notice anything more, or can narrow it down, I'll write back


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2011 12:26 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Is the screen just not being cleared between updates?

Is the font for the FPS not loaded without deferred mode on?

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2011 5:45 pm 
Offline
Oldbie
User avatar

Joined: Fri Jul 20, 2007 9:25 am
Posts: 410
Location: Croatia
yes, my case is in deferred loading, so that's right, font must not be loaded.. although it's fine during the actual loading process, but when all resources load then it gets corrupt... nothing important for the game right now so it's on hold


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group