first I tested on iphone :
1000X1000 texture - Work
1024x1024 texture - Don't Work (stretch texture)
2000x2000 texture - Don't Work (stretch texture)
1000x2000 texture - Don't Work (stretch texture)
After:
I tested a loop of single sprite (first with polyvector an after with drawsprite) over 150 sprite (128x128 px) load the iPhone crash ..... :S
This is the limit of GLBasic??????? :blink:
the limit of allocated memory is 600 kB????
I have 45MB memory free on iphone ...... :'(
Realistically, isn't a 512x512 sprite or texture map overly sufficient for the device screen size? :blink:
I use 1024x1024 sprite sheets (what ever you want to call them) all the time with no problems on the iPhone. 1024x1024 is (as far as I'm aware) the maximum texture size on the iPhone.
Quote
the limit of allocated memory is 600 kB?
Not sure where you get that size from, sorry. As a very bare minimum I have two 1024x1024 images loaded at any one time in my games. One for the backgrounds and the other for sprites, etc and have not had any issues at all.
Could you post some example code and image files which demonstrate this issue? :)
I think the iPhone texture limit is 1024x1024. It's strange that a 1024x1024 texture does not work, though.
everything is correct what you say
but now I have a question ...
if the limit on iphone is two texture size 1024x1024 (about 640KB of memory), as they have made this game?
Is a 2d game with large sprites and many animations...
their engine is optimized?
they do not have the memory limits of the iPhone?
http://www.youtube.com/watch?v=J5qrwzzM3Kk (http://www.youtube.com/watch?v=J5qrwzzM3Kk)
How many bits per pixel are we talking about here? A bitmap with 24 bit color usually takes 3 bytes per pixel which adds up to about 3 MB per 1024x1024 sheet unless there is some fancy realtime compression of textures on the iphone?
I use png 8bit compression.
Quote from: Ocean on 2010-Apr-21
Quote from: matchy on 2010-Apr-21
Realistically, isn't a 512x512 sprite or texture map overly sufficient for the device screen size? :blink:
depends on the application and on the minimum level of quality you're ready to settle for.
If it were the iPad or PC then it would matter.
It just seems more efficient, and most likely quicker, for the iPhone with 320x480 to use 512x512 for 3D textures or for large stitched scrolling backgrounds that are greater than 512.
As Qube said, 1024x1024 should work fine on the iPhone?
1024x1024 works!
There is a system to unload/load fastly the sprites???
for realtime switch animation....
Oh dear. For a street fighter, you might want to load the animation to show next (sequence) as one tile set.
The real street fighter will probably create compressed textures and directly load these packed data into the graphics card.
Quote
just load an empty sprite into the previous sprite handle - this IS documented...
Ocean
tell me where to find it in documentation ? ... thanks :good:
I tried this system:
Load Tile Animation (Deafult) Ready Stance (5 Frame)
|1|2|3|4|5| <- (Tiled Ready Stance Animation )
When i Touch the screen on IPhone
I load the animation Walk (5 Frame) and play it
When i dont touch the screen return to first animation (Ready Stance)
On PC work fine, but on iPhone stops until another image is loaded (1 ~ 2 sec - depend on the size of image)
there is no solution to my problem? :help:
try loading BMP instead of PNG, which *might* be slightly faster. I fear it's not going to be realtime, though.
I have not tested the speed loading of LOADBMP, but LOADBMP not have a unique ID number.
it works with an image and i have 2 players .... :whistle:
not LOADBMP that would be the background.
Try LOADSPRITE with a ".bmp" instead of a ".png".
If you got it working, please tell us what you did.
When playing around loading graphics, I noticed that I had problems using images that greatly exceeded the height of the screen but not the width. I was able to use a 1760x608 wide image, but not a 1024x800(image got squished), although I believe I also had squishing issues when using a 1024x600 vs a 1024x576(which I'm using now)
This probably just confusing things, but the working images were divisable by 16 (600 vs 576), but both are powers of 8. In relation, if I used a texture smaller than 16x16 in a 3d model the texture would not correctly fill the model face.
Quote from: Kitty Hello on 2010-Apr-23
not LOADBMP that would be the background.
Try LOADSPRITE with a ".bmp" instead of a ".png".
If you got it working, please tell us what you did.
I use:
- BMP - 8 Bit, Exact Palette 64 color (Frame size: 20 Kb)
- PNG - 8 Bit, Exact Palette 64 color (Frame size: 6 Kb)
I tested it in different ways:
Loop: Load single frame (PNG or BMP) -> Showscreen - > Load new frame
- Result: on the screen the FPS change between 40 to 100, but I see that goes to 20~25 FPS
Loop: Load Tile (PNG or BMP) -> Execute Tile -> Showscreen - > Load new Tile
- Result: Very Very Slow - stops for 1 second when loading Tile
I was hoping to find a way to get more memory .... :(
I also tested the difference of polyvector and drawsprite.
Polyvector is faster only if you use the function POLYNEWSTRIP , only if you use the same image (good for tile level or to clone an entity)
Use 24bit images, png files will be smaller and loading will be faster since the program won't have to decode the palette. Load up all your graphics before you do anything, or have loading stages between operation.