I was wondering what the best approach is to have good performance on all targets, mobile, web and desktop.
Is Tilesheet the way to go? What would I have to take into account?
Is there maybe an example project that is set up to support as many platforms as possible?
Thought this was an obvious question for a multi-platform development framework?
It really depends on your project, do you need to have a lot of going on the screen? If not then regular display list should work just fine.
If you want to display many objects on screen at once then tilesheet works the best, however I had some problems on flash with it so I was using copypixel on flash and tilesheet on cpp and neko. I don’t know how tilesheet behaves on html5 though.
Thanks! Well in my experience even in “simple” games the action on screen becomes more and more in the end e.g. by using fancy particle effects.
So I want to have a setup that can handle lots of objects.
So more recommodations are appreciated.
Profile your applications with hxScout and pool anything that has a ton of allocations and deallocations.
I’m hoping Tilemap makes people happy as an API, and we can finish building it to try and get a good approach for “lots of objects on-screen in a fast way!” done simply
Is there anything the community can help out with on that?
Try out the Tilemap API and post your thoughts.
Some more info on Tilemap would be fine. In the http://api.openfl.org/ I could not find it at all. I know I can have a look at how it works in the BunnyMark example, but still what I´m missing is a little background info on what it´s all about, why I should use it and what it does under the hood.
That´s what I´m (and probably lots of others) facing a lot of times with openFl. Not enough documentation about stuff, although it really got better already. What about writing at least a simple explanation about Tilemap telling the developer what it´s for and what it does in just a couple of sentences and linking to BunnyMark. Just so we don´t have to strife through the forums to find information we are then not even sure if they´re already outdated.
So what I´ve seen from the code it uses drawBitmap for Flash and Tilesheet.drawTiles for everything else, right? So is drawTiles also the fastest rendering method for HTML5?
Another question, because I´m not sure about this: Is the standard HTML5 compiler using PIXI.js, but at the moment only with canvas support, not GPU, right?
And another question What about https://github.com/matthewswallace/openfl-tilelayer? Isn´t its purpose similar to Tilemap?
I wrote a thing a while ago. It was using OpenFL legacy but I think most of the advice still applies. http://mojaworks.co.uk/smooth/
Read the “Tilemap” section here for more explanation