Frame settings and timing with BGE

Hi,
I am trying to incorperate some sound effects into my project, and I would like to know how I can synchronise the sound effects to the frames.If I have a 200 frame animation, how many seconds would it be. Is there a conversion chart somewhere I can look at?

The reason I ask is that I must be exactly on the mark with my sounds and my animations.

Thank you.

60 frames in bge = 1 second
so 200 frames = 3 1/3 seconds.
my question is, how do logic ticks work?!

Thank you very much Sammaron, you saved my project.I do not know what a logic tick even is. I am still new here.

Just to add a bit more info to Sammaron’s excellent answer, animations in the BGE run at a rate of one frame per logic tic. The normal speed of logic tics is 60 tics per second. The framerate of your animation is not the same as the framerate of your game, though. Even if your game is running at 25 frames per second, the logic tics are still being processed at 60 frames per second, so your animation should still run at the proper rate. Of course, if the computer doesn’t have sufficient resources, the logic tic rate will slow down, causing your animation to slow down as well. I wouldn’t worry about logic tics slowing down unless you were getting less than 12 or 15 frames per second (though I don’t know for sure at what point they do begins to slow down).

However, if you select “Enable All Frames” from the Game menu, the game speed changes from one frame per logic tic to one logic tic per frame. So if you have a fast system, capable of rendering your game at 300 frames per second, for example, your logic tic rate would increase from 60 tics per second to 300 tics per second. So, as long as you want sounds to synchronize with animations, do not turn on “Enable All Frames”.

Hope that helps.

Thank you blendenzo, That information is very helpful.
I wanted to use PyGame for my sounds.I am guessing then it would be impossible to sync a large animation to a sound. Can anyone suggest a real time rendering engine that would allow this? I need stereo sounds as well as 3D positioning.

Thank you.
P.S.(Blendenzo, you have a cute avatar.)

You might be able to sync a large animation to a sound track if you get the current track position of the sound through PyGame. You can do this with pygame.mixer.music.get_pos(). If you drive your animation IPO with a property, then you can do a bit of simple math to set the frame property based on the current position of the track. You can find more documentation about music.get_pos() here:

http://www.pygame.org/docs/ref/music.html#pygame.mixer.music.get_pos

Thank you again Blendenzo. I will try that out. I am using an armature, but I can see it has a property actuator I can use too.