George Clingerman

      XNADevelopment.com
posts - 151, comments - 426, trackbacks - 181

My Links

News



Tag Cloud

Article Categories

Archives

Post Categories

. XNADevelopment.com .

XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

Controller Sample Every game needs a screen to define what button does what in the game. It helps for those moments when the player is scratching their head going, now what button did what again?! So when you're creating your game, you're going to want to take a little time to add that screen into your game. Or if you feel like using my code, you could spend an even smaller amount of time!

 

Controller Sample Recognizing that I was going to be making this screen often for all of my sample games I release for my site (I'm working hard at trying to get them to follow the Best Practices release by Microsoft for XBLCG). I took some time out and wrote this dynamic "How To Play" screen code. Simply define text for any of the controller buttons and this screen will display that with a line to the appropriate button.

 

Controller Sample Check out the sample, "What Button was that?" and use it in your games. Play with it, enhance it and let me know what you think!

 Also, before you get going, you should think about what controller buttons you're planning on using and what you're planning on having them do. Then take a trip over to MVP Jon Wattes's site to read up on the expected button actions and try to make sure your games controls are staying consistent with what players expect.

 

 

 


 

Technorati Tags:

Print | posted on Monday, November 10, 2008 4:50 PM | Filed Under [ XNA Development XNA ]

Feedback

Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

Excellent as usual! Thanks!
11/11/2008 10:51 AM | cdxrd
Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

Very nice George. This is great.
11/11/2008 3:33 PM | Chris Williams
Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

You forgot the shoulders it looks like
11/12/2008 4:59 AM | Jim Perry
Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

Never mind, should have looked at it first. :(
11/12/2008 5:00 AM | Jim Perry
Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

Nice. You probably want to make the font bigger, though, because that text would be really hard to read on a 480i display with letterboxing.
Also, why take a Viewport at all? You can get it from the GraphicsDevice you're rendering to, and if the back buffer is not 1280x720, pretending that it is usually just causes trouble.
12/17/2008 8:17 PM | Jon
Gravatar

# re: XNADevelopment.com - Need a little polish for your XBLCG? Ever wonder what button was that?

@Jon

The font is the minimum suggested for XBLCG by Microsoft best practices. It's adjustable by whoever uses it. When I use this sample in my projects, I typically use a 20 pixel setting.

The viewport paramete is there because I don't make just windows and 360 games. I may be drawing a large backbuffer and then scaling it down for display on a Zune.

Good suggestions, but things I've already considered and things I want to change with my sample, but you're free to do so if you're using it :)
12/18/2008 11:05 AM | George W. Clingerman

Post Comment

Title  
Name  
Email
Url
Comment   

Powered by: