Adding a splashscreen with the GSM

Last post 04-17-2008, 9:54 AM by cdxrd. 2 replies.
Sort Posts: Previous Next
  •  04-17-2008, 2:31 AM

    Adding a splashscreen with the GSM

    I know its because im probably just overtired, but Ive been trying to add a new screen to the game state management, pause it for 3 seconds, then continue to load the background and main menu. My first thought was to create the screen (done) then add it to game.cs here

                // Activate the first screens.
                screenManager.AddScreen(new CdxLogoScreen());
                screenManager.AddScreen(new BackgroundScreen());
                screenManager.AddScreen(new MainMenuScreen(this));

    problem is, it instantly just pops the backgroundscreen on and mainmenuscreen on.. hence the splash doesnt show. Where would I add that in? the gsm is complex (to me) and im still learning and playing with it..

    Development site: CDX Games
    Release site: Work In Progress
  •  04-17-2008, 8:02 AM

    Re: Adding a splashscreen with the GSM

    The ScreenManager shows the screens in the order you add them with screens that are added later showing 'over' screens before.

    So, the background screen shows 'over' your title screen, and the main menu on top of that.

    To get the title screen to show first, add your 'Title Screen' after the Main Menu - it will then be displayed first.

    Here is my start sequence.

    screenManager.AddScreen(new BackgroundScreen());
    screenManager.AddScreen(new MainMenuScreen());

    screenManager.AddScreen(new VideoScreen("Video/Intro.wmv"));
    screenManager.AddScreen(new TitleScreen("wrath-logo"));
    screenManager.AddScreen(new TitleScreen("publisher-logo"));

    In this way, the publisher logo is shown first, then when it transitions off the company logo and when that transitions off, a video, followed by the main menu.

     


    --
    Ruina et Stragos
    XNA SA
    --
  •  04-17-2008, 9:54 AM

    Re: Adding a splashscreen with the GSM

    Doh.. makes perfect sense... especially with the transition times and all.. I guess i was just more tired than I thought last night.. =) Thanks DrDeth!

    Development site: CDX Games
    Release site: Work In Progress
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback