Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
3D sound library for CC

csp-games
Guest
Quote
2021-02-14 19:09:39

I officially announce here the release of a 3D sound library for CC. After I have experienced that in the WebGL target the 3D sounds are played as 2D sounds, or normal sounds, I felt the need for 3D sound support on this platform was eminent.

I then wrote a standalone 3D sound library for JS. Then I put it into a CC exported game. It's an interesting project as it shows how you can run an other Script in parallel with CC and have the two exchange information. In this case camera orientation and position is given to the sound library by using global variables that are declared outside of CC. I put it on itch.io, but this also showed that the CC keyboard handler, as well as the one inside the 2Djumpnrun sample extension, don't work on itch.io, which is pitty. (If time permits, I'll write a solution)

However, you can test the audio library on itch.io, you can rotate the camera and experience the 3D effect, just can't walk around:

https://jfkeo1010etc.itch.io/mini3dsoundenginejs-meets-coppercube-game-engine

You can also download this project as ZIP here:
https://jfkeo1010etc.itch.io/mini3dsoundenginejs

it contains two html pages, index.html, which is the modded CC export, and mytest5.html, which is the original CC export without sound.

By comparing the two files you'll see how I integrated the sound engine.

Mind you, the included behavior_smoothFpsCam2.js contains the section in which CC hands over the camera data to the sound library, so it should be used too.


csp-games
Guest
Quote
2021-02-15 04:18:43

I tried to solve the keys handler problem on itch.io for 6 hours. Supposedly I should put the event handler on the canvas, not on the window. Nice theory, but didn't work.

Interestingly the same keys handler works in an other game that I've uploaded a while ago. It may be coppercube, but I already tried it with my keys handler, overriding the one of CC. Which worked on my server. But not on itch.io.

I'm getting tired of this full-time bug-fixing. No time to work on an actual game. Gettin tired of itch.io. Are there any alternatives?


csp-games
Guest
Quote
2021-02-15 06:52:17

Ok, I think I got it working now, uploaded new version 6 that overrides the CC handler, and works on itch.io


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact