Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Background music and .LoadActor3D() method  (Read 2583 times)

0 Members and 1 Guest are viewing this topic.

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Background music and .LoadActor3D() method
« on: April 06, 2007, 08:52:57 AM »

Hello! The trouble just is in music, while actor3dx objects have been loading. Sometimes the music are gone in cycles or temporary interrupted and continued playing then. This time players (like Media Player Classic or VLC) are working properly. Is way to play music without such awful damages?

Because of the music after all I decide to load all actors at the game launch. So the it is clear, but then new problem is appeared. If several actor3dx objects are loaded (even .Active property is FALSE), the game shows 30 FPS instead of 50 one. As I understand 20 FPS "are eaten" by loaded actor's scripts. Can I "freeze" or temporary detach these scripts?

Sorry for my English, but I really don't know how to describe this trouble better than it is :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Background music and .LoadActor3D() method
« Reply #1 on: April 06, 2007, 09:07:15 AM »

Hello! The trouble just is in music, while actor3dx objects have been loading. Sometimes the music are gone in cycles or temporary interrupted and continued playing then. This time players (like Media Player Classic or VLC) are working properly. Is way to play music without such awful damages?
You can increase the sound buffer size using Game.SoundBufferSize. But if loading the actor takes so much time you should consider redesigning them and perhaps loading some animations on-the-fly when they're needed.


Because of the music after all I decide to load all actors at the game launch. So the it is clear, but then new problem is appeared. If several actor3dx objects are loaded (even .Active property is FALSE), the game shows 30 FPS instead of 50 one. As I understand 20 FPS "are eaten" by loaded actor's scripts. Can I "freeze" or temporary detach these scripts?
You can detach script using, well, the DetachScript() method. Or you can modify the script so that it's doing the stuff it's doing only when its actor is active.



Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: Background music and .LoadActor3D() method
« Reply #2 on: April 06, 2007, 09:39:16 AM »

Thanks! I'll try my best ;D
Logged
 

Page created in 0.044 seconds with 23 queries.