Retina 3D

Previous topic - Next topic

Crivens

Ok so I'm almost done putting together a 3D game, using my trusty Pre2 as a test device all along the development cycle. No worries, runs like a charm. Anyway I get to the point where I think I'll try it on an iDevice. Both my 3GS and 2G Touch work brilliantly. This is when compiled for Retina. When it gets to the older devices it obviously isn't doing Retina, and the first time in it resizes all 2D graphics (3D can stay the same) to the correct resolution (code is posted on these forums).

It all works brilliantly. The Pre runs it the smoothest, but the 3GS and even the 2G Touch are pretty close as to not really matter. However when I thought I'd try my 4G Touch (Retina) it looks better (obviously) with the un-resized graphics, but once it gets to the 3D it stutters quite a bit. Now I'm using timer based movement so it can jutter now and again if something is running in the background (fair enough but runs at the correct speed), but it happens all the time. I tried compiling hardcoded to the non-retina resolution and it works fine on the 4G. As smooth as the 3GS.

So is it really that the 4G Touch just doesn't have the speed to run 3D (pretty simple too with not much going on) in full Retina display, or is there something wrong here? And would the iPhone4 be better? Note I am not using up stupid amounts of memory either. It's a pretty simple game. Also is it possible to compile for Retina and then switch to non-retina mid game? So menus all look good and then the main 3D bit (which doesn't benefit too much from Retina) can be in non-retina.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

ampos

It should work fine, iPhone 4 has a much better cpu and 3dchip than old devices... strange.

Kitty Hello

yes, you have 4x the fill rate. That's quite some additional work.

Crivens

Fair enough but my 3D world is seriously simple. In the beginning I think there are literally 21 cubes and 2 spheres. That's it. When you consider my 2g touch runs it fine at 4x less fill rate but with vastly inferior specs then is slightly worrying.

On the other hand it might be timings. You know it's exactly at the point where it looks jittery. Even speeding it up slightly might smooth it out.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

simple test: VIEWPORT 0,0,320,480.

Crivens

Ah so you mean still compile for 640x960 but use a viewport of 320x480 for the 3D to see if it runs smoother?

Ok will give it a go when I get a spare minute.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

erico

about the couple spheres, are they heavy on the poligon count? no shaders going right?

Crivens

Pretty low I believe. Good point though I will switch to cubes and see how it runs.

No shaders at all.

Interestingly updating to the latest iOS smoothed it a little.

The other thought I have is I plonk a load of sprites on top. Two main ones and a sprite per number in the score and time left using drawanim (normally 9 numbers). Will experiment more when I get a chance.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Crivens

Hmm I lowered the quality of the spheres a load and stopped the score sprites and it still appears just as jittery on the 4G Touch. So I'm guessing it's to do with the speed of it being exactly right to look jittery on that resolution. It's low priority so I'll try mucking about with the speed in the future to get it smoother. Even back in the day I remember increasing movement speed on old Atari STOS games to get it just so on smoothness (faster can be smoother it's just how it appears to the user).

It's either that or 3D on a 4G Touch seriously sucks. Either that or it really isn't that much better at 3D than a 3GS or a Pre2 even though is putting in 4x the pixel count. I mean seriously my 3D scene is really pretty simple 20 or so cuboids and 2 lower quality spheres along with a bit of collision. It's not exactly Quake, let alone any of that fancy new stuff you can get on an iOS device.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.