I believe the sound lag issue is fixed in 1.3 (as long as you use a fixed random seed for your sounds). At the moment Codea generates the sound effect each time, in 1.3 it uses a cache for sounds that have been generated in the past.
Thanks! Now that is exciting news. Then perhaps I’ll be able to add the titular “swoosh” when passing close by asteroids as initially planned.
Though in theory I thought calculating movement based on DeltaTime should result in pretty smooth animation regardless of the slight sound lag, but apparently not? Or maybe it’s just too easily noticeable in this kind of game.
On iPad 2 myself, but then again the sound lag on picking up gems is not all that bad, as I guess you kind of expect something to happen when you pick it up something.
In 1.3, will we be able to “pre-cache” sounds without playing them? Say, to move the lag to the loading when framerate doesn’t matter all that much. Started thinking about background music as well, but I guess at that point I should probably move on to Objective-C anyway.
We’ll see after 1.3. If you try it out and feel it’s still necessary to pre-cache them, perhaps we can add it. Or we can add the ability to play them at 0 volume, essentially just caching them.
Hi @Drablos, I enjoyed your game and got 300 points!
I have found with sounds that using DeltaTime will keep your object moving at the right speed, but it still will jerk across the screen during periods of high processing. This is because it has to skip some frames rather than play each one and slow down. So without using DeltaTime the object will be smoothly animated,but will sloooooow down during high processing.
@Simeon, just on the forthcoming sound API, perhaps I didn’t see it, but I can’t find an explicit volume control for sfxr. I did simulate volume with some changing of enevlopes etc, but wondered if that was something extra you would need to add?