The story of Mali-400 MP and GL_RGB

We’ve had our share of compatibility problems with Android but most of them were quite straightforward. That said, it has still taken a lot of time if you sum up all the little bits of work we’ve done to improve compatibility. Maybe this note will help some other developer solve this particular issue more quickly.

For some time we’ve received reports that some Galaxy Note devices and some Galaxy S II devices may have problems with our games. When we started investigating, we discovered that the trouble was with games that used frame buffer objects (FBOs) or render targets if you prefer that term. We already knew that despite the similar model names, there are several kinds of SGS2 and Galaxy Note devices.

Samsung Galaxy S2 has three possible SOCs (System On a Chip): Snapdragon S3, Samsung Exynos 4210, or a Texas Instruments OMAP4430. Galaxy Note has two possible SOCs: Exynos 4210 or Snapdragon 8255T. After some more research we discovered that the trouble occured on devices with the Mali-400 MP GPU which can be found from inside the Exynos 4210.

After we had narrowed down the suspects, some googling produced this. In the end it was all down to the following sentence.

You are trying to create a framebuffer object with RGB of 8-bits per channel. Mali doesn’t support this because of memory alignment issues that would impact performance.

We had used GL_RGB in our OpenGL ES implementation and it seems that Mali-400 MP doesn’t support this at all.  So, now we know that. All other devices we’ve encountered have supported it, so this was exceptional. The fix was obvious: use GL_RGBA. Further investigation also revealed that GL_RGB is an optional feature so our code was a bit too optimistic to begin with. Anyways, problem solved!

In the end, as a developer I’d really hope that manufacturers would use a different model name if they decide to use a completely different SOC. Even though your average user doesn’t mind what’s munching the bits, this situation makes a developer cry. Granted the manufacturers have used different technical model names, but our customer will say he has a Samsung Galaxy S2. Most don’t know that actually they might have a GT-I9100G instead.

You really can’t say that your app is tested to work on a SGS 2 if you don’t have all the three different devices. And that wouldn’t account for the operator tailoring which might also be a factor in some cases. With that you might have somewhere between one and two dozen different versions of SGS2. For most developers it’s impossible to acquire AND keep acquiring every possible common Android device so it would be great if the manufacturers wouldn’t make the situation even harder :)

Upsides and Downsides of Retinafication

Let’s be honest. I can’t wait to get my hands on the new iPad. The new “Retina Display” looks amazing — as everyone seems to agree. But besides the great visual quality, what does this mean for consumers and developers?

The 2048×1536 resolution is huge. Insanely huge. 4x more pixels. Don’t get me wrong, I’m very glad Apple is pushing the boundaries, but it does come with a price — and no, not talking about the $499.

Consider this. You’ve got an iPad app with 30MB worth of graphics. Nothing unusual in a game app. Making everything Retina Compatible would in theory increase the size by 4*30MB = 120 MB. That more than doubles the download size! Sure, you can do all sorts of tricks to bring the size down a bit. You can reduce the jpeg quality. You can scale dimensions to 1.5x instead of full 2x and hope nobody will notice. Furthermore, not all images take exactly 4x more space: png images with hand-painted scenes seem to increase only about 3x. But making high quality Universal apps which support all four iOS resolutions (480×320/1024×768, non/retina) will make the app bundles massively large compared to last week.

It’ll be interesting to see if Apple addresses the issue in any way. Or if it’s that big an issue in the first place. They could enable downloading parts of the app on request, but I’m not sure the added complexity is worth it. This is what Google is doing on Android Market Google Play: the maximum app size is ridiculously low 50MB, but you can download extra packages later.

While the extra pixels come with extra download cost, they also require extra work for developers carefully crafting them. Surprisingly, simply scaling up the images in Photoshop doesn’t add in more detail.

iPhone vs. iPad Retina

We’ve been prepared for this for some time now, so updating the latest apps for higher res wasn’t that much work in our case. We’ve already updated 5 of our games to support the new resolution. The lucky games are Ironworm, Swingworm, Joining Hands, Belowscape, and the upcoming Azkend 2 HD. And they do look great. Just take a look at the comparison shot between the original iPhone resolution vs. the new iPad to see the difference in Ironworm. Admittedly you wouldn’t normally compare these two together, but nevertheless the leap in content resolution developers need to produce now vs. then is definitely significant.

There are some additional problems developing for the new iPad. We’re doing most of our development on Windows PCs. We support multiple platforms, even minor ones including webOS, bada, and Symbian^3. We’ve built our development tools so that we can make our apps resolution independent almost automatically. We’ve got our own simulator which we use to test the apps. However, the problem with simulating the new iPad is that we haven’t got an external display with large enough resolution to fit the 2048×1536 pixels on screen. Even the best Apple Cinema Display doesn’t have enough resolution to fit it in!

The otherwise excellent iOS Simulator is not really useful with 2048×1536 sized games. Instead of FPS, we’re measuring SPF. The performance is nowhere near usable. I’m glad the sim exists as otherwise we wouldn’t be able to do anything before the launch, but if a new iMac can’t push that many (simulated) pixels, is it safe to assume the new iPad will be able to handle it? We submit into the unknown.

Now of course, all those problems are mostly minor nuisances that will go away with time. The next iPad after this (the new new iPad?) will most likely have even more horse power much like iPhone 4S had over iPhone 4. The display makers will start selling wallet-friendly high resolution displays. We will all have unlimited amount of lightning-fast bandwidth. And flying cars.

Can’t wait to play our games on the new iPad.

Microsoft demos a touch screen with 1ms latency

I just came across and interesting demonstration by Microsoft. They have a touch screen setup with 1 ms latency which is could be around 100 times faster than the current commercial implementations. In many cases good is good enough, but in this case it might be that many games would really benefit from the lower latency.

For example our games Ironworm or Swingworm could probably become a bit more responsive and more intuitive to control with reduced lag. The games use something called a “mouse joint” from Box2D to attach a physics simulation object to the touch coordinates. This adds a certain “springyness” to the control mechanic. Without the touch input lag the controlling the worm might feel better as the “grip” would be a bit more firm and responsive. On the other hand the current lag could be beneficial as it puts some distance between the player’s finger and the controlled object and that improves visibility.

Low lag input is most likely something that touch device makers are trying to achieve in commercial devices all the time since in most cases input lag is a negative thing. 1ms latency is probably impossible in real world situations, but improvement from 100ms to 50ms would bring the control lag to par with consoles and PCs.

iPad Retina Display Becomes Official

Azkend 2 on iPad 3

Azkend 2 on iPad 3

It seems the rumoured display is official so here’s another screenshot of Azkend 2 running at 2048×1536 on PC. We hope we’ll be able to support the new resolution as soon as possible! Hopefully the A5X packs enough horsepower :) If not, we might have to opt for a drawing resolution somewhere between the 1024×768 and 2048×1536 and upscale it from there. But we’ll see soon, it seems the devices will be available here in Finland on March 23rd.

Check out also the first and the second post for more screenshots.

Azkend 2 High Resolution Musings

Azkend 2 at 2048x1536

Azkend 2 at 2048x1536

Tomorrow we’re going to know if the rumoured “retina display” on the “iPad 3” is a real thing or just a rumour. Be it as it may, we’re prepared to take advantage of the extra pixels now or later. As developers of fancy looking 2D games, we hope that there’s sufficient horsepower behind those pixels in the form of raw fill rate. This simply enables us to push more stuff on top of other stuff on the screen :) You can see the main menu of Azkend 2 running at 2048×1536 in the image.

Posted in iOS

Possible “iPad 3” Retina Display Support Plans

10tons Ltd  will support the possible retina resolution in the theoretical “iPad 3” in several games. The games include Azkend 2, Joining Hands, Ironworm, and Swingworm.

“We have plans to support the possible “retina resolution” if the performance and memory resources permit. If not, we’ll probably use a resolution as high as we can within the performance and memory constraints”, commented Tero Alatalo of 10tons.

Ironworm at 2048x1536

10tons’ recent games include a total resolution independency and therefore supporting higher resolutions with those games will be relatively easy. These games include Joining Hands, Swingworm, Ironworm, and the upcoming Azkend 2. The possible updates will be free of charge. 10tons has already experimented running Ironworm in the 2048×1536 resolution and it looks like the potential updates should be quite painless.

“I have to admit that I’m quite excited about the possibility of a extra high resolution update for Azkend 2. The full screen animated and hand painted sceneries look totally amazing already on the iPad. With four times more pixels they must look so good that you’d want to eat them. The only downside is that the upgraded graphics will make the downloads bigger.”, said Sampo Töyssy of 10tons.