Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Drawing text from Graphics Object cause significant lag upon game startup

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am sort of new to Java so excuse me if this question is basic.

The problem is that I have a 2d Top Down game that I am making in which I am trying to draw text with g.drawString("Blah", 10, 10);, and when I put the code in the render method the game Lags on startup.  Sometimes the game works after I click on it for a sec, other times I have to wait for it to load. The screen is completely blank for a few secs then finally renders (sometimes it is blank for a few mins).

Does anybody know based on what I have stated the reason behind the lag and how to fix it?

Thanks, Joel.
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
ScroogeXHTML 9.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/731949/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic