View Single Post
  #7  
Old 11-30-2004, 03:44 PM
vjonshih vjonshih is offline
Member
 
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)
newtexture.wrap(viz.WRAP_S,viz.REPEAT)
newtexture.wrap(viz.WRAP_T,viz.REPEAT)
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 10fps...it slows down DRAMATICALLY. Do you know any way to get around this? Or what's causing this?
Reply With Quote