Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Gamasutra: The Art & Business of Making Gamesspacer
Sponsored Feature: Games for Zune with XNA Game Studio 3.0
View All     RSS
August 3, 2020
arrowPress Releases
August 3, 2020
Games Press
View All     RSS







If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

Sponsored Feature: Games for Zune with XNA Game Studio 3.0


May 2, 2008 Article Start Previous Page 2 of 3 Next
 

Input

The support for Zune in XNA Game Studio 3.0 extends to all versions of the Zune device. This includes the original version of the Zune device and the 2.0 version that just shipped this last holiday season.

The input APIs for the device behave like an Xbox 360 Controller with some pieces missing. The 1.0 device control pad works like the D-pad on the Xbox 360 Controller, with the play/pause button mapped to the B button on the controller, and the back button on the device mapped to the BACK button on the controller.

The Zune 2.0 players have a great input device built into them called the Zune Pad, which replaces the control pad on the 1.0 device. The Zune Pad feels like a mouse when you use it.

It makes browsing for music on Zune a snap, even with large amounts of music on the device. The Zune Pad works like an Xbox 360 Controller with the left thumbstick mapped to the Zune Pad touch device. This gives you an analog thumbstick for game play on Zune. You can also “click” the Zune Pad, and the clicks will work as they would with the D-pad on the controller. For example, pressing the center of the Zune Pad (or the v1.0 control pad) works the same as pressing the A button on the Xbox 360 Controller. As you start to play with the Zune Pad and begin to write games for the device, you realize immediately the potential of the Zune for making games.

Graphics

As stated previously, there is no 3D acceleration built into the Zune. However, the complete SpriteBatch API is available as well as some functionality for render targets. You can still use the content pipeline to import textures into your game and then render them as sprites by using the sprite batch functionality. The SpriteBatch API supports alpha blending, additive blending, and no blending. In our tests, alpha blending a thousand or so sprites per frame still ran at close to 30 fps. The refresh rate of the screen is awesome, and there is no ghosting or refresh artifacts visible at very high frame rates.

Since all of the sprite rendering is done using the CPU and software, a lot of filtering you get for free with graphics accelerators just isn’t available on Zune. While you can perform rotation and scaling work on the device, the results may differ slightly from what you are used to seeing on Xbox 360 or Windows. It is often best to scale the art offline in an art tool, or you could use a custom processor in the content pipeline to match Zune’s resolution instead of counting on the scaling functionality at run time to generate the kinds of results you might get through offline scaling.

On the plus side, you can create alpha edges on the sprites and get free antialiasing of the sprites to any background, which makes the sprites much more seamless. Also, z-ordering is still available, so you can use the sprite system to render the sprites in the right order as long you put in the correct depth information. SpriteBatch sorts them correctly and draws them in the right order regardless of the order of the original draw calls. Again, that being said, the more work you do up front, the easier you make it for the processor, which is pulling double duty as both the rasterization engine and the processor running all your C# code!

When you consider that the Zune device initially was not designed with game play and game development in mind, Zune’s overall performance is indeed a pleasant surprise!


Article Start Previous Page 2 of 3 Next

Related Jobs

Mountaintop Studios
Mountaintop Studios — Los Angeles, California, United States
[08.03.20]

Engine/Systems Engineer (remote)
Mountaintop Studios
Mountaintop Studios — Los Angeles, California, United States
[08.03.20]

Graphics Engineer (remote)
Yacht Club Games
Yacht Club Games — Los Angeles, California, United States
[08.03.20]

Senior 3D Technical Artist
Mountaintop Studios
Mountaintop Studios — Los Angeles, California, United States
[08.03.20]

Network Engineer (remote)





Loading Comments

loader image