Wednesday, August 17, 2011

Game Within a Game

This is the followup post to 'Tip The Scale'.

Remember i said a Game within a Game concept? Well below i will write up what i mean't by that and also some notes if you want to try this yourself. The main reason i did this is because i want to release a paid version of the games together.

So lets start by examining some of the things i said in the last post.

I actually built them inside each other
What this means is that i would load up a single solution with the multiple games within it. But they were not separated as separate projects within that solution. Instead the single project under the single solution would allow me to play either game. So my internal data had a selector of which game i wanted to play, and when i clicked start, away the correct one went.

It took me some reorganisation of the code
This was one of the more interesting jobs to do. I had to make sure that the game initialsation functionality worked without actually needing a game and also to make sure that the engine code(such as effect management system etc) was not tied into any game code. This job was much simpler than i expected due to having already done a pass like this to separate my Menu system from game systems earlier in the year.

Switching between games whenever i want.
The nice thing about running what is one App and selecting which game to play was twofold. Number one is that if i alter or enhance or fix bugs in the engine systems like the effects, i get that in both games without having to do anything special at all. Secondly it was really convenient to test each game in this mode, jumping from one to the other seamlessly etc.

It has technical issues thanks to the submission process etc.Well although it sounds great to put multiple games into a single executable App, i should explain some of the downsides. Firstly there is the issue of GUID, that annoying yet very nescessary unique identifier for each product. I accumulated several GUIDS by creating several new game app inside VS. I copied these into a nice simple text file and labelled them for later reference and copying. Along with the individual game GUIDs ya also need several other things modified to each game. Here is my list
Assembly.cs
XmlAssembly.xml
Thumbnail.png

For the creation of each game, i simply replaced all the stuff i needed to by following some instructions i laid out in my text file. I am not truly recommending this way of doing this task, but so far it is working out aok, but i hate the amount of steps it takes me to change game. And now Tip the Scale is in MS test and will pass. Then i will convert my solution to make the combo game so people can pay for it. Phew...

I sure hope all that made sense to someone, and maybe even use this information themselves.

Below my sig are my instructions, copied out for you to see.

Good luck,
Da Voodoochief


Instructions....
  1. Copy over the Assembly.cs and the WMAppManifest.Xaml files with appropriate replacements (Proprties directory).
  2. Boot up Dev studio jokersRun solution
  3. Bring up properties on the WP7_Jokersrun Project title in dev studio.
  4.  Change the name in the first Tab
  5.  Change Which Thumbnail the game is using
  6.  second tab... Rename the two boxes
  7.  second Tab also...  Click the 'Assembly info' and set the neutral resource language to English
  8. Rebuild the whole thing

No comments:

Post a Comment