Jump to content

  • Log In with Google      Sign In   
  • Create Account


reodor

Member Since 30 Jan 2012
Offline Last Active Mar 02 2014 03:02 PM

Posts I've Made

In Topic: How do I make my game run on its own without pressing a Key?

02 February 2012 - 08:07 AM

The simplest solution is to add whatever code you need to execute after the event switch statement. This will run without any key input.

An alternative is to create a background thread that does the work. This solution requires that you know multi threaded programing

In Topic: How to create a graphical timer in SDL_TTF?

31 January 2012 - 02:05 PM

You need to write the number to a char buffer, then you can render it to a surface.

int time;
char buffer[128];
sprintf(buffer, "%d", time);
surface = TTF_RenderText_Blended(font, buffer, color);

PARTNERS