• Advertisement
Sign in to follow this  

screen res and flickering in JAVA

This topic is 3186 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

why can't I change the screen resolution? gs.isDisplayChangeSupported() always returns false. and how come a simple loop of simulate() repaint() causes sync issues? IE variables are changing during drawing from the simulation? I used setIgnoreRepaint(false) but that didn't help. does java automatically make a new thread? how do I wait on drawing? thanks in advance...

Share this post


Link to post
Share on other sites
Advertisement
My game extends JFrame and overrides the paint method. It is using a buffer strategy and the flickering is not while idling; it is while the player is scrolling and the scrolling offsets are changing in between each object being painted. it looks horrendous.

When it goes fullscreen, it just changes Graphics2d to win.getGraphics() and paints the same as it normally would. (in case that is the cause of not being able to set fullscreen, but the jittering happens in windowed too)

Share this post


Link to post
Share on other sites
use lwjgl which is on top of opengl.

swing or awt really isnt built for games.

Share this post


Link to post
Share on other sites
well i don't want people to have to download anything, and my game is simple and tile based

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement