Just before releasing a game... (help!)

For questions about using Classic.

Post » Sun Jan 17, 2010 11:07 pm

My geuss is that it's caused by sound. I'm also working on a large game and it appears that switching layouts while a large .wav sound is playing (maybe other types too) causes a crash on rare occasions. I'm going to try stopping all sounds before I switch layouts and see if that alleviates the problem. My crash situation is identical to yours, so I believe it's the same thing causing it for the both of us.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Jan 18, 2010 1:27 pm

Thanks everyone! Lots of useful advice - time to try it all out. Will let you know what happens.
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 4:05 pm

I have no idea what the hell is going on with XAudio2. It keeps making things sound all tinny, but with no understandable pattern. At first I thought it was because I was using mp3s and the "play music" command, and switched to just "play channel" and oggs. But now it's starting again.

I wish I could find a pattern in this, but I can't.

(Originally I was using separate XAudio2 objects for my intros and the game itself, but thought that might be causing problems somehow, so I switched to one global object. This caused everything to go wonky. What on Earth am I doing wrong?)

Edit: To make things more bizarre, it now takes ages to skip the introductions. Before it was quite simple: when hitting any button, the game would take you to the next layout. This was pretty much instantaneous. Now it takes several seconds. WTF? Shouldn't what I'm doing now be cleaner and simpler?
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 4:19 pm

Maybe every layout should have an XAudio2 object of its own? Don't make the thing global, just have a copy of it in every level? Sounds kind of insane, but maybe that will be more stable?

Despairing a little... so close to releasing this game.

Edit: Nope. Separate non-global XAudio2 objects still having the same effect. Everything becomes tinny at random and going from one layout to the other takes ages.
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 4:28 pm

Can you reproduce these issues in a new .cap and post them to the tracker? I haven't heard anyone else having that kind of problem.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Tue Jan 19, 2010 4:48 pm

[quote="Ashley":2pvy4voh]Can you reproduce these issues in a new .cap and post them to the tracker? I haven't heard anyone else having that kind of problem.[/quote:2pvy4voh]

It is pretty weird, isn't it? I will attempt a couple more approaches, and then I will see if these issues can be reproduced. As I said, it's hard to see an understandable pattern. I have done actual programming before, so I'm always trying to think in terms of what the program might be doing, and this makes little sense.

Will keep you posted.

(Currently it appears that the huge times it takes to load new layouts seem to be related to me using oggs. When I switched to mp3s again, it went really quickly. I guess they're played differently? Edit: re-read the wiki entry. OK, obviously this makes sense. The rest is still crazy, though.)
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 5:23 pm

I brought the game into more or less the state it started out in. I was wondering whether it was maybe the actual specific XAudio2 object itself that was causing the problems - I had copy-pasted it from one layout to the other a couple of times, and Construct sometimes reacts weirdly to copy-paste. I can't really tell what's going on. I've tried to many approaches and gotten so many different responses that I'm just confused. When I started out working on this game, it had no problems at all. Could it be that Construct can't handle the size of the game? It's certainly gotten a lot slower and crasher more often.

I'm still getting the random crashes in the second intro, even when disabling the music in the layout that it loads. Still no pattern. It runs fine 10 times in a row and then crashes. Both when running it in Construct and when running the compiled .exe on its own.

All I can say for certain is that something very strange appears to be going on with the XAudio2 object, and that it may be hard for people to submit bug reports because of the seeming lack of a pattern.

Back to the fight...
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 7:52 pm

Well, the official line has been Construct is still in beta (since it's pre-1.0) so it would be wise to think twice before starting a large project, but I think a few others are currently working on large projects without so many problems.

The problem really has to be isolated for us to do anything about it. Another way you can try to find what's causing it is delete parts of the game away bit by bit (back it up first obviously) and see when the problems go away - then the last thing you deleted it probably caused it. Also, for the record, one global XAudio2 object is the intended way to use it, although there shouldn't be any difference to a per-layout system other than it forces all sounds and music to stop between layouts and might be a bit slower (since it's closing down and reinitialising the audio engine between layouts).

Did you try 0.99.72?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Tue Jan 19, 2010 8:05 pm

[quote="Ashley":2kpg8c1i]Well, the official line has been Construct is still in beta (since it's pre-1.0) so it would be wise to think twice before starting a large project, but I think a few others are currently working on large projects without so many problems.[/quote:2kpg8c1i]

Oh, absolutely. It's not like I'm blaming anyone or anything. As I said before, Construct is awesome. But I do think it would be great if a large game (hopefully with some acclaim) was released before Construct even reached 1.0... because even in this state, I prefer it a thousand times to Game Maker (or regular programming, for that matter).

[quote:2kpg8c1i]The problem really has to be isolated for us to do anything about it. Another way you can try to find what's causing it is delete parts of the game away bit by bit (back it up first obviously) and see when the problems go away - then the last thing you deleted it probably caused it. Also, for the record, one global XAudio2 object is the intended way to use it, although there shouldn't be any difference to a per-layout system other than it forces all sounds and music to stop between layouts and might be a bit slower (since it's closing down and reinitialising the audio engine between layouts).[/quote:2kpg8c1i]

I've tried this, and it looks like the crashes are definitely being caused by XAudio2. My guess right now is that something went wrong when I copy-pasted it. If I manage to get everything working again and finish the game, I will experiment with this and see if I can create a simple example of what's happening. Unless, that is, this problem is somehow related to the size of the project (70+ layouts, even more event sheets, etc.).

[quote:2kpg8c1i]Did you try 0.99.72?[/quote:2kpg8c1i]
Will try it now.
B
2
G
3
Posts: 50
Reputation: 950

Post » Tue Jan 19, 2010 9:33 pm

In feeblethemighty's recent Guyman Hero thread he was having audio distortion problems as well. Apparently XA2 was creating multiple instances of itself on restarting a layout. He checked the "No serialize" attribute and that fixed it.

You could try that, eh it couldn't hurt vv
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests