Nick’s Code

Search

XNA MVP

Contact

Donate

Categories

Latest News

Twitter


follow nickgravelyn at http://twitter.com



RSS Feed

Alien Aggressors: Zune Edition

Posted in XNA, Zune on May 07, 2008 at 9:06am.
There are 40 comments.

This morning the XNA team released their XNA GS 3.0 CTP. Since I’m such the hardcore nut I am, I decided to be the first person to release a Zune-based sample for the CTP. What I did was port Alien Aggressors over to the 3.0 CTP so it works on both Windows and Zune. I got rid of the XACT crap and moved over to the new sound APIs.

The whole thing was pretty painless and playing a game on the Zune is pretty sweet. I’ll admit that the Alien Aggressors port isn’t all that fun because there are so few enemies on screen, but it’s the idea that counts. I do plan to have a write up explaining how to take the end result of the Alien Aggressors tutorial and turn that into the Zune version I have here. Should be done by the end of the week because there really weren’t many changes.

So the code has been commented. The major places to look for changes is the InputHelper class (I had to add my own Keys enum on Zune and do some #if for the input stuff) and the SoundManager class (where I removed all of the XACT stuff and replaced it with the new sound API methods). The Game1 class has some new stuff to handle flipping the screen from portrait to landscape using a render target as well as now defining the font name as a constant so we can use a 20pt version on Windows and a 10pt version on Zune.

Hopefully this gets you all pretty pumped up about Zune programming. I know I’m excited to play around. Anyway, here’s the link for the sample download: Alien Aggressors Zune Edition. Let me know what you think!



By Chris on May 7, 2008 at 2:25 pm

Pretty cool,

now if only I had a zune, o well.

By Soccerfreak24 on May 7, 2008 at 2:42 pm

THANK YOU!! I finally have a zune game to test out. I’m so glad you uploaded it. I saw your game on some video’s and wanted to try it out. Do you know of any others?

By LancerRevolution on May 7, 2008 at 4:21 pm

hey soccerfreak,i think i know you from somewhere….who knows.and thank you!im going to try this for sure

By wetworker on May 7, 2008 at 9:02 pm

Hey thanks, I got it working on my zune 80, sweet!!

I have no clue about C# but this makes me want to learn it, maybe we can do a calibration some time, me graphics you code. keep up the good work

By Zombii Darren on May 7, 2008 at 9:24 pm

I have to agree with Soccerfreak24 and wetworker, this is pretty good for the early stages of Games for Zune.

Keep Going! :)

By jackluo923 on May 7, 2008 at 9:36 pm

I see a lot of zuneboards members here.

The exact game can also be found here. http://focusedgames.com/

By Nick on May 7, 2008 at 9:39 pm

Actually jackluo923, that’s not the same game. They are both Space Invaders clones, but we each made them separately. Mine also plays in landscape mode while John’s plays in portrait. Definitely also check his stuff out as well, but I don’t want people thinking that either of us just copied the other.

By Catalin on May 7, 2008 at 11:10 pm

If I didn’t know any better, I’d say you’re a freak for getting this ported so fast ;)

By Alfred on May 8, 2008 at 7:28 am

dude! I love my Zune even more now. I been waiting for games since I bought it.

By Ian on May 8, 2008 at 4:36 pm

I download it, but whenever I try to locate it on visual, it says that the file has been removed, renamed, or not on the cpu, when i can locate it. i dont know what is wrong.

By Nick on May 8, 2008 at 4:37 pm

@Ian: What file?

By Ian on May 8, 2008 at 5:40 pm

i downloaded the file and then i choose the .sln file and it automatically opens up C#, but then a message comes up saying “the project file has been moved, renamed, or is no0t on your cpu. but i have not done anything to the .sln file. then it says, these projects will be labled as unavailable in Solution explorer. i’ve downloaded everything correctly and XNA 3 recognizes my zune. but the file won’t work.

By Ian on May 8, 2008 at 6:28 pm

never mind, i made a mistake, it works

By christopherborne@yahoo.com on May 9, 2008 at 12:38 am

Fabulous. great game. plays great on my Zune30.

By Shawn on May 9, 2008 at 9:33 am

