TC going from Mac Classic to Windows, a couple of questions...

Discuss and unveil current Marathon projects.

Post Sep 9th '09, 01:22

Well, I told you what you need to do to make sprites work: use the first slot for transparency. I guess I'm not sure what the rest of it is about. I'm talking about Aleph One, not Marathon 2.
Last edited by treellama on Sep 9th '09, 01:24, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Sep 9th '09, 05:17

jorå det e i alla fall jag, goran och da spager? som e svenskar här, troligtvis nån till!
What are you, if not seven different shades of stupid?
User avatar

CryoS
The Dungeon

Post Sep 9th '09, 08:26

CryoS wrote:jorå det e i alla fall jag, goran och da spager? som e svenskar här, troligtvis nån till!


En till.
Image
Slow day.
User avatar

Nitocris

Post Sep 9th '09, 10:02

CubicCircle wrote:En till.


:D

5st! Det är inte så dåligt för vårt lilla land.
User avatar

goran

Post Sep 9th '09, 12:11

Kaninus wrote:I appologize for my ignorance, but what is this "loch" you are referring to? I tried to google it, but all I got was some bullcrap about a really big fish in Scotland.

I'm not 100% sure myself. It's generally bandied around as a term to describe someone leaving the Marathon community. It almost never actually happens.
I have been wading in a long river and my feet are wet.
User avatar

L'howon
Somewhere outside the Citadel Of Antiquity

Post Sep 9th '09, 13:56

Goran wrote::D

5st! Det är inte så dåligt för vårt lilla land.


inte alls! hehe vi borde ha en fest :P mitt hus imorgon?
What are you, if not seven different shades of stupid?
User avatar

CryoS
The Dungeon

Post Sep 9th '09, 15:59

CryoS wrote:inte alls! hehe vi borde ha en fest :P mitt hus imorgon?


Yeah, right! Bor inte du typ i Luleå?
Image
Slow day.
User avatar

Nitocris

Post Sep 9th '09, 16:09

Kaninus wrote:I appologize for my ignorance, but what is this "loch" you are referring to? I tried to google it, but all I got was some bullcrap about a really big fish in Scotland.

If I may interrupt this meeting of Swedes, I think this link will explain things.
underworld : simple fun netmaps // prahblum peack : simple rejected netmaps
azure dreams : simple horrible netmaps // v6.0!!!: thomas mann's greatest hits : simple simple netmaps
User avatar

irons
(.Y.)

Post Sep 9th '09, 17:00

CubicCircle wrote:Yeah, right! Bor inte du typ i Luleå?


haha, högre, testa Umeå.
User avatar

goran

Post Sep 9th '09, 17:52

Treellama wrote:Well, I told you what you need to do to make sprites work: use the first slot for transparency. I guess I'm not sure what the rest of it is about. I'm talking about Aleph One, not Marathon 2.

Sorry, it's just a "lost in translation" thing on my part. Happens all the time. Thank you very much for your help though, I really appreciate it. I'll be reconfiguring my sprites accordingly.

Lh wrote:I'm not 100% sure myself. It's generally bandied around as a term to describe someone leaving the Marathon community. It almost never actually happens.

Well I ain't giving up until this TC is finished. If I can work out the few remaining kinks on my own I'll probably just lurk around a few months more.

And to the Swedes: om någon av er heter Rickard så har du högst sannolikt redan sett förlagan till min TC. Och i sådana fall vill jag även passa på att tacka för att du tipsade om Rubicon för X antal år sedan! ;)
Last edited by Kaninus on Sep 9th '09, 17:52, edited 1 time in total.
Kaninus

Post Sep 9th '09, 17:57

Kaninus wrote:Sorry, it's just a "lost in translation" thing on my part. Happens all the time. Thank you very much for your help though, I really appreciate it. I'll be reconfiguring my sprites accordingly.

If it helps, I believe you can change color 0 to whatever you want it to be. If you don't have any pink aliens, make it pink?
User avatar

treellama
Pittsburgh

Post Sep 9th '09, 19:24

CryoS wrote:jorå det e i alla fall jag, goran och da spager? som e svenskar här, troligtvis nån till!



