Coding4Fun
10 .NET Programming Projects for Wiimote, World of Warcraft, YouTube and More

XBOX Locks Up on "You Win"

Latest post Sun, Jul 26 2009 8:29 PM by Brian Peek. 3 replies.
  • Sat, Jul 25 2009 11:03 AM

    XBOX Locks Up on "You Win"

    Thanks for the book - it is a lot of fun!

    I took the easy way out and downloaded the solution from the site. I got everything installed and working on the PC.

    I deployed to the Xbox without any major issues.

    The game works fine - but when I get to the "You Win" screen - the XBOX locks up hard (power off to reset).

    Several questions:

    1. Is there any easy way to reset the XBOX when its locked. Pressing the round button causes a sound - but the screen remains locked. No buttons do anything at all.

    2. Any clue what would cause the game to hang?

    3. Is there a clean way to force the exit where the You Win message is displayed? It would be a quick and dirty - but given what I am trying to do thats no big deal.

    4. Has anybody given thought to allowing multiple waves?

    Thanks for your help. 

  • Sun, Jul 26 2009 3:01 AM In reply to

    • Brian Peek
    • Top 10 Contributor
      Male
    • Joined on Wed, Jul 16 2008
    • Niskayuna, NY
    • Posts 53

    Re: XBOX Locks Up on "You Win"

    You should be able to press Back to exit back to the XNA loader.  To make the game exit at any point, you can call Application.Exit() (I think that's the method) just like the input handler does on the Back button.

     

  • Sun, Jul 26 2009 12:13 PM In reply to

    Re: XBOX Locks Up on "You Win"

     I ended up fixing the problem.

    There are at least 2 issues with the sample code. Not in front of my computer ATM - but just a quick reply.

    1. There is a race condition related to a timed event that updates the "player" sprite. The object gets destroyed - and the result is a null pointer. Had to add lofgic to check for a null object pointer on player. You caught it in one spot but missed another.

    2. The infinite loop - hang problem relates to a module where you are looking for a random enemy sprite to do a shot. The loop that selects a random x and y value - is infinite - if all the enemies are dead. There are more elegant ways - but I decided to simply add a limit of how many random loops I would allow. This cured the Xbox issue.

    3. I also implemented multiple waves. Was not too hard.

    Thanks again for the book and code.

  • Sun, Jul 26 2009 8:29 PM In reply to

    • Brian Peek
    • Top 10 Contributor
      Male
    • Joined on Wed, Jul 16 2008
    • Niskayuna, NY
    • Posts 53

    Re: XBOX Locks Up on "You Win"

    Any chance you could send along the code so I can post the changes?  Thanks!

Page 1 of 1 (4 items) | RSS
Powered by Community Server (Non-Commercial Edition), by Telligent Systems