60FPS with iPhone mode Xcode viewer
And only 30FPS with iPhone retina 4 and 3,5
I have read all about images and resize.
What i have made bad?
My project was made iPhone with res independe checked.
All screen size are 568x320
I have read all about images and resize.
What i have made bad?
My project was made iPhone with res independe checked.
All screen size are 568x320
Comments
And, if i drop some background with 568x320 why i lower to 30fps?
If i use backgrund image 512x256 i get 60FPS
It is normal that problem? if i have screen size 1136x640 how can i do it?
I can get 60FPS with a 1024x256 size, the problem is with higher height
640x320 background in a project res 568x320 gets 60fps... i cannot understood
Images files take up fixed memory sizes, they will fit into the smallest size they are able to fit into, if they are bigger than one of the these fixed sizes (even by 1 pixel) then they must use the next biggest size.
These fixed sizes are:
8 / 16 / 32 / 64 / 128 / 256 / 512 . . . etc etc
So, if an image size is . . .
119 it will become 128
120 it will become 128
121 it will become 128
122 it will become 128
123 it will become 128
124 it will become 128
125 it will become 128
126 it will become 128
127 it will become 128
128 it will become 128
129 it will become 256
130 it will become 256
131 it will become 256
132 it will become 256
.
.
.
.
.
.
249 it will become 256
250 it will become 256
251 it will become 256
252 it will become 256
253 it will become 256
254 it will become 256
256 it will become 256
257 it will become 512
258 it will become 512
259 it will become 512
260 it will become 512
261 it will become 512
So, your files . . . .
568x320 will become 1024x512 = (524,288) = 30fps
512x256 will become 512x256 = (131,072 pixels) = 60 fps
1024x256 will become 1024x256 = (262,144 pixels) = 60 fps
hi guys, i have the same problem of @mrpacogp.
My project is iphone landscape with resolution indipendence checked, my backgrounds are all 1136x640 and when i import them they became 568x320, so in which size i have to make these images work fine and get 60fps
thank in advance.
A 1,000 x 1,000 image sitting still in the background won't be much drain on the processing power of an iPad - but 10 images at 128 x 128 all flying around the screen with dozens of constraints and rules and collision behaviours (etc) might bring the iPad the it's knees - i.e: there is no image size that will automatically give you 60fps.
1136 x 640 pixel images are held in memory by the iPhone as 2048 x 1024.
1136 x 640 = 727,040 pixels
2048 x 1024 = 2,097,152 pixels
That means a 1136 x 640 image is using up a section of memory close to x3 the size of the actual file.
You will never be able to make the project lighter than you can.
I don't know anything about your project (so my advice might not be applicable to how you have your project set up) but a 1136 x 640 background can be sliced up into 5 pieces as follows.
1 x 1024 x 512 image.
1 x 1024 x 128 image
1 x 128 x 512 image
1 x 128 x 128 image
Which would all come to:
1,152 x 640 = 737,280 pixels, which is very efficient as it's only 10,240 pixels larger than your original image - rather than being 1,370,112 pixels larger (1136 x 640 held in memory as 2048 x 1024).
But i have another question.
Ok, i use the correct size for backgrounds.
Start a project for legacy iPhone (for use as 3gs and 4 y 4s)
Create a background, size screen are 480x320, background with 480x320
When i test it on xcode viewer with iphone 3gs take 60fps, and on iPhone 4 and 4s only 30fps, why? iPhone 4 is 480x320 and 4s 960x640 really?
edit: LOL! I`m very stupid, is not iphone 3gs, is iphone4 omg!! jajaja
Then, why get with the same background 60fps selecting iPhone on xviewer and 30fps selecting iPhone (retina 3.5)
But, i have on screen with one background 512x512 and get 60fps.
Change scene, another background with same size and get 30fps.
(i have used one actor and put it on scene, and say size 480x320, i have to change scene size then if device screen are changed?)
Still testing...
Put 4 actors on first scene (menu) get 60 fps.
Put background 512x512 and downgrade to 30fps.
Change device to iphone 4 and upper to 60fps...
I`m reading another time all of this.
Then in xcode viewer, iphone retina 3,5 inch is iphone 4s or iphone 4 too and
in xcode viewer iphone only are iphone 3gs?
in xcode viewer iphone retina 4 inch iphone 5
If on xcode viewer, iphone and iphone retina 3,5 inch, i have 480x320 device screen, why with same background got 30fps on retina and 60fps on iphone 4?
The size of your actors does not have an absolute and definitive effect on how fast your game will run - you cannot simply look at how big someone's background image is in their game and then say how fast it will run - lots other factors are involved - the size of your actors is just one part of the formula.
Eg: Here is a 640 x 480 image - could you please tell me how fast my game will run, 30fps or 60 fps ?
. . . you say you have two scenes . . .
The first has a background @ 512 x 512 pixels and runs at 60fps.
The second scene has a background @ 512 x 512 pixels but only runs at 30fps.
. . . but are these scenes simply static images, pictures in the background with no movement, no other actors, no code, no rules, no constraints, no collision behaviours, no attributes, no text . . . (etc etc) ?
Look that, a project for iphone 5.
On iphone 5 take 30fps, and on iphone 4 and 4s take 60fps without doing nothing.
: (
Maybe ask someone who has both an iPhone 4 and iPhone 5 to see if they get the same result.
With your image, i create an actor with 640x480 and put on scene and same problem.
Still working on that.
I can't understand why with same background, on xcodeviewer, you get 60fps and change hardware device to retina display only 30fps.
How can i detect the device is changed iphone to iphone retina 3,5 inch and do anything with that background.
I recently changed to a little square and make it bigger with tile property and same issue...
Same GS Project. Same Scene. Same Actors and all.
Open Xcode, GS Viewer.
Run project.
In one select iphone 4 inch Retina and get 30FPS.
After select iPhone w/o Retina and get 60FPS.
Attach the two screens but the memory and all is identity...