Polyvector - texture 1000x1000 pixel limit???

Previous topic - Next topic

Kyo

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 ......  :'(

matchy

Realistically, isn't a 512x512 sprite or texture map overly sufficient for the device screen size?  :blink:

Qube

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? :)

Kitty Hello

I think the iPhone texture limit is 1024x1024. It's strange that a 1024x1024 texture does not work, though.

Kyo

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

Moru

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?

Kyo


matchy



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.

bigsofty

As Qube said, 1024x1024 should work fine on the iPhone?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kyo

1024x1024 works!
There is a system to unload/load fastly the sprites???

for realtime switch animation....

Kitty Hello

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.

Kyo

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:

Kyo

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)


Kyo

there is no solution to my problem?  :help:

Kitty Hello

try loading BMP instead of PNG, which *might* be slightly faster. I fear it's not going to be realtime, though.