Better Audio in IE<9 using SM2 instead of Audio.js

Discussion and feedback on Construct 2

Post » Thu May 31, 2012 11:47 am

So for those of you who've been tracking my ventures into making IE<9 work with Construct 2, i recently got audio working with Audio.js:

http://kolber.github.com/audiojs


But because I had to hack it to use its functionality that creates unnecessary dom and flash elements for every sound, it was horribly slow and the sounds had a lot of delay.

So today I decided to replace it with Sound Manager 2:
http://www.schillmania.com/projects/soundmanager2/


I wrote a lot simpler code to make the connector, here it is:
http://jsfiddle.net/7Uvm9

And you can see it in action here:
mcgraw-hill.faceyspacey.com/rocket-blast-3-v12


So again, my guess is that soundManager 2 is simply faster and doesnt require creating tons of elements on the page. Basically it's designed to be called via javascript to trigger flash sounds, whereas Audio.js is designed to turn <static> audio elements already on the page into flash audio players.


My last thing to perfect IE<9 using flash canvas is to prevent some flickering and blinking. If anyone has an ideas of what to do to stop it, I'd greatly appreciate it. Previously when I first got it to work using the Space Blasters demo, i thought it was because the game was so action-packed and fast paced. But now I have a very simple game with very little animation, and very slow animation at that. So I'm wondering if there is anything in C2 itself I can do to make the game basically appear simpler and smaller to Flash Canvas??
B
4
Posts: 49
Reputation: 854

Post » Thu May 31, 2012 1:14 pm

@faceyspacey
Are you using C2 v92 ? and did you check this blog ?

http://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

the slow animation frame, might if you used older version of C2, where images loaded separately which may delay and slow some animation frame, depending on cpu memory and net speed.prinsukun2012-05-31 13:15:26
B
22
S
3
G
5
Posts: 141
Reputation: 5,117

Post » Thu Jun 14, 2012 12:55 am

Even though it's not a pure html5 solution, but it works for almost all browsers. I'm using it because most of my games will be delivered via different browsers.
B
9
S
4
Posts: 14
Reputation: 1,436

Post » Thu Jun 14, 2012 6:53 am

i fixed the flickering with the following techniques provided by the maker of flash canvas:

https://groups.google.com/forum/?fromgroups#!topic/flashcanvas/PrQbXgA6ftY
B
4
Posts: 49
Reputation: 854

Post » Sun Jul 08, 2012 10:47 am

"I wrote a lot simpler code to make the connector, here it is:
http://jsfiddle.net/7Uvm9"

could you explain where to put this into my C2 code? I am not doing a game, but some educational material, and sound would be great everywhere.
B
5
Posts: 3
Reputation: 931


Return to Construct 2 General

Who is online

Users browsing this forum: tomi71 and 11 guests