Friday, February 27, 2009

Photoshop with Title Safe Area Guides

If you want to easily create mock-ups for your game and take the title safe area into account you can do this in Adobe Photoshop. If you are targeting your game release on the Xbox 360 you'll need to consider the safe area as you will have users that are using non wide screen CRT TVs that won't use your full resolution or even HD TVs that might have some amount of over scan.

To do this in Photoshop:
  1. From the menu, select File -> New and then choose the NTSC, PAL or HDV (with guides) preset. In my case i'm going to use the 1280 x 720 resolution for my game.


  2. You will then have a new PS file with guides for the Action Safe and Title Safe areas. The Action Safe guides are the outside and the Title Safe guides are the inner ones.

I plan on using these templates to mock up all of my menu and game screens. This will also help out as you can easily get the coordinates of your menu and game elements starting positions.

I'm sure that you can do it, but haven't tried yet, is take this template and make the guides actual colors on the layer, save it to a file and then render it to your game screen. This will be an easy way for you to check your title safe area while the game is running.

Monday, February 16, 2009

Exporting Vector2 waypoints from Adobe Illustrator

For the Moto Grand Prix Manager game, I'm going to need to render a 2D race track and have some textures follow a set path on this track. I could easily create a list of Vector2 waypoints myself and experiment with their positions - but that would be too hard. I don't have experience with 3D modeling software that could probably do this easily. I do have a lot of experience using Adobe Illustrator though.

With Illustrator, I knew that I could create paths with anchor points that could represent the waypoints that I needed. The only thing that I couldn't figure out was how to export these waypoints to a format that I could import for use in XNA. Illustrator has options to export in multiple formats. The only ones that sounded promising were the AutoCad formats DWG and DXF. However, after doing a search for importing these formats to XNA I didn't come up with anying. Ideally, I need to export the paths to an XML format, which I could easily import into XNA.

I did a simple search on Google for "Export paths illustrator xml" and the first result that came up was for Mike Swanson's Adobe Illustrator to XAML Export plug-in. It is meant to export your Illustrator objects to display in XAML format such as in Silverlight or Windows Presentation Foundation (WPF). Since XAML is XML based, I thought that this might work for me. I downloaded the free plug-in and fired up Illustrator to give it a try. Sure enough, you can create paths and then export them in XAML format.

Below are the steps that I took to export a path from Illustrator and convert the anchor points to Vector2 objects that I could use as waypoints in my game.

  1. Open Adobe Illustrator and create a new path using the Pen tool.


  2. Draw a path and add as many anchor points as you see fit. Since I needed to create a path that followed a known race track, I took a screen shot of a race track from Google Maps and drew my path over this track. Note: you can create open or closed paths to export. If you create a closed path, one that connects back to itself to form a loop, then the exporter tool will duplicate the start/end anchor point two times in the XAML file. You can account for this by simply deleting the last waypoint if needed.


  3. Once you have your path ready, you can export it with File -> Export and select one of the XAML file types to export as.

  4. Your exported XAML file will look something like this:

  5. You will have "Path" nodes which contain all of the coordinates for your waypoints. I then extracted these waypoints by reading in the XML and traversing the nodes to the Path nodes. I had some trouble initially reading the XML in the XAML file as I couldn't get to the path nodes using XPATH queries. I believe that this has to do with the XML namespace that is in the Viewbox node. Simply removing these namespaces will allow you to use XPATH on the file. I decided not to do this and simply traverse the document nodes to the ones that I needed.
  6. I extracted the text of the "Data" attribute and did some cleanup on the string so that I could then split out the values into an array. Once I had these values in an array, I could then take each X and Y value to create Vector2 objects.

Once I was able to extract these Vector2 objects I saved them in a List. I am going to use this list to have objects follow a set path. I did all of this extraction in an "editor" project that I then use to serialize the list of Vector2 objects into an XML format that XNA can read - I'll leave that for another post.

I hope that this information is helpful for someone else out there.

Saturday, February 7, 2009

Coming up with a game idea

Since deciding to give game development a go, I had to come up with an idea for my first game. Of course, any game enthuiast would love to create a game that emulates their favorite games. I'm a big fan of games such as Fallout 3, Call of Duty and others in the the racing genre. I'd love to make a game as full featured and polished as these - of course, I'm a realist and know that I don't have the skills or resources to pull this off.

Since this will be my first game, I need to keep it simple. I don't have any experience with 3D models and don't want to have the complication of trying to learn how to work in a 3D world on this first try. I've decided to keep my project 2D. I'll be doing all of the programming but I plan on getting help with graphics and sound from people in those industries that I know.

While trying to come up with ideas for a game, I wrote down ideas on index cards and came up with the following:
  • Platformer featuring a dog and cat that work together to solve puzzles - for the kids
  • Martial arts fighting game
  • Ship's Surgeon - historical medical simulation - kind of morbid
  • Motorcycle Team Manager

While all of these would make great games, I decided on the motorcycle team manager idea. This game will put the user in the role of team manager of a grand prix motorcycle team. They will be responsible for managing the teams finances, contracts, R&D and bike set-up during races. I chose this game idea for a few reasons. First, I'm a huge fan of MotoGP racing. Second, I always liked manger type games - I used to play F1 Manager on the PC back in the 90's and love the manager mode in games like EA's FIFA. I want to build a game that I want to play. Third, the game does not have the user actually controlling anything during an actual race so, I don't have to wory about physics, collisions, etc.

For my day job, I work mostly with data and this type of game is mostly manipulating the data behind the simulation. I don't expect this game to appeal to the casual gamer and understand that it will be a niche market for it. I do think that there are others out there like me though - people who are fans of MotoGP or motorcycle racing in general. If you've ever played one of the existing MotoGP racing games, you've probably noticed that these games can be hard to master - more so than car racing games. There are lots of motorcycle fans out there that might not be good at racing games but would want to play something that lets them control the behind the scenes running of a race team.

Well, that's how I came up with the idea for my game. Stay tuned for more info as I build it.

Monday, February 2, 2009

Hello World!

My first blog post. I plan to chronical my foray into independent game development. I've started to work on my first Xbox 360 Community game. I want to use this blog as a record of this project as it unfolds and to hopefully post some information and tips that are useful to other would be game creators.

With the upgrade of the Xbox 360 dashboard last November, Microsoft also rolled out the ability for independent game developers to release their games through the Community Games feature on the Xbox 360. Game creators can sell their creations to a community of over 17 million on the Xbox Live service. With tools such as Visual Studio and XNA anyone can develop professional grade games.

A little about myself - by day I'm a business application developer specializing in .Net and SQL Server development. I'm a fan of MotoGP, Formula 1 and most importantly video games.