{"id":94,"date":"2009-03-18T20:07:43","date_gmt":"2009-03-18T11:07:43","guid":{"rendered":"http:\/\/www.codedojo.com\/?p=94"},"modified":"2010-12-27T07:12:29","modified_gmt":"2010-12-26T22:12:29","slug":"iphone-development-on-windows-a-basic-framework-starter-kit","status":"publish","type":"post","link":"https:\/\/www.codedojo.com\/?p=94","title":{"rendered":"iPhone development on Windows &#8211; A basic framework starter kit"},"content":{"rendered":"<div id=\"attachment_95\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.codedojo.com\/wp-content\/uploads\/2009\/03\/spinning_triangle.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-95\" class=\"size-medium wp-image-95\" title=\"spinning_triangle\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2009\/03\/spinning_triangle-300x232.jpg\" alt=\"Debug in VS, play test on the real HW\" width=\"300\" height=\"232\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2009\/03\/spinning_triangle-300x232.jpg 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2009\/03\/spinning_triangle.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-95\" class=\"wp-caption-text\">Debug in VS, play test on the real HW<\/p><\/div>\n<p><span style=\"color: #ff0000;\"><strong>UPDATE 11\/3\/2010:<\/strong><\/span> This humble project has blossomed into a <a href=\"http:\/\/www.protonsdk.com\">full featured SDK<\/a> for Win, OS X, iOS, Android, and WebOS &#8211; check it out at <a href=\"http:\/\/www.protonsdk.com\">www.protonsdk.com<\/a><\/p>\n<p>Well, I&#8217;ve mostly finished up some mysterious projects and am hoping to have more time to do random junk like post here.<\/p>\n<p>One of the secret missions was an <strong>iPhone port<\/strong> of a popular PC 3D shooter.\u00a0 The reason this went so smoothly is&#8230; I didn&#8217;t write it on a mac!<\/p>\n<h2>Why write iPhone stuff on a PC?<\/h2>\n<p>Two words:\u00a0 <strong>Visual Studio<\/strong>.<\/p>\n<p>I don&#8217;t really have anything (major) against Apple&#8217;s Xcode, but hey, I&#8217;m just more productive with the IDE I spent the last ten years with.<\/p>\n<h2>My handy-dandy Win\/iPhone cross-platform development kit<\/h2>\n<p>I&#8217;ve had a few questions about my setup, so I&#8217;ve put together a basic framework showing how you can cleanly develop in a cross-platform way.<\/p>\n<p>If you are writing a GL ES game, don&#8217;t need much in the way of the iPhone UI frameworks, and want to keep your code portable this can work out great.<\/p>\n<p>Keep in mind you can basically use any C++ library out there on the iPhone with a little tweaking.<\/p>\n<p>Here is the simplest GL ES project you can imagine, ready to run under VS and Xcode\/iPhone &#8211; you just need to share the drive it resides on with your OSX box or vice-versa.<\/p>\n<p><a href=\"http:\/\/www.codedojo.com\/files\/iPhoneWinSimpleFramework.zip\">Download it here<\/a><\/p>\n<p>Here is the Programmer Readme.txt it comes with:<\/p>\n<blockquote><p>** Seth&#8217;s basic framework for cross-platform iPhone development **<\/p>\n<p>This barebones framework gets you started by:<\/p>\n<p>* Processes multi-touch input using the MessageManager from both OSX\/iPhone and Windows (there is no GUI or anything, so you can only see<br \/>\nit is even doing anything by watching the debug messages)<br \/>\n* Sets up GLES for direct, fast rendering<br \/>\n* Handles coordinate and GL rotation when the phone is rotated (or L and P on Windows)<br \/>\n* Same source runs on windows, OSX\/iPhone, only a small amount of platform specific &#8220;glue&#8221; is used, and is isolated<br \/>\n* Clean separation between shared files and app-level files, shows the organization I usually use<br \/>\n* Because we link to the PowerVR emulator library, we can also handle PVR compressed textures, exactly like an iPhone does<br \/>\n* Some helpful batch files including in RTApp\/scripts to handle some boring tasks<\/p>\n<p>To run included windows .exe:\u00a0 Double click RTApp\/bin\/winRTApp.exe<\/p>\n<p>To compile on windows:\u00a0 Open the RTApp\/windows\/RTApp.sln file with Visual Studio 2005 or newer.\u00a0 You might have to set the &#8220;start in&#8221; directory to ..\/bin when running from VS.<br \/>\nTo compile on iPhone or OSX: Use XCode to open the RTApp.xcodeproj file.<\/p>\n<p>A requirement to run on windows is to install the PowerVR GLES1.1 emulation SDK.<br \/>\n<a href=\"http:\/\/www.imgtec.com\/PowerVR\/insider\/sdkdownloads\/#GLES1b\">http:\/\/www.imgtec.com\/PowerVR\/insider\/sdkdownloads\/#GLES1b<\/a><\/p>\n<p>After installing, copy the contents of the PowerVR_EMU\/Builds into shared\/win\/PowerVR.\u00a0 (You will need to make that directory..)\u00a0 After that, the windows version<br \/>\nshould compile and run.\u00a0 Alternatively, just tweak the VS project settings to use your PowerVR paths.<\/p>\n<p>You should probably also locate the libgles_cm.dll and update the one I have in RTApp\/bin with it as well.<\/p><\/blockquote>\n<p>For hassle free cross platform sound, I used FMOD (not in this starter kit).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE 11\/3\/2010: This humble project has blossomed into a full featured SDK for Win, OS X, iOS, Android, and WebOS &#8211; check it out at www.protonsdk.com Well, I&#8217;ve mostly finished up some mysterious projects and am hoping to have more time to do random junk like post here. One of the secret missions was an [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,16,6],"tags":[],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-development","category-proton","category-tech-tips"],"_links":{"self":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=94"}],"version-history":[{"count":7,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":984,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/94\/revisions\/984"}],"wp:attachment":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}