Hello Guest

Author Topic: Most efficient way to have large level -  (Read 3982 times)

bluelotus

  • Newbie
  • *
  • Posts: 18
    • View Profile
Most efficient way to have large level -
« 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 .



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Most efficient way to have large level -
« Reply #1 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.

bluelotus

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Most efficient way to have large level -
« Reply #2 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.