Friday, March 30, 2012

Friday Post 6

Last week I must have been really out of it.

Fixed the sound bug where it wouldn't play twice; all I had to do was set the frame position to 0 before playing. Found that after looking at the documentation for all of 30 seconds.

I fixed timing quite a bit too. It turns out I was starting my timer at the beginning of the constructor, so it was doing all the file io and initialization on the clock. Dur. Put the timer start as the last thing, and what do you know, it works.

There are still some minor timing issues, which I will investigate next time, like dealing with the discrepancy between rendering and audio playback. I also want to try the Java Mixer for synchronization of the two tracks, but I'll have to read up on how that works.

Tests today yielded positive results on both the screen and the monitor.

Friday, March 23, 2012

Friday Post 5

I've been slacking on the posting lately.

Today was one of those days where I worked a lot and got a little done. I've been having timing problems, which is so important to the game. The problem is not that it doesn't work, but that it is inconsistent, so sometimes it will break badly.

I think the problem is in my sound manager class, because there is a certain amount of lag involved that could be throwing off the timing. The blobs seem to be moving at the right speed and in the right intervals, and the data in the data file seems correct, so I guess it must be the sound. If its not the sound, then theres a problem with how I'm placing the blob. I bet its a combination of both.

Next time I will re-work and optimize the sound system. In addition to fixing the timing, there is also a problem with playing small interface fx, as they won't replay after playing once.