Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1412044 Posts in 69447 Topics- by 58482 Members - Latest Member: ZerusW

June 21, 2024, 11:57:24 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsProject Rain World
Pages: 1 ... 174 175 [176] 177 178 ... 367
Print
Author Topic: Project Rain World  (Read 1483063 times)
oahda
Level 10
*****



View Profile
« Reply #3500 on: April 12, 2015, 12:30:58 PM »

The game hasn't had any sound before now? Huh?
Logged

jamesprimate
Level 10
*****


wave emoji


View Profile WWW
« Reply #3501 on: April 12, 2015, 12:51:50 PM »

had full sound/music/sfx in the lingo build, so everything is ready to go. just hadn't bothered putting it in the new version yet. the futile framework joar is using doesnt use unity's sound engine, and futile's native sound engine BLOWS, so we had a friend working on a custom sound engine code / extensions. It just came out of the oven a few weeks ago actually. Big shoutout to Garrett from Neon Deity Games for all the help!  Beer!
Logged

Schoq
Level 10
*****


♡∞


View Profile WWW
« Reply #3502 on: April 12, 2015, 01:37:34 PM »

Things are moving along well enough! The only problem I have so far is that Unity's volume control for samples seems really weird. Between 10% and 100% volume I can barely hear any difference, and pretty much the entire scale is squeezed together between 0% and 10%. I can sort of hack around this problem by just doing a Pow operation on the volume with an exponent of 3 or something, but it puzzles me. Does anyone know anything about this?  Who, Me?
Sounds like what happens when sound is scaled linearly instead of logarithmically. http://en.wikipedia.org/wiki/Weber%E2%80%93Fechner_law#The_case_of_sound
Logged

♡ ♥ make games, not money ♥ ♡
JLJac
Level 10
*****



View Profile
« Reply #3503 on: April 13, 2015, 08:03:32 AM »

The game hasn't had any sound before now? Huh?

 Who, Me? Who, Me? Who, Me? Who, Me? Who, Me?

Things are moving along well enough! The only problem I have so far is that Unity's volume control for samples seems really weird. Between 10% and 100% volume I can barely hear any difference, and pretty much the entire scale is squeezed together between 0% and 10%. I can sort of hack around this problem by just doing a Pow operation on the volume with an exponent of 3 or something, but it puzzles me. Does anyone know anything about this?  Who, Me?
Sounds like what happens when sound is scaled linearly instead of logarithmically. http://en.wikipedia.org/wiki/Weber%E2%80%93Fechner_law#The_case_of_sound

This seems reasonable! Why would it work like that though? My bypass sort of works, so I'm just rolling with that now, but it still weirds me out.

Today I've been working more on the sound engine, which seems to be working in about every way I want it to work now, except from playing ambient sounds and music. It does play samples though, and the samples can be attached to an object in the game, assigned a static position, or just played as a "disembodied" sound which has a pan assigned.

On top of that I've been writing this sort of intricate input syntax for James to use when putting the sound in the game. What it's basically about is that all the sound triggers are named in a text file, and by writing some simple instructions James can tell the game what to do sound-wise on that trigger. The system can do stuff such as randomizing pitch or volume within an interval, pick a random sample from a list, play multiple samples at different volumes at once, etc etc.

Now the task at hand is basically just to place a trillion sound triggers in the code. At first my method was to scroll through the code and try to come up with sound triggers to put in there, but that was not very effective so now I've switched the process around, and write a list of whatever sounds I can think of first, and then try to find where in the code the trigger should go. Lots of work. I don't think I'll actually attempt to place ALL the triggers before sending it over to James, but I want to have a good chunk in.
Logged
Nico May
Level 0
***



View Profile WWW
« Reply #3504 on: April 13, 2015, 04:50:10 PM »

Sounds interesting, I've never really done something big enough yet to necessitate sound design like that, it'll still be a bit before HtA needs that but it will eventually so I'll take notes;)

Btw, I've been learning shaders, and I finally found where in the log you started learning them, which has helped quite a bit, less the actual links and more seeing how you just kinda played around until you got it. Quote: "What is a shader?, can I make custom ones?" Its been interesting as well to see the things that didn't make sense to me when I first read and now seem super simple, like the dynamic shadows are actually really simple, makes me want to implement them, but I worry as HtA is already bordering on RW aesthetics. (Not sure if you've seen HtA personally, I've been talking to James).

Anyway yeah, back to lurking for another few months,
Nico
Logged

Polyflare
Level 0
**



View Profile WWW
« Reply #3505 on: April 14, 2015, 07:06:20 AM »

Warning: Highly technical and unorganised ramblings that may or may not be relevant to anything.

JLJac, Your pow hack is not a hack at all. Smiley

It sounds like Unity's volume slider is simply a constant between 0 (0%) and 1 (100%) that each sample is multiplied by before it is mixed. While this is great for computers it's not useful to people as our hearing is non-linear. This is where decibels come in handy as working in the logarithmic scale is far more useful for sound than the linear scale. Think of it as "gamma space" for sound as you're probably familiar with it in the graphics world. Full linear volume is 0 dBFS ("Decibels full scale"), half linear volume is -3 dBFS, quarter linear volume is -6 dBFS, eighth linear volume is -9 dBFS and so on. The approximate dynamic range of the human ear is 100 dB (Around the difference between the loudness of a rock concert and the sound of rustling leaves in the wind).

In order to properly smoothly fade out sound it has to be done in the logarithmic scale. If 0 dBFS is treated to be "100% volume" then -144 dBFS basically cannot be heard by people and it is a good value to use for "0% volume". To get a "human-corrected volume" level we simply need to interpolate between those two values.

Here are two functions that I use in my sound libraries (They use millibels instead of decibels, 1 dB = 100 mB):

Code:
// The dynamic range of 24-bit audio is theoretically 144 dB
const float MIN_MB_F = -14400.0f;

float mbToLinear(float mb)
{
    return pow(10.0f, mb / 2000.0f);
}

float linearToMb(float linear)
{
    float mb = 2000.0f * log10(linear);
    if(!_finite(mb))
        return MIN_MB_F;
    return mb;
}

This post is a complete mess but I hope it helps solve your sound issue. Smiley

Edit: -96 dB is also another common "0% volume" level to use as it's the theoretical minimum of 16-bit audio.
« Last Edit: April 14, 2015, 07:15:13 AM by Polyflare » Logged

I code stuff.
@Polyflare/@UnitVec
JLJac
Level 10
*****



View Profile
« Reply #3506 on: April 14, 2015, 11:19:37 AM »

@NicoM, yup most of this stuff is totally learnable if you're ready to walk through the shadow of the valley of utter frustration :D That said, I do get things to work, but I don't get them to work smoothly and within slick general frameworks as someone knowing what they're doing would. So hacking on until you get there is totally a good method if you're the only programmer on your project, but I think the code that comes out of it would be an issue if you're many people on the team. I've seen your game and I love love love the art  Kiss Looking sooo awesome!

@Polyflare, wow, okay, that was informative! I had no idea... Thanks so much! I'll try and see if I can implement a similar solution Smiley Toast Right

In work news, placing sound triggers placing sound triggers placing sound triggers. This is my job now, I guess. But you know what, I'm actually going to power through and place them all tonight! There, I promised I'd do it on the internet, so no turning back now!
Logged
Nico May
Level 0
***



View Profile WWW
« Reply #3507 on: April 14, 2015, 08:28:07 PM »

Yeah, solo programmer for now and all self taught, so I I'm happy with lots of hacks, so long as *I* fully understand what they are doing and why (which I rarely do). Also thanks!(: I wish I could say I was responsible for the art:/ but hopefully it'll feel solid enough to get me programmer merit;)

anyway keep up the great work man,
Nico
Logged

JLJac
Level 10
*****



View Profile
« Reply #3508 on: April 15, 2015, 09:46:08 AM »

Update 417
After placing a million sound triggers, I'm taking another(final?) dive in the level editor. This time to allow for the placement of decals - pieces of custom terrain coloration.

Rain world has been a rather monochrome place, and it will continue to be so. However, we want to be able to spice up the occasional room with some color. This editor allows you to place art that is rendered into the environment as two dimensional color on the surfaces of the objects in the world.



Note - not a scene from the game, just me trying out the coloration tech.

Still a few things to figure out. For example, the slight oily effect at slanted surfaces seems to have disappeared, I'll have to find where it went. Another challenge is to make the system backwards compatible. I want the shader to be able to process a level from the pre-decal era and just not render any decals, rather than being messed up somehow. If it can't do that, we'd have to re-render all the 200 or so rooms we currently have, which would be a bad spot. Seems like I'll be able to avoid that though  Hand Thumbs Up Right
Logged
marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #3509 on: April 15, 2015, 11:05:48 AM »

I don't know what the rendering process requires, so bear with me. would it not be possible to batch-render the rooms. It seems kind of constricting, that rendering them again would be such a chore.

the art-idea seems like a good one, gives you more options for interesting backdrops.
Logged

JLJac
Level 10
*****



View Profile
« Reply #3510 on: April 15, 2015, 12:07:55 PM »

It is possible to batch render, but it still takes an awful amount of time. All the rooms would probably require both of our computers working hard for a day or so, during which we'd be limited in the work we could do. But yeah, totally possible! Just to be avoided if possible. Also James has an aversion for the batch renderer because he suspects it doesn't spit out the room pixel-perfectly the same, but this time around I'll do some empirical science on that and if it's actually the case I'll correct it!
Logged
marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #3511 on: April 15, 2015, 12:27:46 PM »

it might be worth optimising the process. it's crazy how much performance can be gained with a little profiling. I know you've put in an amazing amount of work already, but it sounds like a lot more rooms are coming. I can just imagine that sooner or later you will run into the situation anyway, where you won't get by with old versions. in the end it comes down to the question if you can save more time by optimising the process (I guess its used for every new room too) or by adapting your code to run old and new stuff. I must say I don't like having to support multiple formats, it usually just complicates things.
Logged

Crispy75
Level 0
***


View Profile
« Reply #3512 on: April 16, 2015, 06:18:22 AM »

It is possible to batch render, but it still takes an awful amount of time. All the rooms would probably require both of our computers working hard for a day or so, during which we'd be limited in the work we could do. But yeah, totally possible! Just to be avoided if possible. Also James has an aversion for the batch renderer because he suspects it doesn't spit out the room pixel-perfectly the same, but this time around I'll do some empirical science on that and if it's actually the case I'll correct it!

Would be interesting to know some stats on the content generated so far. File sizes and counts, that sort of thing Smiley
Logged
JLJac
Level 10
*****



View Profile
« Reply #3513 on: April 16, 2015, 06:57:56 AM »

@marcgfx, yeah def, but the editor runs in macromedia director, written in lingo, which is sort of terrible, and it's just a jumbled mess of horrible UI and old remnants of stuff that's no longer used. We have officially given up hope on it looooong ago, and we don't think it's worth it to spend any time on it. We're just going to use it to make levels for this game, and then say good-bye to it forever - think of it as an old car that you hope will have just enough life left in it to be able to drive all the way to the scrapyard  Cheesy So yeah but no, I won't spend time slimming the level editor, I'll just make it do what we need it to do and then learn my lesson for the next project.

@Crispy75, each screen texture is a png of about 0.5mb, and the level geometry (once the AI data is baked in) is about the same, so a screen is ~ 1 meg. James hopes to have 700 of those by the end of it o_0 The disk space of the code is negligible, but the music+sfx will likely occupy some space as well.

Question
Does anyone have any experience with loading sounds dynamically in Unity? I set up this huge system for James to be able to import and work with sounds from a folder, only for us to realize that the reason it had been working on my computer was because I was running the unity editor in the background, which added metadata to the sounds as I put them in the resources folder. James is running the stand-alone, which doesn't merge the files into the unity project, and as an effect the loading of the sound files doesn't work Sad

I've been looking at solutions for dynamic loading of sounds in Unity, with no results so far. Theoretically I think I should be able to use a WWW similarly to how I load the levels, and that seems to work to a degree - I get AudioClips out of it instead of null references or something, and there are no error messages, but the AudioClips don't play. Or they play, but they're empty. Their isReadyToPlay property is perpetually false. Anyone has ideas?  Beg
Logged
JLJac
Level 10
*****



View Profile
« Reply #3514 on: April 16, 2015, 09:18:09 AM »

Yay I think I solved it! You need to have a co-routine and yield it until it's done loading... I have to admit I didn't totally understand what was going on, but I found an example on a forum and messed with that until it worked, and then messed some more until it was a piece of my machinery as I wanted it to be. The main problem seemed to be that the solution included a lot of interaction with Unity, creating a game object etc, which is not my strong side. But, we're through I think! Now James can actually start putting in some sweet samples for this thing :D
Logged
tortoiseandcrow
Level 2
**


View Profile
« Reply #3515 on: April 16, 2015, 09:26:11 AM »

Does this mean we start getting to hear some awesome examples of the sound in context soon? I am absurdly excited to hear the wet patter of slugcat paws on rain-slick ground.
Logged
JLJac
Level 10
*****



View Profile
« Reply #3516 on: April 16, 2015, 09:36:15 AM »

Yeah I'm super stoked too! But it might be a couple of days, James says he needs to re-invent the sound world somewhat to fit the new less low-res art style, and that sounds to me like sitting very very many hours with headphones turning knobs very very slightly. And also my blunder with the import stuff which stalled us for an entire day... I have no doubts it's going to be super sweet though!
Logged
Crispy75
Level 0
***


View Profile
« Reply #3517 on: April 16, 2015, 10:22:11 AM »

Yeah I'm super stoked too! But it might be a couple of days, James says he needs to re-invent the sound world somewhat to fit the new less low-res art style, and that sounds to me like sitting very very many hours with headphones turning knobs very very slightly. And also my blunder with the import stuff which stalled us for an entire day... I have no doubts it's going to be super sweet though!

I cannot wait Smiley This should be good for some fresh press, IMO.
Logged
fall_ark
Level 2
**



View Profile
« Reply #3518 on: April 16, 2015, 10:42:57 AM »

Yeah I'm super stoked too! But it might be a couple of days, James says he needs to re-invent the sound world somewhat to fit the new less low-res art style, and that sounds to me like sitting very very many hours with headphones turning knobs very very slightly. And also my blunder with the import stuff which stalled us for an entire day... I have no doubts it's going to be super sweet though!

But it might be a couple of days

Who, Me? You guys really are something else. The speed at which new and important features come through for this project is absolutely amazing.

Hopefully we'll see another Alpha with sound soon-ish as well. Coffee
Logged

Chinese localizer and influencer. Translated Dead Cells, Slay the Spire, The Count Lucanor, Katana Zero, Dicey Dungeons, and involved in the localization of Reigns, The Curious Expedition, Desktop Dungeons, etc.
If you have questions about Chinese loc and publishing etc., find me at Twitter @SoM_lo
tortoiseandcrow
Level 2
**


View Profile
« Reply #3519 on: April 16, 2015, 10:43:57 AM »

very very many hours with headphones turning knobs very very slightly

The one thing that made me feel better about the weird, erratic pace of sound design is this quote from an interview with Tim Hecker:

"Studio work is a kind of mix of dull, bludgeoning, plodding, getting-nowhere feelings of hitting your head against the wall, mixed with these amazingly crystallized moments of epiphany and revelation and vision."
Logged
Pages: 1 ... 174 175 [176] 177 178 ... 367
Print
Jump to:  

Theme orange-lt created by panic