Scuba Sounds 1.0

Discuss and unveil current Marathon projects.

Post Aug 25th '11, 14:09

this is pretty self-contained and relatively conservative, so I figure I might as well release it and see what other people think.

http://www.simplici7y.com/items/scuba-sounds


edit: now version 1.1
Last edited by quartz on Aug 25th '11, 15:25, edited 1 time in total.
User avatar

quartz

Post Aug 25th '11, 15:33

haha ok, so I just discovered that the way I implemented the mod causes the bubbles sound to also happen in vacuum levels. I'm going to have to redo this. many thanks to the mml guide again for not being clear about things.
Last edited by quartz on Aug 25th '11, 15:35, edited 1 time in total.
User avatar

quartz

Post Aug 26th '11, 04:09

quartz wrote:many thanks to the mml guide again for not being clear about things.

Many thanks to you for submitting a documentation patch to clear it up. Oh wait, you didn't.
Aleph One:  Download 1.2.1         Plugins:  Vasara  ·  more
User avatar

Hopper

Post Aug 26th '11, 06:26

Hopper wrote:Many thanks to you for submitting a documentation patch to clear it up. Oh wait, you didn't.

sorry, the mml is like 3 lines I figured it would be obvious what was going on.

in the "sounds" tag, the description for the "breath" attribute says it plays when you're underwater. it neglects to mention that it also plays when you're in a vacuum. this makes perfect sense, but it didn't occur to me to check that until after I'd already uploaded it to simplicity. the description also says it plays more often as your o2 bar gets lower, but in my testing it plays every 30 seconds on the dot, with the caveat that the timer does not reset to 0 but carries over when you go in and out of liquids (at least, that's what I think it's doing).

on a side note: would it be easy to add an mml variable to control the time interval? I'd love it if I could drop it to like 3 seconds, then I could have a real gasmask breath sound without playing tricks. I'm not sure what bungie had in mind for this before they ditched it, but 30 seconds is kinda far apart and is hard to do anything creative with.
User avatar

quartz

Post Aug 26th '11, 12:31

quartz wrote:the description also says it plays more often as your o2 bar gets lower, but in my testing it plays every 30 seconds on the dot, with the caveat that the timer does not reset to 0 but carries over when you go in and out of liquids (at least, that's what I think it's doing).

Code: Select all
// lolbungie
breathing_frequency = TICKS_PER_MINUTE/2;
/*
switch (player->suit_oxygen/TICKS_PER_MINUTE)
{
        case 0: breathing_frequency= TICKS_PER_MINUTE/6;
        case 1: breathing_frequency= TICKS_PER_MINUTE/5;
        case 2: breathing_frequency= TICKS_PER_MINUTE/4;
        case 3: breathing_frequency= TICKS_PER_MINUTE/3;
        default: breathing_frequency= TICKS_PER_MINUTE/2;
}
*/
Last edited by treellama on Aug 26th '11, 12:41, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Aug 26th '11, 19:12

would it be easy to expose that and let people type in a raw tick value or something?

after doing more testing, my scuba patch may be in trouble. I realized that in one or two places people have used the "underwater" sound as a dry-ground ambient sound, so I can't even get away with just changing that one sound slot without having side effects. having a real separate breath sound that's independent would be a lot cleaner, but at 30sec there's not a lot I can do.


edit: completely didn't see the comment markers in that code first time I read it.
Last edited by quartz on Aug 26th '11, 19:23, edited 1 time in total.
User avatar

quartz

Post Aug 26th '11, 19:22

Maybe I'm missing something, but:
breathing_frequency = TICKS_PER_MINUTE/2;

Seems like it would happen every 30 seconds to me.
User avatar

Wrkncacnter

Post Aug 26th '11, 19:25

W wrote:Seems like it would happen every 30 seconds to me.

yeah, look again, the whole bottom section is commented out. I totally missed that too and did this whole thing with a stopwatch and pen and paper. after I posted it I realized that tree was confirming what I said, not refuting it.


edit: looks like I didn't completely read what you wrote either. -_-
Last edited by quartz on Aug 26th '11, 19:27, edited 1 time in total.
User avatar

quartz

Post Aug 26th '11, 19:27

