Home > Zombie Outhouse > Zombie Outhouse Development Part 6

Zombie Outhouse Development Part 6

Zombie Outhouse Development Part 6: To the iPad and beyond!

[Just like a zombie, this blog is back from the dead.  Apologies for the neglect.  I got derailed a few times but am back on track.  There will be a flurry of posts over the next few weeks to catch up on the backlog and then we’ll focus on an upcoming action rpg project.]

Soon after the iPad came out, I wanted to upgrade Zombie Outhouse to add native iPad support using the higher resolution art that was used in the Xbox 360 version.  But luckily [really?], I got sidetracked with the Cyborg Mice web comic.  A few months later, Apple announced the iPhone 4 with its high resolution Retina Display.  Believe it or not, this actually would make the porting job a much easier task.

I first upgraded the bork3d engine to support all the iOS resolutions on the Windows side by reading the platform/orientation from an ini file to test multiple resolutions and platforms without needing to recompile the code.

I decided to break the porting into two parts, first to iPhone 4 which would just used the 2x resolution textures from the Xbox 360 version while increasing all the original iPhone version location coordinates by 2x.  The second part would then be tweaking the positions to maximize the screen space for the iPad.

To deal with two sets of textures I created a second set of directories called “Textures2x” and “Fonts2x”. The iPad and iPhone4 versions both used the “2x” directories, while the original low-res iDevices use the original directories.

I also added some code, mostly during initialization that fixed up sizes and coordinates depending on the device. For iPhone4 things were just 2x the regular iPhone size, but for iPad I kept texture sizes the same (2x like iPhone4) while pushing out HUD elements to the edge of the screen.  I also tweaked the zombie movement speed to be relatively the same for all platforms.

Being able to do most of the work in Visual Studio on the Windows side made the process much smoother.  It took some extra code on the XCode side to detect the proper platform and also scale the touch coordinates if the code was running on the iPhone4.

The only major-ish issue I had was with the way audio files were loading stopped working on OS4 and I had to recode the loading functions a little bit to make OS4 happy.

Now that I have been through the process, I hope to natively support all iOS devices for future games.  But it also helped lay down a foundation for supporting even more resolutions in the future for platforms like Android and Windows Phone 7.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: