[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: How much blit costs?



On Thu, 15 Jun 2017 11:09:21 -0700 (MST)
babaliaris <babaliaris.nikos@xxxxxxxxx> wrote:

> bw thanks for your answer. The problem is that in the future sprite
> objects would be able to have a Brain object which the programmer can
> attach in order to give functionalities to a sprite object. Because
> my engine does not know which sprites have brains, I must go through
> all of them and run any possible brain scripts every frame.

Well, that is trivial to solve. Just keep a separate list of sprites
that have brains. Also, you only need to call the brain code on them,
and not blit them.

-- 
Radomir Dopieralski

-- 
Radomir Dopieralski