Yeah, that's why I didn't mention the irrelevant code. All I know is people are arguing about nothing.
User avatar

Wrkncacnter

Post Aug 26th '11, 19:33

quartz wrote:edit: completely didn't see the comment markers in that code first time I read it.

They don't actually affect the behavior of that code :)
User avatar

treellama
Pittsburgh

Post Aug 26th '11, 19:34

W wrote:All I know is people are arguing about nothing.

well, I'm arguing that letting people change the timer would be immensely useful. :)
User avatar

quartz

Post Aug 26th '11, 19:58

Treellama wrote:They don't actually affect the behavior of that code :)

I'm not great with the C family, but why not? does "player->suit_oxygen" retrieve the max value instead of the current value or something? the only other thing I can think of is that the division produces a float instead of an int, but I don't think that would be happening.

also: having the rate get faster and being able to control the scaling would be a nice touch, but I can't think of a clear way you'd expose that through an mml tag.
Last edited by quartz on Aug 26th '11, 19:58, edited 1 time in total.
User avatar

quartz

Post Aug 26th '11, 20:04

quartz wrote:I'm not great with the C family, but why not?

Without a break, all the cases just fall through to the default case. Hopper found this one, and left it in comments because it's a great commentary on the original Marathon 2 code and the C programming language in general.

I posted it as a justification for why MML.html incorrectly describes the breathing behavior: at first glance, you might think it behaves just like the MML.html author did.
Last edited by treellama on Aug 26th '11, 20:07, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Aug 26th '11, 20:18

Treellama wrote:Without a break,

oh I missed that too. you manually have to write the word "break" in C?
User avatar

quartz

Post Aug 27th '11, 01:47

I think maybe these conversations would be more efficient if you joined #alephone on freenode sometime, quartz.
User avatar

Wrkncacnter

Post Aug 27th '11, 02:03

W wrote:I think maybe these conversations would be more efficient if you joined #alephone on freenode sometime, quartz.

my current net connection is slow and incredibly flaky, so any form of live anything (chat/games/video/etc) doesn't work too well a lot of nights. chats in particular end up just being painful for everyone involved since I often get disconnected and/or half the messages don't go through.
User avatar

quartz

Post Aug 27th '11, 02:17

I hope you're not paying an ISP for that!

Stealing a neighbor's wireless maybe?
Last edited by treellama on Aug 27th '11, 02:17, edited 1 time in total.
User avatar

treellama
Pittsburgh

Post Aug 27th '11, 02:33

Treellama wrote:I hope you're not paying an ISP for that!
Stealing a neighbor's wireless maybe?

both, effectively. my building complex doesn't allow people to install their own connections, we have to buy into a WLAN thing they have set up. which would be great if it worked half the time. signal reception at this end is poor, and their router shits the bed and reboots two or three times a week, going down for like 30+ min each time. most people here either don't seem to care or use cell tethering though, so it's probably not going to change any time soon.
Last edited by quartz on Aug 27th '11, 02:38, edited 1 time in total.
User avatar

quartz


Post Aug 27th '11, 02:40

Treellama wrote:Cantenna time!

heh, yeah. I haven't seen a laptop with an external antenna port in years though, and I dunno that it's worth buying a pc card just for that.
User avatar

quartz

Post Aug 29th '11, 20:51

quartz wrote:heh, yeah. I haven't seen a laptop with an external antenna port in years though, and I dunno that it's worth buying a pc card just for that.

You could buy something relatively cheap like an Alfa Awus 036H. Only run you about 25-30 dollars, and the 9dB antenna that comes with it is quite powerful. There's also some Prism based USB dongles with 2-3dB antennas that might get the job done. Obviously the 9dB would work fine in it's own right, and coupled with a 'cantenna' (or a parabolic made out of a strainer) would easily net you enough range to get onto a open WAN. YMMV, never mind the legality of it, but it's a solution. (Plus it comes with some nice peripherals and a lengthy USB cable for wardriving shenanigans).
I have been wading in a long river and my feet are wet.
User avatar

L'howon
Somewhere outside the Citadel Of Antiquity


Return to Projects



Who is online

Users browsing this forum: No registered users