is it Possible to use PVR images on GUI Elements?
by Hugo Munoz · in iTorque 2D · 11/01/2011 (8:15 am) · 8 replies
Hey guys does anybody knows if it's possible to use compressed pvr images for GUI Controls like for example GuiBitmapCtrl ?
Thanks in advance
Hugo
Thanks in advance
Hugo
About the author
#2
11/02/2011 (6:17 am)
It seems to work for me, tested it with a GuiBitmapButtonCtrl. I removed the .png file and only kept the .pvr version, and it still showed up on the device.
#3
@Simon: Xcode has a tendency to leave files from a previous compilation if they're no longer in the project. Did you clean it completely?
11/02/2011 (7:04 am)
My GUI elements are generally sprites, so that definitely works ;)@Simon: Xcode has a tendency to leave files from a previous compilation if they're no longer in the project. Did you clean it completely?
#4
Ronny, I agree that using sprites is better and I almost never use gui-layers anymore, but instead a second sceneWindow that acts as a GUI.
11/02/2011 (9:46 am)
Tested it again, this time I altered the .pvr version of the image so that it was clearly different than the .png version, and the .pvr version was the one that showed up on the device when playing.Ronny, I agree that using sprites is better and I almost never use gui-layers anymore, but instead a second sceneWindow that acts as a GUI.
#5
11/02/2011 (12:03 pm)
Yeah, ditto. Only using regular GUIs when in need of text elements, pretty much.
#6
Time to use pvrs for my GUI!
11/02/2011 (12:22 pm)
Awesome. Sorry for the wrong info. Thanks to Ronny and Simon for correcting me. Time to use pvrs for my GUI!
#7
I believe using a second sceneWindow is very heavy for the iOS device, that could work for smaller games but, if you work on a big game, lets say a platformer with a lot of enemies on scene an huge levels, I think that will be slow, any thoughts on this ?
Thanks again in advance.
11/02/2011 (5:25 pm)
Thanks guys, that was useful info, I got a final question, is more like advice I want from you, so here it goes, what do you think is better (performancewise) using an Standard GUI Layer compressed in pvr format or a second sceneWindow that acts as a GUI, does anybody ever made some performance test ?? I believe using a second sceneWindow is very heavy for the iOS device, that could work for smaller games but, if you work on a big game, lets say a platformer with a lot of enemies on scene an huge levels, I think that will be slow, any thoughts on this ?
Thanks again in advance.
#8
(No, really - how bloody fast does a platformer need to move, as long as it can keep screen updates somewhat even? ;)
The size of the level shouldn't matter if you're viewing a small portion at a time. I think some tests are necessary to give us numbers, though. Any volunteers with time?
11/03/2011 (4:21 am)
I haven't benchmarked either, but I know scene windows have some performance loss (but not excessive). This would be made up by using graphics from one sprite sheet, though. That sort of manual batching speeds things up. If by "a lot" you mean 60 enemies, I know that works at least. Not top frame rate before 3GS, but I honestly don't think you need more than 30fps to have satisfactory performance for the majority of users.(No, really - how bloody fast does a platformer need to move, as long as it can keep screen updates somewhat even? ;)
The size of the level shouldn't matter if you're viewing a small portion at a time. I think some tests are necessary to give us numbers, though. Any volunteers with time?
Torque Owner Johnny Vo
*updated* GUI supports PVR images.