Hmm, jag kommer inte ihåg att jag skrev i mitt land nånstans i min profil... :D
User avatar

Da Spadger

Post Sep 9th '09, 19:48

du sa det när jag undrade i nån tråd för ett tag sen... och det står umeå i min profil :P
What are you, if not seven different shades of stupid?
User avatar

CryoS
The Dungeon

Post Nov 22nd '09, 13:33

Dear all,

It's time for another gargantuan post.

The reunion party mentioned above has been postponed to the second week of 2010. This is actually a good thing since I'm experiencing some major sound issues with my TC, and need time to test and fix it.

The main purpose of this post is to get some troubleshooting suggestions from those of you who are more acquainted than I with the Aleph One engine. I've tried almost everything I can come up with no apparent success.

In short, most - if not all - sound effects cuts out way too early and never plays through to the end. The whole sound experience thus becomes very "choppy". When starting a new game, everything seems fine for about ten seconds on Windows and almost a minute on Mac OS 9. After that it just gets worse and worse. Yes, the problem appears both with the original engine and with Aleph One (more on that later).

I have 13 aliens in my game. Four of them are "tiny" versions, so in essence I have only nine alien types. They continue to spawn indefinitely on my level, and at any given moment the player usually sees four or five of them. Most of them have sound effects in several categories (and by categories I mean such things as activation, random/chatter, being hit, wail, attacking, dying, and so on), and most of them have the maximum of five sound effects per category. Most of these sound effects are between 2 and 4 seconds long. Some are shorter, and a few are longer.

The sound file was created on Mac OS 9 with Wail 2.5b1. All sounds were converted to System 7 sounds, i.e. with the file type "sfil" and the creator "movr". They are all 22,5khz, and exists in both 8-bit and 16-bit versions. All and all about 700 files.

In terms of troubleshooting, this is what I've come up with so far (and you'll notice that my troubleshooting gets more and more desperate and aimless further down the list) :

- The problem appears in Mac OS 9, Windows Vista, and five different installations of Windows XP.

- It doesn't seem to be related to hardware. The issue has been confirmed on seven (!) computers with different specs, among others a wide range of CPUs (Intel Core 2 Duo, Core 2 Quad, Pentium 4, Celeron, AMD Athlon, PPC G3) and different audio cards (mostly Realtek audio cards of course, but also with a $1299 RME Fireface 400). There seem to be no stress what so ever on the CPU while running the game. On my Core 2 Duo @ 3 GHz, the game takes a maximum of 10% of the CPU, and about 500 megabytes of RAM.

- There's no difference between using 8-bit and 16-bit sounds, on either computer mentioned above.

- Unticking "more sounds" doesn't have any effect.

- I've fiddled about with the sound tag parameters in the file Marathon Infinity Preferences, mostly with the channels, rate, and samples parameters. No success.

- It's not the map complexity. The map is 1024 polygons, and I know there are some other audio issues with complex maps (I've had to remove all sound objects from the map since I get major graphical errors when they are present). I made a 10 polygon map and crammed in my aliens in there. Issue remains.

- It's not related to ambient and random sounds on the map. I erased them all, but issue remains.

- Number of audio channels does not make a difference. I've tried every setting from 2 to 32.

- I had a theory it might be related to the "cannot be restarted" flag in the sound file. Tested it by removing the flag on all sound effects. Issue remains.

- Somewhere in the original Marathon Infinity files, the "startup" sound, i.e. one of the first slots in the sound file, is used. I don't remember where right now, but I do remember it was wired to something that was used in-game (like a weapon or something). I thought that might be the problem, but it wasn't.

- I thought maybe the map liquids obstruct sounds somehow. Removed all liquids. Issue remains.

- Some aliens have "moving" sounds (i.e. cyborg). Perhaps the continuous looping obstructs other sounds. Removed them, but issue remains.

- Reduced the frequency of random sounds from 31 to 15. Issue remains.

- Removed 50% of the aliens in the map (i.e. how many of a certain type is present at any given moment). Issue remains.

- Tiny aliens have modified audio pitches, so I tried the map without tiny aliens. Issue remains.

