View Single Post
Old 11-30-2004, 03:44 PM
vjonshih vjonshih is offline
Join Date: Sep 2004
Posts: 15
You rock, Farshid.

Thanks for your help.

After much commenting out/commenting in, etc. -- we've figured out the MAIN cause of the lag -- something we didn't expect.

So it turns out that we have these emotion faces that we texture onto the heads of the avatars on demand. The code in the person class for the "changehead" method looks like this:

def changehead(self, emotion):
texture = self.prefix + '_Bio_UV_Head' + emotion + '.jpg'
newtexture = viz.add(texture)
self.head.texture(newtexture, 'geom_0')

The timers have nothing to do with this lag -- if I designate a key to replace the head texture of any given avatar -- and press a bunch of the keys at once to change multiple heads...the Frame Rate goes from 60fps to 30fps to slows down DRAMATICALLY. Do you know any way to get around this? Or what's causing this?
Reply With Quote