Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7574087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:20:53+00:00 2026-05-30T16:20:53+00:00

I’m doing a gameengine including a physics and graphics engine. Right now my graphics

  • 0

I’m doing a gameengine including a physics and graphics engine. Right now my graphics engine is set to 60 fps, and sometime i notice slow updates on the screen. I have a JFrame which i add a JPanel to which moves around, meaning the graphic engine does frame.repaint() every loop. I’m starting to believe that this repainting on the frame does the small delay on screen.

The delay is such that the JPanel moves in a straight line, and suddenly it can jump a bit further than usual.

Is it better to put a JPanel “gameField” on the JFrame and then add a JPanel “player” to the gameField and repaint the gameField instead? Or is it basically the same thing as repainting the JFrame? I just heard that the JFrame is supposed to be a heavy component.

I’ve tried setting higher fps, which changes nothing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:20:55+00:00Added an answer on May 30, 2026 at 4:20 pm

    Have a look at this page here, it’s a lot of reading but should contain most of what you need.

    EDIT: This page here is a bit more succinct

    This stack overflow post here deal’s with double buffering.

    The best advice i can give you though, is find a copy of ‘Killer game programming in Java’. You can get old ebook versions for free off the net easily. A lot of the stuff is a bit dated, but the first few chapters, which deal with making a game loop and writing to a buffer are still very much relevant and will help you a great deal in the long run!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.