Hi Gideroseans,
I am still learning a lot about Gideros and wondered about best practices on performance. One thing that came to my mind is how to efficiently draw an (ridiculous) amount of stuff to the screen to I tried to port the infamous Bunnymark from Pixi.js.
However, I was not very successful because framerate drops quickly after approximately 3000 bunnies so I would like to ask you experts what could be improved in the code to make it more efficient. Hopefully, this will help me understand more about how Gideros works (for example I am not sure how draw batching works in Gideros, is it automatic? or can it be enabled somehow? Maybe there are better alternatives to Pixel? Maybe my Lua is just plain bad? Lots of things come to mind...) So I would be grateful for some tips!
And as a related question: how do you usually profile your code in Gideros? Any Tips or libraries in this direction?
Thanks a lot for your time! [-O<
EDIT: This is probably overkill and also completely unnecessary for real-world usage, but I wonder if we can go near there:
http://www.themozokteam.com/playground/frameworkstest/ O:-)
...just for comparison. Also I am on a MacBook, so these things are far away anyway, but I am curious...
Comments
so i think this specific test where other frameworks do tilemapping (or batching) can beat gideros.
or can we do similar tilemapping in gideros somehow?
i'd also be interested in how fast we can make this test, but i don't see any clear way to improve (changing from bitmap to pixel did not change the speed much)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: hgy29
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: stetso, SinisterSoft, muro
Likes: SinisterSoft
Thanks a buch, this is very cool.
Just out of curiosity: what is so specific about the rendering of the particles that makes it so much faster (maybe reusing the same texture efficeintly somehow?) and can that be somehow be applied to the other types as well? Since I just started out, I am sometimes confused about different Types existing for similar purposes (Bitmap and Pixel, Shape and Path). The subtleties are not always clear to me...
But the particles version is pretty cool! Thanks ^:)^
Likes: stetso, hgy29, muro
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: hgy29
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://deluxepixel.com
one can draw one mesh with plenty of squares (pairs of triangles) where on each square the texturecoordinates are set to the corners of the base texture. actually i use exactly this same method to have textured vector brushes in my animation app and it's quite fast (although i don't change the vertexcoordinates during time, which would be needed for bunnymark).
Fragmenter - animated loop machine and IKONOMIKON - the memory game