Pickup objects

Posted By: Alan

Pickup objects - 08/06/10 12:49

Hi,

I'm currently working on a Jump'n'Run project. Many mechanics are already in place, so I'm starting to do the pickup-stuff now, you know, all the little items you want to collect, like the coins in Super Mario games.

So my question is: what can I do in order to keep the CPU resources every item needs as small as possible? To begin with, I did the following:

1) Use sprites instead of models as often as possible.
2) Set their UNLIT flag and apply the unlit material.

Can you do more to preserve CPU power and keep the framerate high, although there are 100 and more such items in the same world/map? I would also like to have animated sprites for pickups, but having an animation cycle going on for EACH ONE seems very power-consuming to me - is there an alternative?


Greets,


Alan
Posted By: Ditje

Re: Pickup objects - 08/06/10 14:29

Hi

100 and more items shouldn´t decrease speed. It`s just 10% of possible.

I `ve got no own hint, but one from ratchet: Don`t create and remove ENTITIES. Just hide them and reuse them later.

Cheers

Ditje
Posted By: TrackingKeks

Re: Pickup objects - 08/06/10 14:56

Yes Ditje is right: hide and show the new entities dynamical.
Then it shouldn't be a problem to handle 100 entities. Besides you don't need 100 animations. Only place the animation sprite new when the player picks an object up.

@Ditje
Quote:
100 and more items shouldn´t decrease speed. It`s just 10% of possible.


It is possible to handle more than 1000 entities...^^
Posted By: Alan

Re: Pickup objects - 08/06/10 15:20

Thanks for reply. What do you think which image format renders faster - TGA or PNG?
Posted By: Rei_Ayanami

Re: Pickup objects - 08/06/10 15:32

I would use PNG, cause there are small, and do not need an extra alpha channel(if you need one) - and from personal experience, i think they are better laugh
© 2024 lite-C Forums