Hello, it's the first time i try to draw font using SlickUtile, i followed the example in the main lwjgl page and then when i tried to apply it in my game the result is quite strange, i can see the text but the frame rate is between 7 and 9 and it also remove all the other graphics after they do a little "eye flash" (i saw the level then it disappear )

First of all, shouldn't delta be a float? Or are you just storing the time in milliseconds as opposed to .003 for example? Second, if you can't figure out why it causes low FPS (longarmx's rationale is correct, I think) you need to really think about what happens when you intialize variables and call methods....

is pretty terrible code naming...text() should not be a method, unless you are referring to texting someone. Instead, should be drawText() or something of the sort. The "draw" object would be better renamed "rednerer" or "drawer". All for code readability ofc.

text() should not be a method, unless you are referring to texting someone. Instead, should be drawText() or something of the sort. The "draw" object would be better renamed "rednerer" or "drawer". All for code readability ofc.

^it still doesn't work even when i don't render the font, doing the initialization only make the whole game black but the frame rate is in it's normal state, and when i do the rendering it's always black and the frame rate go down to 7 FPS yes am initializing it outside of the game loop

thank you

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."

Have you tried to just render the font without any of your other game rendering and logic?

yes it works when i don't do any rendering (still work when the logic is active) and also if render the font before the game rendering it also show the font with normal FPS but always a black background the painting method :

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