Bringing a game from PC to iOS
Join the DZone community and get the full member experience.Join For Free
this is my first post to http://idevblogaday.com/ , i’ve been waiting since november so i’m pretty excited about writing to a broader audience =p. even though i only have one product on the app store i have gathered some knowledge on how stuff works to get there.
i’ll start by talking a bit about how we made our pc game
when we started, this represented our chance of making games and
putting ourselves into test. without any pre determined rules and/or a
major company dictating what to do we were able to have full creative
control to try and do something a bit different.
vizati is a casual puzzle game with a story as a background. the game is now available for windows, mac, iphone, ipad and windows phone 7. developed by only two people, it thankfully received several good reviews.
launching for windows
we started out building for windows and xbox360 because it was a very well known platform for us; we had tools and knowledge from other games so it felt right.
we launched the game on june 6 th; and got some very positive reviews, being its freshness, graphics and music the most acclaimed features.
right away we started making plans for bringing the game to ios devices, iphone, ipad etc. the mobile devices felt like a great platform for such a game.
first speed bump
for the pc we had built the game engine using xna framework as a base, it is directx based but it uses .net languages which are a no go for ios devices of course. it was stable enough to ensure a high compatibility with all the different machines out there, and we never thought at start to make it for any other platforms. this was our first mistake.
for the next 3 months i had to rewrite all the game codebase to c++ including building the engine itself using render api opengles. [dedicated post]
during these 3 months we also had to adjust the game to the iphone screen size. just out of curiosity the native resolution on pc is hd, 1280×720 and the iphone native is 640×426. [see more on ios hardware]
at first we considered using the same images and using the same feature we used on pc to automatically scale the game to the screen size. but doing that would be a tremendous effort to the device since the iphone screen size was almost 3 times smaller; memory and cpu cycles are more limited in mobiles so we had to make a smarter approach.
one of the problems was the game being extremely slow on older devices. the amount of particles and animations on some parts was a total killer. i eventually had to rewrite my primitive drawing code to batch stuff as much as possible
another problem was the aspect ratio, which would lead to either stretching the game vertically thus distorting the images or making it letterboxed.
the screen is already small so it would be a mistake not to take advantage of all the area. rita had to redo some of the art to fit a different aspect ratio.
fortunately touch felt a very natural way for controlling the game, even more than a keyboard. using the fingers to rotate, shake and flip the cube feels right and natural.
the ipad version was easy once we had the iphone version made, basically we just had to bundle high-resolution images since its screen resolution is 1024×768. this version features the hd graphics that so many loved in the pc version.
Published at DZone with permission of David Amador, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.