- Removed "the ball" and "the hill". Issue remains. (Long shot. I seriously didn't think it would help, but you never know).

- Removed all platforms, since they have sounds wired to them. Issue remains.

- I had more than 8 player spawn positions in the map (real long shot btw). Removed all but one. Issue remains.


There are some things that I've not yet tried. Some of them are small test that can be done rather quickly, such as:

- Remove all scenery. Some scenery has sounds wired to them.

- Add alien types one at the time and see if the issue appears along with a certain alien.

- Aliens activate by nearest hostile rather than the player. Thus, there are a lot of aliens running around on the map, undoubtedly playing their sounds. Well, I really don't know if that's the case, I mean I can't see or hear them :), and one could certainly argue that they don't contribute a lot other than providing with a more "vivid" experience. Most of my aliens are tribal, i.e. they are only friends with their own kind, so many a times you come across a few aliens already fighting, instead of just standing there and activate as soon as the player comes along. It makes you feel part of something bigger, so to say.

- I have 30 lights on the map. I don't think this is related to the audio issues, but you never know. Maybe I could remove some and see if it helps.

- I haven't tried to remove all aliens' activation sounds. I've noticed that those are played very often some times. Don't know why.


And then there's the big one; Wail 2.5b1 versus Anvil 1.0.3b4. I'd really like to avoid having to paste 350 (700 if also using 8-bit) sound effects into Anvil. It's bad enough having to import them one at the time into Wail, and Anvil's user interface being what it is and? suffice it to say, I'd rather not do it. But I WILL do it if that's the only viable solution.

The thing is though; one could argue that I've already tried that. When I was finished with the file in Wail, I successfully opened and saved a new one with Anvil. I've tried both versions of the file, but the issue remains in both. But on the other hand, I don't know anything about Anvils way of saving and if what I did was equivalent to actually creating the file from scratch in Anvil.

I've been going through some of the source code, especially SoundManager.cpp, but I'm not that good a C++ programmer to be able to identify every construct. It looks very neat though. :) And besides, I'm pretty sure I will fail in recompiling the application anyway. A friend of mine suggested the problem might be related to the sounds' identification numbers and that the engine for some reason confuses them and stops the wrong sounds. But this is just speculation, at best.

Also: Treellama mentioned that the sound is completely re-written from Marathon 2. I guess this means that the source code in the Sound folder differs completely from the Marathon 2 source code, correct? If so, the issue might not be attributed to the sound engine at all. In that case, it must be due to something that hasn't changed between M2 and AO (which is unlikely, and I'm not skilled enough to determine what that might be), or something that I'm doing wrong (which is more likely, and I guess the Wail versus Anvil thing is the likely culprit here, right?).

What are your thoughts? Do you have any other suggestions of what I might try before actually submitting my bug report? Anything I've missed? Right now I seem to troubleshoot a little bit too aimlessly, trying every possible thing related to sound, and apparently also some things that are not related to it. It's getting somewhat tiresome.

Sincerely,
Kaninus
Last edited by Kaninus on Nov 22nd '09, 13:35, edited 1 time in total.
Kaninus

Post Nov 22nd '09, 14:22

If it appears in both Aleph One and Marathon 2, I would suspect the sounds themselves are bad. Marathon 2 uses the Mac toolbox sound manager, and Aleph One has a sound manager clone, so the chances that both are getting the sounds wrong are pretty minimal.
User avatar

treellama
Pittsburgh

Post Nov 22nd '09, 15:28

In marathon Infinity, only the bobs utilize all sound categories. Most of the aliens (pfhor) only have an activation sound. I would suspect the sheer number of sounds (350!) is causing problems when they start to stack up.

Have you tried to limit the aliens' sounds to one category (e.g. activation) to see if the issue still remains?
User avatar

goran

Post Nov 22nd '09, 15:46

