question about how many actors in a scene is aloud?
CodeMonster
ACT, AustraliaMember Posts: 1,078
so i was wondering since im making a big platformer game, how many actors can i have in one scene without it being laggy would you reckon? each block of ground 140 width and height 12, (these are ground actors/platforms) and the actor well is two actors being played at once basically, so im just asking how much of these platforms could i put in one scene without it going cray cray ?
Comments
A 12 x 140 (assuming a 12 x 140 pixel image) will use a 16 x 256 pixel chunk of memory, not normally a concern but if you are going to have hundreds of actors on screen it will soon add up.
Also even with a big scene (bigger than the screen) you don't need to have all your actors 'live' at once, they could be spawned just off screen as you approach them (and destroy them once they leave the screen area), so the target device only really has to deal with what's on screen.
GSINVENTION FREE TEMPLATES
But 60 actors @ 16 x 256 is 245,760 pixels, so by using such an inefficient size you will be using over twice the amount of memory you really need.
Your right though that for efficiency, if you could make/use platforms that are 16x128 instead of 12x140 they fit better into memory.