Better Device Model Detection

I'm requesting that the system.getInfo( "model" ) be updated with more specific information, for example, to be able to differentiate between an iPhone 1g, 3g, 3gs, 4, iPod touch 1st gen vs. an iPod touch 4th gen.

I don't know anything about Android, but I know there are way more devices so this would also come in handy in that realm as well.

Here's my reasons for this, and I know many other would find it very useful (I'm actually starting to think this is essential, especially as time goes on):

The difference in performance between 1st generation iOS devices and the latest (4th gen) devices is astounding. There's really no comparison, so we need to be able to detect EXACTLY what device the user has so we can optimize our games accordingly.

There's a lot of people with old generation devices, so you can't leave them out. With that said, we can't utilize the new hardware and capabilities to it's full potential because in order to do that we currently have to exclude those with older devices.

In my latest game, Dungeon Tap, I had to leave A LOT out and make lots of changes because performance on older iOS devices was just too crappy. It would have made more sense to detect what device they had (e.g. first generation iphone vs. 4th generation iPhone, or 1st generation iPod touch vs. 4th generation iPod touch), and then program accordingly.

Right now, as far as I know (and through my own personal testing), system.getInfo( "model" ) only outputs "iPhone", or "iPod touch" whether you're on a 1st generation device, or a 4th generation device. Note, this isn't the case with the simulator. The simulator outputs "iPhone4" and "iPhone" respectively, depending on what option you have set in the simulator; however, on the ACTUAL device, it just says "iPhone".

Please make a reply to this post if there is currently a way to do the above that I just haven't been able to figure out, or if there is some kind of acknowledgment that this will be an added feature request.

Thanks!

For a more thorough example, with Dungeon Tap, I originally had the FPS set to 60. On my 4th generation iPod touch, things ran so smooth it was incredible. You could really tell the difference between 30 FPS and 60 fps, the game played out so well it was amazing. In fact, the higher FPS even made the graphics appear more clear.

But then, I tested the game out on a first generation iPhone. After as many optimizations I could possibly make, the game ran as if it were in slow motion. When I set things back to 30 FPS, things worked fine on the older generation device, and it of course ran well on the iPod touch 4, but it wasn't the same as when it was set to 60 fps.

At bare minimum, perhaps there could be an option to detect what device they're on and set the FPS in config.lua accordingly? (30 fps for older devices, 60 fps for newer). I was really disappointed when I had to set FPS to 30 fps just to accommodate for older devices... it would have made much more sense to detect what device they had, and be able to optimize for BOTH.

At the moment you really have to optimize for OLDER devices, and just deal with what you have to do without on the newer devices.

If there IS a way to detect the EXACT device, please reply and let me know!

This is exactly what I'm talking about:

http://arstechnica.com/apple/guides/2009/03/iphone-dev-determining-your-platform.ars

Is there a way to do what that article says in Corona? If not, could it PLEASE be added? Thanks.

You could do a trick that TS did in gs
For 2 seconds spawn an image counting each time
It's spawned each device will give a different result

@jstrahan: Thanks for the creative solution! I only have a couple questions/concerns with that though...

1) I'm hoping the number would be consistent every time the app launches. For example, if they are on an iPhone 4 and have a lot of apps multi-tasking, or if they have something bogging down their memory on an older generation device, it seems like the number returned could be different each time.

2) I don't have every iDevice/generation so I'm not sure if a 1st generation iPhone would produce the same result as a 1st generation iPod touch, etc.

I guess this could work really well IF the number produced was vastly different on each device, then it should be relatively easy to just test using > or < operators.

If you have anymore information or could elaborate anymore on it I would greatly appreciate it, otherwise, thank you very much for bringing this to my attention--you definitely got my creative juices flowing now.

Here's the link to TS's thread I haven't tried it or read the whole
Thread but it seems like the number are different by a good amount
On each device but it shouldn't matter if your app adjust dynamically
Depending on the result

http://gamesalad.com/forums/topic.php?id=12224

Thanks a lot!

Your welcome

views:2081 update:2011/9/19 9:18:26
corona forums © 2003-2011