Cross-Platform engine progress

If you read my recent posts you know I’ve been bringing Basalt to C++. The plan is to support both DirectX and OpenGL render API’s and OpenGLES for iOS devices. I’m tired of porting stuff so I want to make a better framework for future projects and I’ll leave the XNA branch for Xbox360 and Windows Phone 7. I really wished I had this before. Since the iPhone branch is stable I move on to making it compatible with Win32 and MacOSX. ...

October 11, 2010 · 2 min · 272 words · David Amador

Using Isolated Storage to save/load files on Windows Phone 7

I’m seeing a lot of forum threads with people asking how to save/load files on Windows Phone 7, well for XNA 4 in general. You can use IsolatedStorage for that using System.IO.IsolatedStorage; Both save and load can be done by creating a IsolatedStorageFile, I then use a Filestream and write with a binaryWriter IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication(); // grab the storage FileStream stream = store.OpenFile("test.txt", FileMode.Create); // Open a file in Create mode BinaryWriter writer = new BinaryWriter(stream); float myvar = 5.0f; writer.Write("something"); writer.Write(myvar); writer.Close(); For loading is pretty much the same thing: ...

October 10, 2010 · 1 min · 153 words · David Amador

Vizati for iPhone is now available at App Store

People who follow me on twitter are probably aware, or maybe not: After 3 months tacking an iPhone port it was finally approved by Apple to the App store and it’s on sale today!!! Hypnotizing start… Buy buy buy…. On the count of 3 you will feel refreshed and happy for buying this awesome game… 1 2 3 Oh right, here’s the trailer: I’ve searched some forums and found some talking about it and that they liked, general feedback looks positive. It’s great that people have fun with out little game. If everything goes as planned a version 1.1 with retina support a few other improvements. ...

October 6, 2010 · 1 min · 163 words · David Amador

Framework consideration and new projects

Engine/Framework considerations I’m currently struggling with the decision of dropping or not XNA support for PC and just keeping it for WP7 and Xbox360 (if XBLIG ever comes to Portugal). Why? Well one of the reasons is for porting purposes. Took me too long to port Vizati from C# to C++ and then having to implement an OpenGL render layer. If I had an C++/DirectX engine from the start it would be a question of replacing the rendering stuff to OpenGL. Or maybe just using OpenGL for Windows as-well. ...

October 4, 2010 · 3 min · 518 words · David Amador

Simulating tombstone (suspended state) on Windows Phone 7 emulator

Since Windows Phone 7 doesn’t have multitask, at least for now, Microsoft implemented a Tombstone notion in WP7 apps. It’s basically a suspended state where you receive a notification that it’s going to suspend but there is no guarantee that it will resume, it might be terminated so you must treat this as an exit and a might start again state. So depending on you app you might want to save the current state just in case the app really closes. ...

September 20, 2010 · 2 min · 218 words · David Amador

Another milestone reached, first App sent to Apple Store

Finally and after several weeks locked inside Different Pixel “dungeon” making my engine compatible with iOS, namely with iPhone/iPod touch I submitted today my first App to the Apple Store. The binary didn’t reported any issues so as of 15 September 2010 it’s “Waiting For Review” I have mixed feelings about either it’s going to be approved or rejected. On one hand we tested as much as we could, handed to some testers using iPhone 3, iPhone 4 and iPod touches. The only issues reported were usability or with game logic itself. No one reported any crashes, so I’m a little reassured on that part. On the other hand I’ve heard and read some major horror stories surrounding the submission process. Crashes that you can’t reproduce, people resubmitting same build again after failure being accepted, meaning that something is wrong there. Right now it’s a shot in the dark… ...

September 15, 2010 · 2 min · 383 words · David Amador

iPad launch images support for all orientations

When loading an application on an iPhone or iPad, a launch image can be shown to provide feedback to the user that the application is loading. On the iPhone a Default.png was used, with the iPad we need to anticipate the device being started in any orientation. Filename Dimensions Default-Portrait.png * 768w x 1024h Default-PortraitUpsideDown.png 768w x 1024h Default-Landscape.png ** 1024w x 768h Default-LandscapeLeft.png 1024w x 768h Default-LandscapeRight.png 1024w x 768h Default.png Not recommended * If you have not specified a Default-PortraitUpsideDown.png file, this file will take precedence. ...

September 10, 2010 · 1 min · 105 words · David Amador

Setting OpenGL view for iPhone 4 retina hi resolution

This had me scratching my head for awhile. At first I thought that glGetRenderbufferParameterivOES would properly detect Retina screen at 960×640 but it keeps returning 480×320. A little explanation on Retina screen first. Older devices have 320×480 screen resolution. With new iPhone 4 and iPod Touch 4G the screen has 640×960 but on the same physical area. This means that each pixel is 4 times as small. To properly simulate older games resolutions iOS will replace each of your 320×480 game pixel by 4, this way your game will look identical. ...

September 10, 2010 · 2 min · 256 words · David Amador

Targetting iOS devices hardware

I decided to compile all iOS devices specs here so we can get a better glimpse on their hardware and what we can expect from them. This covers iPhones, iPod Touches and iPad. iPhone/iPhone 3G – 412 MHz / 128MB / 320×480 iPhone 3GS – 600 MHz / 256MB / 320×480 iPhone 4 -~800MHz / 512MB / 640×960 iPod Touch 1G – 412 MHz / 128MB / 320×480 iPod Touch 2G – 532 MHz / 128MB / 320×480 iPod Touch 3G – 600 MHz / 256MB / 320×480 iPod Touch 4G – 800 MHz / 256MB / 640×960 ...

September 8, 2010 · 1 min · 156 words · David Amador

iPhone OpenGL screen orientation using the accelerometer

Even tough it’s not mandatory to support all screen orientations it’s always nice to support at least 2 of them. Let’s imagine your game is landscaped, by some reason the user may want to use either with the home button on the left or on the right. Most games support this, if you flip the device, the game will too. I’ve been using OpenGL to support the device orientation, most people on forums want an automatic solution, but belive me, it’s best that you have control on this. ...

August 27, 2010 · 3 min · 500 words · David Amador