At the risk of sounding ignorant, is there a difference between a Zune vs. Itouch? Are they pretty much the same thing, except we can now program for the Zune as far as XNA goes? I don’t have either, but I am now thinking of getting something….maybe a Zune since I can program for it, any pros and cons to watch out for in the two?

Thanks, and sorry Nick, I hope this doesn’t spark a big debate on your blog…just seems an appropriate place to ask considering the topic.

Shawn

By Michael Gannotti on May 9, 2008 at 10:42 am

This is sweet. Have running on both my original Zune 30 as well as on Zune 8

By nik on May 10, 2008 at 3:37 pm

i had the same problem as lan and can’t figure out what went wrong…i downloaded the file and then i choose the .sln file and it automatically opens up C#, but then a message comes up saying “the project file has been moved, renamed, or is no0t on your cpu. but i have not done anything to the .sln file. then it says, these projects will be labled as unavailable in Solution explorer. i’ve downloaded everything correctly and XNA 3 recognizes my zune. but the file won’t work.

By Nick on May 10, 2008 at 3:39 pm

Try opening up Visual C# Express 2008 manually (instead of double clicking the .sln file). From there go to File -> Open. Next navigate into the directory and find the .csproj file (should be one level down from the .sln file). See if that works for you.

By nik on May 10, 2008 at 3:54 pm

i am sure it would but when i go to open it i can’t seem to find where it is in my computer

By nik on May 10, 2008 at 4:03 pm

oh found it but no it comes up with multiple errors, mostly saying the same thing like unspecified errors and the project file has been moved, renamed, or is not on your cpu

By Nick on May 10, 2008 at 4:05 pm

Did you do anything besides unzip the file and double click the .sln? Did you move or add any files?

By nik on May 10, 2008 at 4:07 pm

no nothing just clicked the link then tried to open it with C#

By nik on May 10, 2008 at 4:08 pm

clicked the link as in the one on this site then downloaded it then tried to open it with c#

By Nick on May 10, 2008 at 4:08 pm

And you’re sure you have everything set up properly? You installed Visual C# Express 2008 (not 2005) and then install the XNA GS 3.0 CTP? In that order?

By nik on May 10, 2008 at 4:09 pm

yes positive

By Nick on May 10, 2008 at 4:11 pm

Can you copy and paste the error or type it in exactly as it appears? I want to know exactly what files it’s saying are missing or moved.

By nik on May 10, 2008 at 4:16 pm

Error 1 The project file ‘C:\Documents and Settings\Friendly\Local Settings\Temp\Rar$DI01.691\Content\Content.contentproj’ has been moved, renamed, or is not on your computer. The project will be labeled as “unavailable” in Solution Explorer. 0 0

This is the same error that keeps coming up when i open .csproj file

By Nick on May 10, 2008 at 4:17 pm

Try unzipping it somewhere else. I’m wondering if that $ might be messing it up. Try just unzipping on your desktop and see if that helps.

By nik on May 10, 2008 at 4:28 pm

ok it comes up with out an error now…so now that i have this how would i go about putting this on my zune 80?

By Nick on May 10, 2008 at 4:45 pm

By nik on May 10, 2008 at 4:46 pm

thanks for all the help it is much appreciated

By nik on May 10, 2008 at 4:50 pm

another issue the build buttons wont let you click them…why is this?

By nik on May 10, 2008 at 5:16 pm

nevermind got it

By nik on May 10, 2008 at 5:32 pm

well ok back, so when i open c# its not showing that my zune is connected to it which means i can’t deploy…on my zune it says the xna game studio connect, waiting for computer but its not allowing me to deploy the games to the zune

By Nick on May 10, 2008 at 5:33 pm

Did you follow the instructions and add your Zune to the device center?

By nik on May 10, 2008 at 5:53 pm

ya and it says its waiting for the computer and it was set as default but its not coming up in the drop down menu at the left by the monitor with the X on it

By nik on May 10, 2008 at 7:05 pm

ok got that now there is three warnings coming up…whats with that

By Nick on May 10, 2008 at 7:06 pm

Well, what do the warnings say?

By sim on May 13, 2008 at 5:59 pm

my comp wont let me download it or any other game

By sim on May 13, 2008 at 5:59 pm

my comp wont let me download it



Post A Comment