You can watch the promotional video here:
The game features 3 different minigames, suitable for kids of all ages:
- Jigsaw puzzle game
- Memory-like game
- Paint application
Diary of a game programmer
Basic reference of my understandings of how to batch geometry on the POWERVR SGX chip.
Render Target 1
1. Opaque surfaces
No win to sort by depth.
2. Surfaces using discard (Old Alpha Test)
Same sorting as Opaque Surfaces
3. Transparent surfaces
Sort by depth if necessary
Same sorting as Opaque Surfaces
Render Target 2
…
Consider the following code:
int Test()
{
int a=10;
int c;
// Bug. User meant “=” but unfortunately wrote “==”
c==a;
return c;
}
This piece of code is obviously faulty. c is never assigned the value of a. c is actually never assigned any value.
When we compile this in VS 2008 we get the following warnings:
In Xcode, we get no warnings at all. I just spent 30 minutes tracing this kind of bug in my code, in Xcode. I know I have made the mistake of replacing “=” with “==” several times in the past, but usually VS warns me in these occations. Xcode does not.
Coming from an OpenGL 1.5 + Nvidia Cg environment there are some noticable differences when migrating over to OpenGL ES 2.0. This post is like a cheat sheet for myself and others to use as a quick reference to look up some major keypoints of the Opengl ES Shading Language.
Precision & range of variables
The OpenGL ES Shading Language, used in e.g. IPhone OpenGL ES 2.0, lets you decide upon the range and precision used to represent integer or floating point variables.
| Bits | FP Range | FP Precision | Int Range | |
| highp | 16 | (-262, 262) | Relative 2-16 | (-216, 216) |
| mediump | 10 | (-214, 214) | Relative 2-10 | (-210, 210) |
| lowp | 8 | (-2, 2) | Absolute 2-8 | (-28, 28) |
Notice the fragment shader is missing a default precision for float. This means you must include precision qualifier for floats.
Built-in Variables
| Type | Precision | |
| gl_Position | vec4 | highp |
| gl_PointSize | float | mediump |
| Type | Precision | |
| gl_FragCoord | vec4 | mediump |
| gl_FrontFacing | bool | |
| gl_FragColor | vec4 | mediump |
| gl_FragData[gl_MaxDrawBuffers] | vec4 | mediump |
| gl_PointCoord | vec2 | mediump |
| 3G | 3GS | 4 | IPad | |
| Resolution | 480x320 | 480x320 | 960x640 | 1024x768 |
| Ratio (*) | 3:2 (1.5) | 3:2 (1.5) | 3:2 (1.5) | 4:3 (1.33) |
| OpenGL ES | 1.1 | 2.0 | 2.0 | 2.0 |
(*) The bigger the ratio the more “widescreen” the display is. Eg: 16:9 = 1.78, 16:10 = 1.6
In Visual Studio I use HOME/END to jump back and forth on rows, extensively. Using those keys in XCode results in the cursor jumping to the beginning/end of the document instead of the current row. There is a simple way to fix this:
Open:
XCode->Preferences->Key Bindings->Text Key Bindings

3) Click on Folder Options
4) Select Show hidden files, folders and drives.
5) Click on Apply
Recently I needed to setup a new computer at work. I will use this new computer for development. The computer already had Windows XP SP3 installed as the operating system. The software I needed to install for development purposes were the following:
Every one of those installations gave me trouble. None of the above installed without hassle. I managed to get .NET Framework and Visual Studio 2008 installed after numerous tries, but DXSDK just wouldn’t install.
I couldn’t find a solution to why the SDK wouldn’t install. I tried a few different things without luck. The SDK installation exe file was downloaded with IE8. I then tried, as a last resort, and downloaded the file with Firefox instead. And guess what. The SDK installed without a problem! How strange is that? I have verified by downloading the SDK again several times with IE8 on that computer and that downloaded file just doesn’t work. The files are identical in byte size as the picture below shows (The text is in Swedish):
Both file sizes are 580,228,040 bytes.
(The only noticeable difference between the files is the Security Block showing up beneath Attributes. However, I removed the Security Blockage and tried installing it without any success).
