Best practice for good perfomance on various targets

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?

Noone?

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.

1 Like

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 :wink:

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 :slight_smile: 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

http://www.openfl.org/blog/2015/10/06/october-update/