Any1 know what this error is?

Get help using Construct 2

Post » Wed Oct 01, 2014 12:29 am

The "Audio" C2 object uses that AudioContext thing, loading sound or not, if it's added to your project, every instance of it will try and create an AudioContext. I tried to create 6 of them in a simple Chrome snippet, and it crashed with the same exception you provided. Could it be a Chrome issue ?

edit: Just tested with IE, no exception thrown at 20+ instances.
B
75
S
31
G
27
Posts: 1,000
Reputation: 20,735

Post » Wed Oct 01, 2014 2:55 am

First.
Even if you aren't using any audio, the fact that the audio plugin is in your project will cause your browser to automatically call up your sound card and have it waiting for when an audio file is played.

Secondly.
You are testing multiple clients on the same PC. This is not how users will be connecting to your game and even if some weirdo was trying to connect to your server from six different browser tabs, they'd have absolutely no effect on the server or other clients you are hosting..
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Wed Oct 01, 2014 4:12 am

Tylermon wrote:My plan is to host multiple shards. Have instances of the server running for different regions of my game but now it seems this might not be possible to do this or at the very least create some big limitations down the road.

A possible solution is to have a different project for the server. And not have a sound object at all. But this complicates things for end users.

Hey, I think you're talking about doing shards using C2 MP, the host doesn't have to contain audio at all it's useless. If you still want to develop your project in a single file you still can. Export your game like usual but for your server shards, remove the audio and make your sprites invisible. You should categorize your event into core mechanic, visual effect and audio effect, so that upon exporting for server shard you can just disable your visual effect and audio effect group (or if your events are very modular you can delete them), just leave the core mechanic to run.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Wed Oct 01, 2014 9:10 am

I'm a musician (Cubase user)... among other things. ^_^

It is correct that most sound cards doesn't handle several sources well; especially integrated solutions, but that shouldn't be an issue here, as the browser should be considered 1 source.

What I don't get is; your game is hosted on a server, but I'd think the game is executed client-side, while the server just delivers the play-files? I mean - your sound card on the server (and the graphics card) should be under 0% load each, while your hard drive and probably also the CPU, will be utilized some, to keep everyone in sync etc...

I don't know any game where the server plays the sound, then sends the wave audio to the player's PC... o_O
B
12
S
2
Posts: 80
Reputation: 816

Post » Thu Oct 02, 2014 12:58 am

jakobdam wrote:I'm a musician (Cubase user)... among other things. ^_^

It is correct that most sound cards doesn't handle several sources well; especially integrated solutions, but that shouldn't be an issue here, as the browser should be considered 1 source.

What I don't get is; your game is hosted on a server, but I'd think the game is executed client-side, while the server just delivers the play-files? I mean - your sound card on the server (and the graphics card) should be under 0% load each, while your hard drive and probably also the CPU, will be utilized some, to keep everyone in sync etc...

I don't know any game where the server plays the sound, then sends the wave audio to the player's PC... o_O


Each client can and do play their own sound.
Originally, the server/client was going to be one and the same. So that friends can host and play together easily. After a few limitations I ran into, as well as design changes, I expanded on the idea to allow a dedicated server to run in a shard-like manner.

All being the same client/server.

It looks like im going to scratch that and simply keep things under my control, hosting multiple servers if needed. The shard method looks like the best way to divide resources and keep server performance at a maximum. At least for the larger servers.

My game is a small-scale mmo In a way because my world is planned to scale nicely for small groups, and large groups of players. So far things are open world with portals between world areas(server shards)
I might come back later to optimize the local server/client to only allow small groups of players. But for now, large scale is my first and primary focus.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Previous

Return to How do I....?

Who is online

Users browsing this forum: Cubeeo and 24 guests