Windows Phone 7 Gaming – Part 3

So i have gone out and brought a new laptop (MacBook Pro 13.3 2.4 etc.) so i can now develop applications in the emulator.

The emulator is still buggy, if i rotate the emulator i just get a garbled screen rather than what i want in the correct orientation (happens with the start screen on the emulator, and IE). Also the game doesnt seem to be taking up the whole screen, which im not sure if thats a emulator bug or a problem with my code.

Anyway i have spent the last hour or so making some modifications and improvements, and here are the latest screenshots it think it looks quite good in the WP7 Emulator. Next major job is the graphics, then everything should start to fall into place. I have the map now automatically generating, and movement around the map working. I have also renamed it, and i think i have one i like now.

StartScreen3LoadGameScreen3GamePlay3

Windows Phone 7 Gaming – Part 2

This is part two in my progress report on the game I’m writing for Windows Phone 7. This week i have made a lot of background changes. I have now added Buttons, Taps (from touch panels on Windows Phone 7, and Clicks on Windows). I have added a Load Game screen. You can now also traverse all of the menus.

Next week i intend to work on the graphics (because it is very ugly at the moment) and the code which draws the landscape to make it efficient as possible. I also have some plans to add support for none rectangular buttons.

Anyway these are the screenshots so far…

StartScreen1LoadGameScreen1GamePlay2

Windows Phone 7 and Gaming

I am currently lodging out in the countryside for my summer job, and I found my ideas list and decided to work on the WP7 games I have had ideas for. So armed with my “craptastic” laptop, Visual Studio + Windows Phone 7 Dev Tools Beta i started to write my first game, which i hope will be done by the end of August/mid September in time for the Windows Phone 7 release so i can sell it on the marketplace (Students can sign-up here for the marketplace FREE).

I am just going to go through some of my experiences as a developer taking my first serious look at this platform and the problems I encountered in the last 6 hours. I would just like to say as well this is my first time using XNA.

Hello World

So i sat down and decided to setup a simple program which prints Hello World to the screen. The first problem i encountered was how to force the screen into landscape orientation. I had a look around and apparently this was not possible in the CTP and CTP-Refresh, so i decided to just use the TouchPanel.DisplayOrientation and set it to LandscapeLeft and to test if that worked in the beta.

My only other experience of writing graphics applications was term where we had to use OpenGL/C to code a little program, and it was quite horrendous work to draw text to the screen, but i was pleasantly surprised by how easy and flexible it is to draw text to the screen in XNA, although i would prefer to only load one font, and change the size, rather than loading a new font for each required text size.

Pressing F5

This is the bit where everything went a bit wrong. While the Emulator would start, i was not allowed to run any XNA applications because my graphics card was not good enough(I’m currently using a 3 year old HP 530 laptop for my main PC). After a bit of searching i found a way to disable checking of this in the emulator.

Under HKEY_Local_Machine\SOFTWARE\Microsoft\XDE create the key XNAEnableGPU (DWORD) and set it to 1.

Unfortunately my hardware really is incapable of running XNA games in the emulator and all i got was a black screen (the program was set to make the background Cornflower Blue by default). This also meant i was unable to test if the screen orientation was correct.

Option 2

Luckily is takes mere seconds to port an application to Windows or the Xbox so for now i will be developing it on Windows, and then when i either get home, or i get hold of a Windows Phone 7 device, i can just port it back across and add support for the Windows Phone 7 controls.

I learn that when you use the “Create a copy for Windows” in Visual Studio that it keeps all the code in sync across the projects for each platform, so if you have some device dependant code (think input control, mouse vs. gamepad vs. touch screen) you just have to wrap it in

#if <platform name>

code for this particular platform

#endif

Another really useful feature that i found is that you can switch graphics profiles on Windows XNA Games, between Hi Def and Reach. So as i want my application to work on WP7 straight away and my current graphics hardware is crap, i am using the Reach profile which works across all devices, while the Hi Def profile has features which only work on Windows or the Xbox.

My Game

I have then spent 3 hours getting used to programming in XNA and while these are some very rough beginnings of my game here are some screenshots of what i have started. I still have a long way to go so watch this space.

By next week i hope to have a lot more of the game play and input controls working and some nicer screenshots and as i go along i will improve the graphics and artwork as these are based on some i just found on the internet

Like all Microsoft products, WP7 has a brilliant set of development tools and i suspect they are only going to get better with time, and with all the device leaks at the moment I’m starting to get quite excited about the launch

PS. If anyone from Microsoft would like to give me / lend me a WP7 device please contact me at @lloydsparkes on Twitter

Menu Screenshot

Game Screenshot

So im making a twitter client

Over the last few weeks i have been learning WPF, and have been creating a Twitter Client

While i am still learning, this is what i have produced so far, although now i have learnt more i am planning on a slight redesign

[edit: there was a picture here, but due to a server crash it disappeared (i now have better backups)]

What do you think?

I did have to stop using Visual Studio 2010 as its editor was playing up and begin really slow, although this is a beta, and i expect this to be corrected