I just get a white or black screen when I display a new image that is larger than 1024x768 with the true flag set (on iPad).
[import]uid: 9189 topic_id: 3154 reply_id: 303154[/import]
can you fwd or link to the image?
c [import]uid: 24 topic_id: 3154 reply_id: 10639[/import]
I have three iPad Apps that I developed in XCode using the iOS SDK directly. You cannot have images larger than 1024x768. Memory issues. Also, you do not want to load more than 1 or two of these large images into memory at any given time. You need to handle clean-up a lot better with the larger images.
It is recommended to use high-res images that are more 800x600 and let it scale up to the larger resolution. Still looks fine.
Any other questions, please feel free to contact me ssinger@rochester.rr.com
Also, I am new to Corona as I am starting to develop more interactive Apps and Games and I want to be able to release to Android at same time… so, I am very excited to be here in the Corona community. [import]uid: 10965 topic_id: 3154 reply_id: 10673[/import]
A friend of mine who has developed iPad apps in XCode says that you can have larger images… If I understand him right, the issue is more about memory management… he’s saying that we shouldn’t be using png or jpeg files but rather first compress the images using texturetool (used from the command line) into PVR format. I’ve never heard of this format before, and doing a search here doesn’t show up anything about PVR or texturetool…
Also, he says that when he codes his programs, he generally talks directly to OpenGl rather than going through Apple’s SDK calls.
So, does anyone have any information about this?
[import]uid: 9905 topic_id: 3154 reply_id: 10845[/import]
I just did a different test that I got to work…
Previously, I tried loading a single 2048x1536 image so I could then zoom in and pan around. It does show up in the simulator but at 1/2 resolution so when I zoom in to show 25% of the image, it’s blurry (where it shouldn’t be). And when I try to build this for the iPad and run it there, I just get a white screen. I already reported this problem.
But this time I took my 2048x1536 image and cut it up into 4 images,
AB
CD
Where A and B are 1024x1024, and C and D are 1024x512.
I then placed them all into a group, positioning them so they were in the proper place, and tried it again, panning and zooming around. This time it worked! Both on the simulator and on the iPad.
Of course, I’d much rather not have to split up all my images this way. But this is better than it not working at all! [import]uid: 9905 topic_id: 3154 reply_id: 10849[/import]
Like I was trying to say — larger images causes memeory issues (I do not think I stated it that clearly in above post)…
PVR is a optimised lossy texture format designed for the Power VR chips (which as, you guessed it, is the iPhone’s 3D chip).
PVR isn’t a standard image format and therefore you won’t be able to view them in standard image programs.
Note: be careful if releasing to Android because I do not think PVR is supported there…
And yes, using the built-in Apple SDK calls in UIKit to load an image causes more memory problems verses handling directly with OpenGL … we would use UIImageView which holds onto the image until released from memory causing problems with large images.
So, be careful with your approach with having all images loaded into one group…
When you get to loading on device, you may run into the memory issue again and the App will crash.
So, when I recommended using smaller images — your approach is right to load them and piece them together but when they are off-screen — unload them {removeSelf()}
I would suggest having your quadrants as separate groups and unloading a group when not needed or off-screen…
Finally, I would recommend getting it loaded on the device now and test early to make sure you do not have any memory or crash issues.
Just my $.02.
Best regards.
[import]uid: 10965 topic_id: 3154 reply_id: 10853[/import]
Is this also true for sprite sheets? I’m currently using 1024x1024 sprite sheets and I’m pretty sure I’m gonna need to have more than 3 loaded in memory simultaneosly.
Should I just use twice as many 1024x512 sprite sheets? Would that solve the issue? [import]uid: 10835 topic_id: 3154 reply_id: 10859[/import]
ssinger, my problem is I need to have all 4 quadrants visible at the same time (when I’m zoomed out). This is going to be an interactive children’s book, so I need the full view (entire page) as well as zooming in to a portion of the page to show some detail, but without it getting blurry. So I can’t unload any of the quadrants until we move to the next page. My test solution seems to work… but maybe it won’t under more strenuous conditions (after lots of page turns, etc.).
What I don’t understand, though, is that if I can display the entire 2048x1536 group (zoomed out), why shouldn’t I be able to replace it with a single image instead of having to use the group? [import]uid: 9905 topic_id: 3154 reply_id: 10934[/import]
If you architect your program using Ricardo’s DirectorClass and make each “page” a scene (see director class for info on that) you should be fine memory management wise. That is what I did for our ebook/advent calendar and we have 2 1024x768 images loaded for each page and no nowhere near causing memory issues, you should be able to have 4 without an issue is my guess.
Also, are you using pinch/zoom to achieve the zoom effect? I’m looking for some code for that and panning.
Thanks,
-Mark [import]uid: 9189 topic_id: 3154 reply_id: 10935[/import]
Thanks Mark! That was the plan! We’ll also eventually have additional spot animation, so I’ll definitely need to discard it all when we move to the next screen.
I don’t think we’ll do pinch/zoom on this, though we might change our mind on that. The plan was to do camera moves during the opening of the scene, and then leave the camera set on a wide shot so the reader could interact by touching various objects.
But this might help on the pinch/zoom:
http://developer.anscamobile.com/content/pinch-zoom-gesture [import]uid: 9905 topic_id: 3154 reply_id: 10947[/import]
Currently Corona supports 1024 square textures. Some devices support 2048. We’re adding support for that, but then your apps won’t work on all devices. [import]uid: 54 topic_id: 3154 reply_id: 10980[/import]
Eric, will there be a way to query the device to tell which version of the art we should be showing? Easy to make an iPad-only game. But on the Android platform, how would we be able to tell on each device?
If we do an iPhone version, I’d also need to know so I could switch to hires for iPhone 4…
[import]uid: 9905 topic_id: 3154 reply_id: 10986[/import]