Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

SDL Splash Screens

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 MrChrisnis   Members   

340
Like
0Likes
Like

Posted 01 June 2012 - 05:33 AM

Hi,

I have an SDL game with a splash screen on right now, but for my splash screen I have created a new SDL_Event and a while loop for the splash screen separate to that of the game loop. I was just wondering if there is an easier way of creating the splash screen as right now the game requires two presses of Escape of the X button to quit out (Which I am guessing is because of the loop not properly closing?)

Thanks
Chris

#2 rip-off   Moderators   

10889
Like
0Likes
Like

Posted 01 June 2012 - 07:32 AM

It is hard to say why it is happening without seeing the code, but the core problem is that when you detect such a "exit event", you must not only close the splash screen but you must ensure that the rest of the application isn't started. A simple way would be to return from main(), if your splash screen event loop is in main() (obviously you'll need to run any necessary cleanup code).

If your splash screen is in a function or class, you need a way to return the fact that it was closed, rather than completing.

#3 Goran Milovanovic   Members   

1104
Like
0Likes
Like

Posted 01 June 2012 - 12:20 PM

Do you have a state machine of some sort?

The splash screen can be nothing more than the initial state.

+---------------------------------------------------------------------+

| Game Dev video tutorials  ->   http://www.youtube.com/goranmilovano |
+---------------------------------------------------------------------+




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.