New account registration is temporarily disabled.

[RMVX ACE] SE IS SOMETIMES SKIPPED.

Posts

Pages: 1
In my game Colors of Damnation, I realized that the SE for shooting the gun is sometimes not played several times in a row. It's pretty random. When I shoot bullets, everything is fine until in a sudden random moment the bullet sound completely disappears as the bullets continue to fly. After some time the sound plays again. I searched my whole script list with CTRL + SHIFT + F for commands like "RPG::SE.stop" and "Audio.se_stop", but I have no command in my custom scripts that would stop the sound of these bullets in any case. The same thing happens sometimes when the opponent is hit. No sound. It's like the whole event was muted for a short period.

The sounds that are sometimes skipped are called "CoD - Schuss" (bullet sound) and "CoD - Gegner getroffen" (when the opponent is hit).

After all, I think the mistake should be anywhere in my eventcode. Here is it. Maybe y'all can see something I can't see.


Bullet:


Bullet Control:


Enemy gets hit:


Collision detection:

Any hints?

Greetings,
Tw0Face
It just might be the audio engine skipping SEs: If you give it too many to play it'll just start dropping some. Try removing some SE calls, or change it so there's a count or switch that controls if the SE plays like:


Conditional Branch: Switch [100] is ON
Control Switch [100] = OFF
Play SE: "CoD - Schuss"
Else
Control Switch [100] = ON
End


and see if that helps with the skipping. If it is the SE engine the you'll need to add moderation controls to SEs and make sure the ones you play are trimmed so they end right away with no silence at the end of them.
@GreatRedSpirit: Thanks for the comment. I've tried it by replacing all the sound effects with switches. They now start an event that plays the particular sound effect and then turn themselves back off. I've also cropped all of these SEs, but they get still skipped sometimes. Mainly when I hold down an walking button while shooting, the SEs are more likely to get skipped. But maybe there's more I can try out?
I've noticed many strange issues that were resolved in such a simple way. Add 0 frame waits. Try one in front of the sfx, or after, or both, or other locations to see if there is any effect.
@Link_2112: You can't add 0 frame waits in RM Vx Ace. You can at least add 1 frame waits. That's what I've tried but it doesn't seem to help with my issue.

I completely overhauled the bullet event. I even tried to include the SE into the Movement Route of the bullet to make sure the SE is played exactly when the bullet starts to move. But even this doesn't help. The SE is still skipped from time to time. I don't know what else to try. Any further suggestions?
Ah yes, 1. The smallest, but that didn't do it.

You could try putting a show message command next to the SE. If you don't see the message when the code is tested, then it means the code isn't running at all. But if you see it, then at least you know it's being processed. I've run into issues where another parallel event interrupts some code.

If you want to PM me a test copy I can try it on my PC, maybe it's your sound card and it will work fine for me. And I could also do my own direct testing to find a solution. It's been a while since I solved a coding puzzle.
@Link_2112: Thank you. I've sent you a PM. Maybe you'll find out why my SEs don't work.

Today, I spent the whole day searching for the cause but I haven't made any progress. I don't want to remove the SEs, but if the cause cannot be found, I'll have no choice (dang, this would be really annoying).
author=Tw0Face
@GreatRedSpirit: Thanks for the comment. I've tried it by replacing all the sound effects with switches. They now start an event that plays the particular sound effect and then turn themselves back off. I've also cropped all of these SEs, but they get still skipped sometimes. Mainly when I hold down an walking button while shooting, the SEs are more likely to get skipped. But maybe there's more I can try out?


Having more SEs getting skipped while moving sound strange, do you have it play SEs while the player is moving too or anything like that?

One possible solution is to move SE events into their own common event that you can call. This comment event will see the last frame it played a SE and will only play the SE again after so many frames have passed since the last time it played. Something like:

Control Variable: CurrentFrame = Graphics.frame_count
Control Variable: FramesSinceLastSE = CurrentFrame - SEFramePlayed
Conditional Branch(Variable FramesSinceLastSE > 3)
Play SE: "CoD - Schuss"
Control Variable: SEFramePlayed = CurrentFrame
End Conditional Branch

(this is assuming the problem is that too many SE's are playing)
My initial test seems to show that every time I click the mouse to shoot, I get 1 SE. No skipping.

I don't know if this game is private, so I won't post the video here, but I recorded myself playing. My recording software shows when I click the mouse. If you see me clicking the mouse and there is no sound effect, that is normal for how you must have coded it. The event can't be triggered again to play more SE until it's complete. Like Mega Man bullets.

If this is different entirely from what you hear when you play, then it's just your computer I suppose.
@GreatRedSpirit: I'll try that and see if I can get it to work. Thanks.

@Link_2112:
author=Link_2112
The event can't be triggered again to play more SE until it's complete.

I'm aware of that but I put bullet movement and SE into the same event. When I test play I can see three to five bullets flying around without any SE playing, meaning the event is actually triggered but without any SE playing.

I'm looking forward to see the video. This could help me a lot. Thank you very much for testing it on your computer.
Mirak
Stand back. Artist at work. I paint with enthusiasm if not with talent.
9300
Using Ace, my empirical understanding is that it has a lot of problems playing many sounds in quick succesion. When I tried doing it, one or more sounds would inevitably get skipped.

I hope you find a solution and it really isn't an unfixable quirk of the engine.
@GreatRedSpirit: Yes, you can shoot while walking across the map. If I walk across the map while shooting, I feel like there's a 90% chance that some of the shooting SEs will be skipped. Anyway, thanks for your suggestion. I set it up like this
Control Variable: CurrentFrame = Graphics.frame_count 
Control Variable: FramesSinceLastSE = CurrentFrame
Control Variable: FramesSinceLastSE -= SEFramePlayed
Conditional Branch: Variable FramesSinceLastSE > 3
Play SE: "CoD - Schuss"
Control Variable: SEFramePlayed = CurrentFrame
End Conditional Branch]
for the most SEs I have. But it haven't made things better. It even seems to me as if even more SEs were skipped now.

@Mirak:
author=Mirak
I hope you find a solution and it really isn't an unfixable quirk of the engine.

It could really be my sound card. But in the meantime, I asked a few people to test my game and some of them encountered the same problems. Unfortunately, I really start to believe that there's no solution to this problem. At least, I feel like this can't be done by just using events.

Greetings,
Tw0Face
author=Tw0Face
I'm aware of that but I put bullet movement and SE into the same event. When I test play I can see three to five bullets flying around without any SE playing, meaning the event is actually triggered but without any SE playing.


Are you sure you sent me the same thing your testing? Because your saying here that you see 3 or 5 bullets on the screen at one time? I could only shoot 1 bullet at a time, but when I was close to enemies and it was shooting fast there was no skipping.
@Link_2112:
author=Link_2112
Are you sure you sent me the same thing your testing? Because your saying here that you see 3 or 5 bullets on the screen at one time? I could only shoot 1 bullet at a time, but when I was close to enemies and it was shooting fast there was no skipping.


Yes. It's not three to five bullets at one time. It's just one bullet at a time, but I was trying to say that the sound was skipped for three to five shots in a row.
Pages: 1