SeuJogo.com
 
 
 
 
 
 
 
 
 
Free Online Games HeavyGames
KickinGames
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

The Silverlight sound problem

by SeuJogo 29. June 2010 21:51

Many are still looking for a solution for the Silverlight sound problem. What are the problems and what is the solution?


People who tried to create a casual game in Silverlight, encountered problems when they added sound effects to the game. The time between starting a sound effect and actually hearing it, is unacceptably long. This is called “audio latency”.


Short effects, typically less than a second, sound good the first time, while they sound bad the second time when they are played. The source of this problem is not clear, however long sounds don’t have this problem. This is called the “short sound problem”.


Also, it is very hard in Silverlight to play music in an idle loop. An idle loop with the out-of-the-box MediaElement, plays a silence every time the music is repeated. The silence at the beginning is actually caused by the same audio latency described above.


The above problems exist in Silverlight 4 and lower versions.


The audio gap
The music compression format MP3, is standard encoded with a silence at the beginning – the audio gap. This is because the decompression code needs some time to get ready, like an engine which needs time to get started. Tools like WinLame may encode an MP3 without an audio gap at the beginning, but this does no good to Silverlight’s decompression code. An MP3 created with WinLame will sound bad.


The audio buffer
Silverlight uses an audio buffer internally, which needs to be filled with audio data before any sound is played. The size of the audio buffer is measured in time, and it costs exactly that time to fill the audio buffer, before any sound is heard.

 

Reducing audio latency
The audio latency is caused by the audio gap from the music format and because of the audio buffer. So if we want to decrease the time between calling the Play function and actually hearing sound, we need to handle both the audio gap and audio buffer. Now obviously, a latency of 0.0 is impossible, otherwise Microsoft would have provided this with Silverlight.


The solution: VorbisPlayer
The solution is to choose for an audio format which is gapless. Second, the default length of the audio buffer must be decreased. And for a seamless idle loop, we must stream the next music part into the audio buffer, right after the previous music part has finished.


Ogg Vorbis is a music format which can be encoded without audio gap, however it is not supported by Silverlight. However, Silverlight does allow developers to implement their own audio decoder.


The VorbisPlayer provides exactly the solutions described above. More important, the VorbisPlayer is easy to use, for not so technical people.


The VorbisPlayer allows low latency for sound effects, much lower than Silverlight provides out of the box. Because of the used technique, the short sound problem is also solved. Also, the VorbisPlayer has an easy function to invoke a playlist of music, which will be played seamless without gaps in between.


The Silverlight VorbisPlayer can be found on Codeplex: http://vorbisplayer.codeplex.com/

Tags: , , , , , ,

Technical

VorbisPlayer release 1.1.0

by SeuJogo 27. June 2010 01:05

Great developments on the VorbisPlayer. To reduce the download time of Slengo, the bitrate of all sound in the game was reduced from 44.1Khz to 16Kh. Although the quality of the sound is lower, it still sounds quite good. 1.87Mb of data was reduced to 0.99Mb.


Another advantage is that the VorbisPlayer uses less CPU at this bitrate, and performs much better. On high-end machines, people did not have much problems with performance, however on lower end machines the sound could stutter. With a lower bitrate, this problem solved for low-end machines. The VorbisPlayer was modified to allow for lower bitrates.

A new release of the VorbisPlayer has been uploaded on CodePlex:

http://vorbisplayer.codeplex.com/

Tags: , , , , , ,

SeuJogo News | Technical

Inspiration – Originality, Nostalgia and first impression

by SeuJogo 23. June 2010 23:05

How does a game get you hooked? Well, it needs virtues.


Blastwave
Blastwave is a crazy but well done idea. It has very nice graphics. But what’s really good about the game is that it’s very original. You are God, and with your hand of God, you need to create whirlpools in the water, to attract floating people. You navigate these people through a hurdle of obstacles, while collecting bonuses. The nice thing is, each level introduces a new challenge for you to take.

 

The guy on the top-left, needs to go to that green thing at the bottom-right


Pixel Shuffle
Pixel games are for the older players, who think with nostalgia back to the eighties and early nineties, when graphics were simple and your imagination was part of making the game. In Pixel Shuffle, the player needs to shuffle the pixels in the playing field, so that they represent the target graphic. As you only shuffle vertical bars of pixels, the ordering is not very hard. Only you need to remember what the graphic was, which you try to recreate, which makes the game a bit harder.

How can such a nice game point the finger at you?

 

Up-Beat
Up-Beat is one of those music games where you need to play along with the computer. This time it’s piano practice. This game absolutely makes a good first impression. First level in category “easy” is “The Weekend” by Michael Gray. Now you get your first impression. Good graphics, fun gameplay and very cool music. I love that song.

I can’t wait for the weekend, to play this game all weekend

 

Tags: , , , ,

inspiration

Powered by BlogEngine.NET 1.5.0.7