Jump to content
  • Advertisement
Sign in to follow this  
nickme

SDL: why the texts in my game jumpy?

This topic is 2643 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

[size="5"]hi,
when i refresh the screen while waited for the user input, the text that i draw with tff fonts were jumpy. how do i fix that?
any help will be appreciated.
thanks

Share this post


Link to post
Share on other sites
Advertisement
First, keep the default text size, making it bigger will not make us want to help you more.

Second, describe it better, how is it jumpy ? Screenshot or possibly a video would make us understand better.
Snippets of your implementation maybe.

Share this post


Link to post
Share on other sites
hi,

i am sorry about the large text size. the text in my screen is very small. i enlarged it so i can see it better. sorry about that.

i wrote my first game program in SDL by implementing a first AI program when i was in college. the program is about a 8's puzzle if that is what they called. it is a 3x3 square where the computer moves the tiles around to get to a goal state. it is a first AI program in AI class when i was in college 20 years ago. beside displaying the puzzle, i also display some texts to instruct the player what keys to press to change tile or to find solution.

the puzzle displayed was stable, but the text that i display was flickering. i tried to use SDL_Delay, but it slow down the input i get from the user.

i hope i included all the info for you to help me if not, ask me more questions.

i also attached the source file that i used.

thanks for your reply.

Share this post


Link to post
Share on other sites
The flickering could be caused by not double buffering. Do you draw it directly on the screen or on a separate surface which is than copied onto the viewable screen ?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!