XNA Creators Club Online
Page 1 of 1 (15 items)
Sort Posts: Previous Next

Trial Mode Help

Last post 11/20/2009 7:44 AM by cmpunk771. 14 replies.
  • 11/16/2009 8:58 PM

    Trial Mode Help

    Hi guys!

    I was wondering for my trial mode if i can limit it for a curtain time limit like 2 mins? 

    Or as i am doing a racing game limit to 2 tracks? 

    Which is better? 

    Thanks 
    George

  • 11/16/2009 9:11 PM In reply to

    Re: Trial Mode Help

    You have no control over the time limit, so go with the second option.
  • 11/16/2009 9:17 PM In reply to

    Re: Trial Mode Help

    David Hunt:
    You have no control over the time limit built-in time limit and it's going to tick off players if you give them less time than the built-in time limit, so go with the second option.

    Fixed that for you. ;)
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 11/16/2009 9:31 PM In reply to

    Re: Trial Mode Help

    Random fact: when XBLCG launched last year, there was a huge outcry from gamers because there was only a 4-minute trial. MS decided to raise it to 8 minutes because of that.
    cmpunk771:
    Or as i am doing a racing game limit to 2 tracks? 

    Sounds like the best option to me. As Jim said, limiting the trial mode with a shorter time is a very good way to anger your customers. ;)
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 11/16/2009 9:41 PM In reply to

    Re: Trial Mode Help

    Is there a way to make the trial mode more suited to the type of game? For instance, in a racing game, you could make the races only last a minute and a half, but you could play as much as you wanted (much like Geometry Wars). In an FPS, maybe you would allow them to play the first level of campaign mode, but no multiplayer.
    Freefall Game Engine - In Development
  • 11/16/2009 9:50 PM In reply to

    Re: Trial Mode Help

    Ok i am going to limit it to 2 tracks unlimitied time on those tracks.

    I am using the game state management for my game so i am not sure how to do it.  

    This is my menu screen so i am thinking to check if the value of TrialMode then if ture dont load but how would i put that in this code  

     
            // LOAD TRACK ONE
           
            
            void trackOneSelected(object sender, PlayerIndexEventArgs e)
            {
                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackOne());
            }
            
            
            // LOAD TRACK TWO
            void trackTwoSelected(object sender, PlayerIndexEventArgs e)
            {
                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackTwo());
            }

           //Load track three 
            void trackThreeSelected(object sender, PlayerIndexEventArgs e)
            {
                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackThree());
            }
            
            //LOAD TRACK FOUR 
            void trackFourSelected(object sender, PlayerIndexEventArgs e)
            {
                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackFour());
            }
          
            
            //LOAD TRACK FIVE 
            void trackFiveSelected(object sender, PlayerIndexEventArgs e)
            {
                LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackFive());
            } 

          Thanks Guys! 
          
  • 11/16/2009 10:31 PM In reply to

    Re: Trial Mode Help

    Very easily. Just check if you're in the trial mode before loading the new tracks, and if you aren't, prompt the user to buy:
    //Load track three  
    void trackThreeSelected(object sender, PlayerIndexEventArgs e) 
        if(!Guide.IsTrialMode) 
            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackThree()); 
        else 
        { 
            //prompt player to buy 
            MessageBoxScreen m = new MessageBoxScreen("Track 3 isn't available in the trial! \nPurchase the full version <insert reasons why gamers should part with their points>"+"\n\nA button = Buy Now!\nB button = cancle"false); 
            m.Accepted += delegate 
            { 
                //be sure to add Nick's "how to test if a player can buy your game" PlayerIndex extension. 
                if(e.ControllingPlayer.CanBuyGame() && !Guide.IsVisible) 
                    Guide.ShowMarketplace(); 
                else 
                { 
                    MessageBoxScreen m2 = new MessageBoxScreen("Please sign in with a profile that can purchase stuff!\nA button = continue"false); 
                    screenManager.AddScreen(m2); 
                } 
            }; 
            screenManager.AddScreen(m); 
        } 

    That was all typed from memory so it may not work 100%, but it should point you in the right direction.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 11/17/2009 12:02 AM In reply to

    Re: Trial Mode Help

    This is a bit off topic, but do you really need to use separate classes for each track? I would not recommend doing that unless absolutely necessary (and it usually isn't - the difference is usually data that can be loaded into a generic class).
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 11/17/2009 1:02 AM In reply to

    Re: Trial Mode Help

    Jim Perry:
    David Hunt:
    You have no control over the time limit built-in time limit and it's going to tick off players if you give them less time than the built-in time limit, so go with the second option.

    Fixed that for you. ;)
    Thanks. That's actually what I meant to say anyway. ;-)
  • 11/17/2009 8:58 PM In reply to

    Re: Trial Mode Help

    Thanks Gamer! That code was great. I have this as my code and now the track wont load when i click on it, am i doing anything wrong?

     //Load track three  
            void trackThreeSelected(object sender, PlayerIndexEventArgs e)
            {
                if (!Guide.IsTrialMode)
                    LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new TrackThree());
                else
                {
                    //prompt player to buy 
                    MessageBoxScreen m = new MessageBoxScreen("Track 3 isn't available in the trial! \nPurchase the full version to get 3 extra tarcks for onely 80MSP!" + "\n\nA button = Buy Now!\nB button = cancle", false);
                    m.Accepted += delegate
                    {
                        ScreenManager.AddScreen(m, PlayerIndex.One);
                       
                    };
                } 
            } 
  • 11/17/2009 9:41 PM In reply to

    Re: Trial Mode Help

    Maybe try putting a breakpoint on the LoadingScreen.Load line and see if it hits it?
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 11/17/2009 10:09 PM In reply to

    Re: Trial Mode Help

    In addition to what Jim said there are a few other problems I see with this code:

    1) typos: "Track 3 isn't available in the trial! \nPurchase the full version to get 3 extra tarcks for onely 80MSP!" + "\n\nA button = Buy Now!\nB button = cancle", false);". Spell checking text that goes in a game is always a good idea! ;)
    2) The message box screen will never be shown since you're only adding it to the screenmanager if it gets accepted. The player can't accept something that's not there! Move the AddScreen line outside of the next curly brace, and instead put your code that brings you to an upsell screen inside that delegate.
    3) Is it possible you have SimulateTrialMode enabled? Put a breakpoint on the first curly brace in the method to see the contents of Guide.IsTrialMode and see the flow of your program's execution.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 11/18/2009 11:08 PM In reply to

    Re: Trial Mode Help

    Got 1 last error i cant fix

    'GameStateManagement.PlayerIndexEventArgs' does not contain a definition for 'ControllingPlayer' and no extension method 'ControllingPlayer' accepting a first argument of type 'GameStateManagement.PlayerIndexEventArgs' could be found (are you missing a using directive or an assembly reference?)

    if (e.ControllingPlayer.CanBuyGame() && !Guide.IsVisible)  


    Here is the full code if you need 

    http://pastebin.com/m6e650ba0
  • 11/18/2009 11:20 PM In reply to

    Re: Trial Mode Help

    Hmm... Are you using GameStateManagement instead of NetworkStateManagement? If so this will be a bit trickier since GSM doesn't have anything built in to handle controlling players. You'll need to add a press start screen and a static class to hold the controlling player's playerindex - I don't have time to write any pseudocode atm but if you search the forums you should be able to find some.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 11/20/2009 7:44 AM In reply to

    Re: Trial Mode Help

    Ok i have 2 more questions

    1) will the Buy Screen Load up yet or will that not work till the game is up? 
    2) I get this error when running the game and clciking on "Buy Now" then that should load up the Marketplace but i get this error 

    An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll

    Additional information: The Gamer Services functionality must be initialized before you call this method. The easiest way to do that is to add a GamerServicesComponent to the Game.Components collection in the constructor of your Game class.
     

    For this line  Guide.ShowMarketplace(PlayerIndex.One);
Page 1 of 1 (15 items) Previous Next