Kaninus wrote:I know there are some other audio issues with complex maps (I've had to remove all sound objects from the map since I get major graphical errors when they are present).

This is unrelated to your present problem, but I felt that I had to address it. Forge's merge includes some optimizations that originally helped speed things up on slow Macs back in the day. These optimizations aren't needed any longer, and what's more, it turns out that Forge can screw something up (exclusion zones and other things) when it optimizes. This is why sounds can make life a lot harder. I really recommend using Atque to merge, because it doesn't have this issue.

And then there's the big one; Wail 2.5b1 versus Anvil 1.0.3b4. I'd really like to avoid having to paste 350 (700 if also using 8-bit) sound effects into Anvil. It's bad enough having to import them one at the time into Wail, and Anvil's user interface being what it is and? suffice it to say, I'd rather not do it. But I WILL do it if that's the only viable solution.

The thing is though; one could argue that I've already tried that. When I was finished with the file in Wail, I successfully opened and saved a new one with Anvil. I've tried both versions of the file, but the issue remains in both. But on the other hand, I don't know anything about Anvils way of saving and if what I did was equivalent to actually creating the file from scratch in Anvil.
This is a dangerous assumption to make: for example, what if Wail somehow corrupted the sounds when it imported them? Then saving the file again in Anvil will simply duplicate the corrupted sounds. Instead of remaking the entire file before you figure out what's going on, what if you try modifying a fresh Sounds file with Anvil, replacing only a tiny number of old sounds with your new ones? For example, all of one enemy's attack or activation sounds. Then make a sample map with only that enemy, start a game, and listen.

Right now I seem to troubleshoot a little bit too aimlessly, trying every possible thing related to sound, and apparently also some things that are not related to it. It's getting somewhat tiresome.

I agree that you need a better method of troubleshooting. From what I can see, you are allowing too many variables into the equation at once, and when you can't figure out what's wrong, you make sweeping changes to your files (deleting all sound objects and so on) that don't really help. Try isolating the most probably causes one at a time, taking my above suggestion as an example. I'm not the best at this kind of thing, myself--when I program, I tend to write most of the program at the outset and then I slowly find out why it doesn't work--but taking a consistent approach can help you find out what's up quite a bit faster.
underworld : simple fun netmaps // prahblum peack : simple rejected netmaps
azure dreams : simple horrible netmaps // v6.0!!!: thomas mann's greatest hits : simple simple netmaps
User avatar

irons
(.Y.)

Post Dec 5th '09, 01:06

Thanks for the insights guys, I really appreciate it.


Long story short, I've tried a few different angles on what you've suggested so far. I started to play around with Anvil 1.0.3b4 and got some really strange results. I may be on to something here...

The first class in the sounds file that I'm using is the "suffocation" class, so I imported my sounds into that one, saved, and then open the file again. Now, all original sounds before the suffocation class (i.e. teleport, crunch, creak, absorbed and oxygen warning) was still playable in Anvil, but none of the subsequent classes worked. Dead quiet when clicking the sounds. Well actually, at least one of the subsequent classes DID work, namely the VacBob Wail class, but it behaved very strangely. When clicking on it, Anvil started to play the VacBob wailing sound, but in the middle of it it just cut and started playing the first half of the third sound for the VacBob Trash talk class instead. Very odd indeed.

So I gather this is some sort of overflow problem, which would actually indicate there is some problem with the sound files themselves or the way they are handled by the engine. As I said earlier, they are all System 7 sounds, with the type "sfil" and creator "movr". However, when comparing my sounds with sounds exported with Anvil from the original Marathon Infinity sounds file, it seems there is a slight difference. It's not visible in ResEdit, but a small application called SoundApp does indicate the difference.

I'm attaching a screenshot (hope you can see it) with a few random samples being compared with SoundApp. The left ones are the original sounds exported with Anvil and the right ones are the equivalents that I've recorded (in AIFF and then converted to System 7 sounds with SoundApp). Aside from the rather strange sample rate of the original suffocation sound, the common difference seems to be the "Looping" attribute. I'm not sure why there is a difference and what it actually means, but it's apparently residing in the very end of the file, barring EOF which I assume is at the last byte. My working theory right now is that the engine struggles because my sounds aren't terminated in the proper manner. I'm not really sure how to verify if this is the case though, and it doesn't really help me at the moment anyway since I have no way of bulk terminating them.

Or wait... perhaps I do. It's been like 15 years since I made a Macintosh application (and I never worked much with I/O operations), but I guess I could make one that replaces the two last bytes of every sound file with whatever is in the original files. Or, I could try to modify and recompile the AO engine. Not sure what would take the longest though.

You guys have any additional thoughts regarding this? Could this be the problem? I mean there's still some circumstantial evidence here, but at least there is a visible difference and strange Anvil behavior that is actually repeatable.


Sincerely,
Kaninus
Attachments
looping_difference.gif
looping_difference.gif (23.27 KiB) Viewed 4533 times
Last edited by Kaninus on Dec 5th '09, 01:06, edited 1 time in total.
Kaninus

Post Dec 5th '09, 02:21

There is no termination IIRC; the engine uses the sample length in the header to know how long to play the file. If Anvil can't play the sounds back right, it is probably writing a corrupt sound file. No engine modification can fix that. Can you try recording them directly to System 7 sounds, bypassing SoundApp?

Just FYI the loop settings and pitch are also in the header.
Last edited by treellama on Dec 5th '09, 02:23, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Dec 7th '09, 23:37

Treellama wrote:There is no termination IIRC; the engine uses the sample length in the header to know how long to play the file. If Anvil can't play the sounds back right, it is probably writing a corrupt sound file. No engine modification can fix that. Can you try recording them directly to System 7 sounds, bypassing SoundApp?

Just FYI the loop settings and pitch are also in the header.


Thanks for your input Treellama.

I tried it, but it didn't help. I recorded a few sounds with the bulit in Mac OS 9 sound recorder and imported them into a brand new Sounds file ripped from the original Infinity CD, and again the subsequent sound classes became silent or weird. It sure seems that Anvil 1.0.3b4 is saving a corrupt file. However, I also tried to import the sounds with Anvil 1.0.3 and Anvil 1.0, and they can play the subsequent sounds just fine; no corrupt Sounds file.

So, using Anvil 1.0.3 (and later also 1.0), I started to import the newly recorded sound into all the sound classes that I'm using (thank god copy-paste works in Anvil), and tried it with both the original engine and AO. No luck. It's the same as before, i.e. the sound cuts out way to early.

So... I'm looking at System 7 Sounds recorded with the built in Mac OS 9 recorder, imported using all three versions of Anvil into clean Sounds files, and it still doesn't work. What other likely culprit is left other than my computer itself? Sure, it's an old G3 and I don't know the status of the memory sticks and hard drive, but it's still fairly stable concidering it's running Mac OS 9.

I do have an old Power Mac 7100 on which I could try to install OS 7.5 and reiterate the test cases, but there's a problem... namely to retrieve the sound file from it once it's done. No Ethernet, no USB, no CD-RW, no AppleTalk cord...

Is it possible to debug and/or profile the AO engine in real time in Windows? Because that's the only solution I have left, short of scrapping the whole damn project. If I could just get a hint of what's going on, maybe I can get around it or solve it somehow. Or rather... pay someone else to solve it.

Cheers,
Kaninus
Kaninus

Post Dec 8th '09, 15:43

No luck. It's the same as before, i.e. the sound cuts out way to early.

So... I'm looking at System 7 Sounds recorded with the built in Mac OS 9 recorder, imported using all three versions of Anvil into clean Sounds files, and it still doesn't work. What other likely culprit is left other than my computer itself? Sure, it's an old G3 and I don't know the status of the memory sticks and hard drive, but it's still fairly stable concidering it's running Mac OS 9.

Cheers,
Kaninus


i'm also having the exact same sound problem, but when importing to Wail. I'm also on a G3, but with 10.3.9 on.
It's a really annoying bug, and, like you, have tried putting them in in both formats with the same effect. I found this annoying, as I have new bob voices, they are shorter than the originals but still get cut off!
Anyone know what causes this?
Last edited by Fishman92 on Dec 8th '09, 15:45, edited 1 time in total.
Fishman92

Post Dec 8th '09, 15:56

Kaninus wrote:So, using Anvil 1.0.3 (and later also 1.0), I started to import the newly recorded sound into all the sound classes that I'm using (thank god copy-paste works in Anvil), and tried it with both the original engine and AO. No luck. It's the same as before, i.e. the sound cuts out way to early.

This still looks like a problem with the sounds file itself, then. If you can't get it working in the original engine, I am not sure I can help with Aleph One.

Is it possible to debug and/or profile the AO engine in real time in Windows?

I am not sure what you mean by this. It certainly runs in Windows.

If you must, you can email me a minimal broken sounds file, and I will try to have a look at it when I get time. Keep in mind I am very busy right now, and sound files are very complicated.
User avatar

treellama
Pittsburgh

Post Dec 13th '09, 15:52

Fishman92 wrote:i'm also having the exact same sound problem, but when importing to Wail. I'm also on a G3, but with 10.3.9 on.
It's a really annoying bug, and, like you, have tried putting them in in both formats with the same effect. I found this annoying, as I have new bob voices, they are shorter than the originals but still get cut off!

Sorry to hear you've been experiencomg this problem too, but on the other hand I'm glad to see that I'm not alone. Have you tried Anvil too, or just Wail?

Treellama wrote:I am not sure what you mean by this. It certainly runs in Windows.

What I mean is, is it possible to start the AO engine in debug mode in Windows, and attach a profiler to it to see what's going on under the hood? If I could introduce a few breakpoints maybe I could figure it out by myself. From what I understand, it is only possible to do this in Linux and MacOS X? Trouble is, I have limited experience with Linux and no suitable hardware to install MacOS X upon (I don't think my old G3 can cut it) and I've actually never tried MacOS X even once.

