stretchsprite or polyvector

Previous topic - Next topic

MrPlow

Hi

Just wondering if the virtual screen setup benefits from switching from stretchsprite to polyvector on Android

Anyone notice significant benefits?
(btw - my app has to use smoothshading true or its a mess - I know smoothshading is a bit of a hit)


Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Ian Price

I've not really noticed any significant difference with those two commands on any format tbh. I tried them both with AquaVenture on Android - OUYA and GameStick and webos (pre->TouchPad) - FPS didn't really alter no matter what I used.
I came. I saw. I played.

MrPlow

Thanks Ian...

Didn't seem to notice any difference either.

I'm happy to use it as long the polyvector has the same compatibility as stretchsprite across android devices.
:)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

But if you remove virtual screen and draw anything diirectly, You do a lots better perforcement.

Im mostly uses polyvector to draw tiles etc to reduce number of draw calls. But often I'm do mix.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

You still have to GRABSPRITE though if you don't use a virtual screen and that eats CPU too. Or are you doing something different?

Polyvectors aren't always quicker than sprites for tiles, even if you use POLYNEWSTRIP. You have to test per device. :(
I came. I saw. I played.

kanonet

Of cause you could also stretch each sprite individual, using STRETCHSPRITE or POLYVECTOR, so you wont need offscreen or GRABSPRITE at all. But I dont know how this works performance wise.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

spacefractal

#6
For big textures there was a quite big advance using polyvector if you draw it more than once. Framerate did fall very much, so it's depend on content.

In greedy mouse I'm for gain double speed using backbuffer directly without never use grab sprite or virtual screen.

I'm in some instance used 2kb or even 4kb textures and used layers.

So it's all depend on content and size.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

Quoteusing backbuffer directly without never use grab sprite or virtual screen.
How exactly were you doing that?
I came. I saw. I played.

spacefractal

#8
I'm just either use zoom sprite, strect sprite or poly vectors directly.

Btw look in the android virtual screen rutine for the paint image function.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

kanonet

Do you get extra speed boost, if you pack all your small sprites into one big texture atlas and draw this with polyvector? On desktop that should be fast, but I dont know much about Android performance.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

spacefractal

There was various issues with virtual screens, which is why im not want to uses them. one was the big performance drop. Another issues was alpha multiply issues, which im newer got a workaround. So im quickly dropped virtual screens again and imply my own scaling drawing functions. But for me its depend on content what there is best. Sometimes im uses POLYVECTORS. Sometimes im dont. This can been in various reasons.

For tiled background im allways use POLYVECTOR to avoid hotspot issues when the graphics got scaled (and grant framerate), or the game draw insane many layered tiles (they are 2-3 layed in Greedy Mouse as well 2 layeres in Karma Miwa).

Howover im cant uses colored POLYVECTORS as well alpha on POLYVECTORS at all, which can get a large performance drop. so uses ALPHAMODE with care, but instead uses alpha on the assets its self instead. in Karma Miwa im do checks framerate. if its drop under 30fps, then the first thing the game do is disable the color POLYVECTOR on the font.

You can do enable or disable SMOOTHSHADING. But my games does rarely uses SMOOTHSHADING true really and newer on tiles.

But in the end im dont use GRABSPRITE or virtual screens in none of my games. Instead im created scaled based paint functions.

PS. Some users did have a insane big performence advance when only doing POLYVECTORS, but that is not allways possible.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

bigsofty

Quote from: kanonet on 2014-Nov-13
Do you get extra speed boost, if you pack all your small sprites into one big texture atlas and draw this with polyvector? On desktop that should be fast, but I dont know much about Android performance.
Yes, batching prevents the GPU texture cache from being thrashed, this is especially true on mobile divices with limited VRAM.

If you want the most speed, dip into a little C and OpenGL, keep within GLBasic 1.x OpenGL ES spec. and use batching with degenerate triangle strips in vertex arrays for your sprites. Faster than VBOs IIRC. Shaders would be faster but there's no mobile support.
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)

spacefractal

its mightnot been that much impact when using virtual screen, but there is quite much impact when drawing directely to the backbuffer as im does in my games.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Cheers guys
I would normally do a createscreen 0 and usescreen 0 then stretchsprite that but now I will use the polyvector instead of the stretchsprite.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs