2D Toolkit Forum

2D Toolkit => Support => Topic started by: bluelotus on May 16, 2013, 10:16:03 am

Title: Most efficient way to have large level -
Post by: bluelotus on May 16, 2013, 10:16:03 am
Hi Guys,

Loving the 2dtoolkit and developing.
Got a Question about the best way to do large levels.

For the background (grass),
Is it better to have 100 sprites(128 by 128) all lined up like tiles?
Or a single massive sprite( that repeats the texture? )
Or 10 large sprites that repeat the texture?

Also,
Is it worth checking the sprites and setting renderer.enabled = false for those that are off screen?

Would be great to get some ideas on this before I start coding/building.

Cheers,

Chris .


Title: Re: Most efficient way to have large level -
Post by: unikronsoftware on May 16, 2013, 11:12:17 am
For 100 sprites, just create them and don't bother doing any optimizations. If you're really concerned about it, you can add them into a static sprite batcher and commit. That will create 1 mesh. Or use the tiled sprite if its regular.

You'll need a LOT more than 100 objects before it becomes a problem.
Title: Re: Most efficient way to have large level -
Post by: bluelotus on May 18, 2013, 11:57:50 am
Ok thanks,

Ill give it a go.
Ideally there will be 250 - 300 sprites for the level and 80 animated sprites for the entities in level.
Have to see how we go with this.

Cheers,

Chris.