Treellama wrote:If you must, you can email me a minimal broken sounds file, and I will try to have a look at it when I get time. Keep in mind I am very busy right now, and sound files are very complicated.

Thank you very much Treellama, that's a very kind offer and I really appreciate it. However, I don't have the heart to ask you to look at this rather esoteric problem of mine if you're busy. At least not without me giving something back. Is there any way I can contribute? I wasn't kidding when I said I'm willing to pay someone to fix this. It is _that_ important to me.

I'm not sure if the problem can be reproduced by using the sounds file alone though. I just tested the sound file on level 33 in Infinity, and I had a hard time determine whether the problem was there or not, contrary to my TC in which the problem is more than obvious (probably due to the fact that I'm using more Bobs and F'licktas rather than fighters, troopers and hunters in my TC. So I will probably supply you with more than just the sounds file.
Kaninus

Post Dec 13th '09, 16:06

Kaninus wrote:What I mean is, is it possible to start the AO engine in debug mode in Windows, and attach a profiler to it to see what's going on under the hood? If I could introduce a few breakpoints maybe I could figure it out by myself. From what I understand, it is only possible to do this in Linux and MacOS X? Trouble is, I have limited experience with Linux and no suitable hardware to install MacOS X upon (I don't think my old G3 can cut it) and I've actually never tried MacOS X even once.

We compile Aleph One using mingw, so you can use gdb in Windows. You would need a debug build (40 MB) and pretty extensive knowledge of the sound code. The mixer core is a very large C++ template, so it will be difficult to set any meaningful breakpoints in it.

I'm not sure if the problem can be reproduced by using the sounds file alone though. I just tested the sound file on level 33 in Infinity, and I had a hard time determine whether the problem was there or not, contrary to my TC in which the problem is more than obvious (probably due to the fact that I'm using more Bobs and F'licktas rather than fighters, troopers and hunters in my TC. So I will probably supply you with more than just the sounds file.

Have you tried testing this sound file with a simple map containing only one of the monsters you care about? If you have many sounds going, the engine has to cut some off to make room for the new ones.
Last edited by treellama on Dec 13th '09, 16:06, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Dec 13th '09, 16:20

Kaninus wrote:Sorry to hear you've been experiencomg this problem too, but on the other hand I'm glad to see that I'm not alone. Have you tried Anvil too, or just Wail?

I've only used wail for sounds, i'll try anvil... and report my findings.
Fishman92

PreviousNext

Return to Projects



Who is online

Users browsing this forum: No registered users

cron