Old 05-25-2009, 05:59 PM   #1 (permalink)
Support Team
zB Programmer
Zune Guardian
 
Lucifer's Avatar
 
Join Date: Feb 2008
Posts: 724
Lucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to behold
Default method for drawing XNA games Landscape.

I have done some XNA work on the zune in my past, but I started a new project which is my first ever to use the zune in landscape (wide) mode. In XNA / C# there's no official way to make the zune draw that way as just a switch. So I searched zB and the web for examples and ideas, and originally I only got lost. I eventually found a thread in the official XNA site, and it looks far clearer than any other information anywhere else I found. So, after all that, I've decided to share what I found.

Here's the link: Zune In Landscape Mode? - XNA Community Forums
enjoy!
(instructions are in //'s)
__________________
Thanks Matt for Sig & Av
Portable Zune software Thread




Lucifer is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 05-26-2009, 07:12 AM   #2 (permalink)
Zuner
 
Join Date: Nov 2008
Posts: 56
gbabey will become famous soon enough
Send a message via ICQ to gbabey Send a message via AIM to gbabey
Default

Instead of drawing everything to a rendertarget you could save a bit of memory by rotating the sprites ahead of time as Shawn Hargreaves explains here: Shawn Hargreaves Blog : Zune landscape mode

Either way will work fine, the RenderTarget method is a bit easier imo, but if you need to squeeze every ounce of performance out using the above method will make your deploys to the zune a bit slower, but it run a bit faster once there.





gbabey is offline   Reply With Quote
Old 05-26-2009, 10:47 AM   #3 (permalink)
zB Programmer
Member
 
DiNoGames's Avatar
 
Join Date: May 2008
Location: Bremen, germany
Posts: 578
DiNoGames is a name known to allDiNoGames is a name known to allDiNoGames is a name known to allDiNoGames is a name known to all
Send a message via Skype™ to DiNoGames
Default

I prefer Rendertargets, because I can flip them for lefthanded people without the need to take my hands on any game calculations. If I rotate my sprites I also need to flip all movements in my code when I want left handed support.
__________________

Valgard's Fate Blog







DiNoGames is offline   Reply With Quote
Old 05-30-2009, 10:41 AM   #4 (permalink)
Member
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Location: Puyallup, Washington State
Posts: 525
BroiledVictory will become famous soon enough
Send a message via Skype™ to BroiledVictory
Awards Showcase
Biggest Shouter 
Total Awards: 1
Default

I was thinking about doing something to make paper glider left & right handed people accessible! Thanks!
__________________
Formally SmileDog.
Note: I prefer to have conversations over Skype, not over PM.
You will be bottom priority if I happen to be talking to a friend/relative.

thx Jorvette!




BroiledVictory is online now   Reply With Quote
Old 06-28-2009, 03:47 PM   #5 (permalink)
Squirt
 
Join Date: May 2009
Posts: 19
Extron is on a distinguished road
Default

That is a really useful code, before, I had just been designing the game sideways, so that even though all of the math used the portrait mode, the sprites were all made sideways so that there is no need to rotate them manually ingame. However, this method has become frustrating in its inflexibility. Generally, when I design a game, I usually create a renderTarget anyway so that I don't have to worry about displaying every sprite or moving them all individually when I just need to move the entire renderTarget.




Extron is offline   Reply With Quote
Reply

Bookmarks

Thread Tools