—    —  Home

   JLJac on April 08, 2016, 11:09:25 PM:


I'd say they should give different results.  In the first, each attempt can be a success but in the second, using power you lower the random value and thus the chance of success.


Nah I'm increasing the chance of success by lowering the random value, because it's a positive if the random value is lower than the chance!


BUT, using the code below while the average random value is indeed ~0.5, the power averages are very different:
average  UnityEngine.Random.value ^ 2 = ~0.33
average  UnityEngine.Random.value ^ 3 = ~0.25


Hmmmm is this true? Because if the average of Random.Value is ~0.5, the average of Random.Value * Random.Value should be ~0.25, to my mind? I might definitely be missing something, probability is so incredibly tricky! Something about how averages actually work, for example  Cheesy

Maybe I should manipulate the chance rather than the dice roll, to keep things a bit saner. I did try something along the lines of:

return Random.Value < Mathf.Pow(chance, 1f / time);

But that seemed to yield the same results as the other faulty setup. One thing that might be playing into this is that I never studied any math above the high school stuff and that's loooong ago, so I just don't have any idea about a lot of stuff.

In fact, TIL that a variable can be not idempotent in C# — that's a seriously scary WTF to me.   Shocked

Whaaaaat that's scary!  Shocked

In my experience my Unity + C# setup has been perfectly deterministic so far (if that's what idempotence means) even when using Random, as long as the random is fed the same seed. I'm even relying on it to a pretty large degree with the randomized creature generation - all the critters save is a seed, and the next time they are to be brought up on the screen they generate their features from that seed... And they've been looking consistently the same so far, at least!

As for the two functions, I should probably have clarified - I understand that they won't return the same bool, because of the one UnityEngine.Random call versus the many - but I expected them to have the same probability of returning a positive.

Currently I just have the loop solution implemented, and it seems to be working - it just annoys me because I feel like repeating over the same line of code lots and lots of times should be unnecessary when there's probably some slicker and less performance heavy solution at hand. Then again I'm not actually experiencing any lag from this. The "time" variable is usually about 40-70 and this TimeInfluencedRandomRoll method is called a few times a frame, which might be fine? For loops should only really be a problem if they have something heavy inside of them, and this loop content seems pretty slim. Still though, rather inelegant!





   JLJac on April 09, 2016, 02:11:44 AM:

Thanks for the explanation of idempotence!

Yep yep, I get that random.value returns a value 0-1  Wink So

return Random.value < 0.45f;

has a 45% chance of returning true, right?

and

return Random.value < Mathf.Pow(0.5f, 2);

is 25%, or equivalent to flipping a coin twice and getting side A both times. What I'm after thought is the chance of flipping a coin twice and getting A any time. That's what I did the Math.Pow(1f/chance) thing for, but looking at it again either of these

return Random.value > Mathf.Pow(0.5f, 2);

or

return Random.value < 1f - Mathf.Pow(0.5f, 2);

would seem more reasonable, as they do have the 75% chance we're going for...?





   jamesprimate on April 10, 2016, 04:17:54 AM:

we made it fam






   jamesprimate on April 12, 2016, 05:52:54 PM:

ACTUALLY its funny that you mention this! Joar was just implementing something along this line of thinking...





   jamesprimate on April 13, 2016, 07:16:25 AM:

correction! it was *discussed*, but not implemented yet. im sure joar will want to show gifs when it is, so pardon me being vague  Giggle





   JLJac on April 21, 2016, 06:04:51 AM:

Thank you! That actually makes a ton of sense. Will try!

Update 526

Hmmmmm....



This month so far has been weird glyphs and very very secret stuff... Mysterious!

Now we're getting ready for PAX, where you can drop by and see James if you're in boston!





   jamesprimate on April 21, 2016, 08:59:36 AM:

Same language system as throughout the rest of the game! Just extrapolated for some more specific uses  Hand Thumbs Up Right





   JLJac on April 21, 2016, 12:04:01 PM:

Male and female bathrooms?

Dammit, that was supposed to be a puzzle for the entire community to solve over several months!  Facepalm





   jamesprimate on April 25, 2016, 10:44:23 AM:

YIKES   Waaagh!





   JLJac on April 25, 2016, 12:49:28 PM:

 Shocked Shocked Shocked Shocked Shocked

Update 527

Scavenger outposts!



Scavengers have Rain Deer skulls on poles here and there throughout rain world, and they hang out underneath them. If you approach, they'll make clear that it's not OK for you to pass through the outpost. Trying to force your way through will be met with violence, and a general bad reputation impact with scavengers. If you offer some nice gifts though, they might let you through.

To make this work I had to do quite a lot of AI work with the scavengers. New is a "player is offering a gift" part of the social event engine, which currently is for scavengers only but which I hope to extend to lizards etc.

For scavengers specifically they've been outfitted with a communication AI module, which allows them to walk up to the player and do some gesture animation if they feel the need to reach out to you.





   jamesprimate on April 25, 2016, 06:05:08 PM:

those scav outposts look so amazing!!  Shocked Shocked Shocked


less exciting i know, but i just put up a new kickstarter wrap up of the past few months:
https://www.kickstarter.com/projects/rain-world/project-rain-world/posts/1532742

You guys have probably seen most of it, other than a video i quickly did showing off the audio, music and new dynamic "threat music" system:








   JLJac on April 25, 2016, 11:18:51 PM:

Can scavengers climb up and hang from/play on the skull?

They've clearly written on the skull, which makes their level of intelligence less ambiguous.
What are those pearly electric(?) lights? The elderly looking one is holding one of them like some sort of treasure. Have we seen those before?
Is that writing...or pieces of flesh and blood still clinging to the bone?

They can't climb on the skull sorry! As for the red color, that's intended to be a bit ambiguous.

As for the glyph speculation, I endorse it but will give you no hints  Wink





   jamesprimate on April 26, 2016, 05:37:00 AM:

Thanks all!

My ears are very sensitive, so - except for being a bit heavy on percussion, I believe it was fantastic. Will we have an in-game option for turning that down ?

Yes! And I agree with you that the balance is a bit off in that vid. Will fix  Hand Thumbs Up Right





   jamesprimate on April 26, 2016, 06:45:59 AM (Last Edit: April 26, 2016, 06:51:45 AM):

thank you!

yes, as the threat music ramps up it becomes more recognizably melodic / harmonic, and for some situational contexts.

its funny that you mention it, because we actually started with the concept of it being more-drone based, but for a variety of reasons that didnt quite work. then the original versions of the threat music loops were much more active melodically / harmonically, but we found that the ear wanted to follow the melody line or the harmonic progression so there was an awkward sensation when the music would fade in or out halfway into the loop. the percussion is great because it can be subtly ramped up or down without being too obvious, and is effective at building tension in a linear way. but if the player remains in a higher degree of threat, you'll hear a more fully assembled track.

this is all the layers from Suburban, which is the one that you can hear bits of in the video: https://clyp.it/udj0xjnt

you wont ever hear all of them together, as there are 10 layers here and in-game system goes up to 5 layers, but the idea is that its something thats constantly shifting for each dangerous situation you encounter. there is a hierarchy for how the different layers come it and out, etc., so hopefully it never gets too stale (one of my biggest fears!)


edit: OH! a curious note about the high lead line on that track... each of the threat music "songs" have something like this, and its kind of supposed to be as if a slugcat is singing a lonely caterwauling tune XD






   jamesprimate on April 26, 2016, 10:30:45 AM:

this is all the layers from Suburban, which is the one that you can hear bits of in the video: https://clyp.it/udj0xjnt

you wont ever hear all of them together, as there are 10 layers here and in-game system goes up to 5 layers, but the idea is that its something thats constantly shifting for each dangerous situation you encounter. there is a hierarchy for how the different layers come it and out, etc., so hopefully it never gets too stale (one of my biggest fears!)


edit: OH! a curious note about the high lead line on that track... each of the threat music "songs" have something like this, and its kind of supposed to be as if a slugcat is singing a lonely caterwauling tune XD
James,
Is this what we would expect from the arranged OST? The full 10-layer complement of the tracks?

This track sounds amazing, by the way. Fantastic work.

probably the arranged threat music tracks, plus the other 130ish other "regular" tracks as well XD i honestly have no idea how thats going to work out yet logistically. maybe ill ship it on a hard drive or something, lol

thanks for the kind words guys!! im excited to finally be able to show some of it to you all  Beer!





   JLJac on April 26, 2016, 01:22:06 PM:

Update 528

Scavengers can send out a "kill squad" to hunt you down if they really hate you, or if you've transgressed an outpost, or both. Kill squads are not to be played around with - they will track you region wide and wreck you once they find you.

Personally, playing with these kill squads hunting me really revived the fun to my experience by introducing a tension I haven't had from lizards etc in a long time now. The lizards used to be worthy opponents that I felt cunning and smart when I managed to trick, but I've gotten used to them. When reading the terrain I know where there might be a lizard and where there might not, and while they are still dangerous if I'm being reckless, I have a sort of "lizard safe" play style where I just move between safe spots and very rarely am surprised by them. Also because of their somewhat limited ability to track you across several rooms, I know that if I manage to put some 3 rooms between me and a lizard I can basically count it out.

Scavenger kill squads, not so much! As they use ranged combat, the safe spaces in any given terrain are way smaller - I can't just jump from pole to pole to avoid them. Rather, when setting myself up with the challenge of traversing a region while being hunted, I've found myself resorting to weird paranoid tactics such as moving stealthily between crawl spaces under the floor, or traverse the level up in the rafters rather than on the standard floor level, out of fear that they might suddenly pop up and throw a spear at me, approximately 1.2 seconds between my first spotting them and being dead.

If I'm fighting back, I have to employ some weird rambo style guerrilla warfare where I stay hidden as much as possible to suddenly pop up and take out an isolated target. I had a really intense moment where I saw the squad enter the room, so I hid under the floor. Lying perfectly still I could see something like 8 scavengers gather on the floor above me, still unaware of my exact position but spreading out in the room looking for me. They were going to see me sooner or later, so when to initiate the violent rush for the exit? Tense! And extremely difficult - just getting from one gate to another in a well known region takes some 5 tries for me, who have played the game quite a lot over the last few years  WTF

Technically it works by the squad "magically" knowing where I am on the world map, and gravitating to that general area. They won't see me through walls once they're in the room though, so staying hidden is still a viable tactic. Originally I had a pretty purist approach to the AI not ever having access to information about anything it shouldn't actually know, but despite all my efforts the AI will always be pretty dumb compared to a human - so cutting them some slack by letting them know which general area to look in while still having to find you in the actual room felt like a good hybrid for keeping the suspension of disbelief alive while also promoting exciting gameplay.

It should be noted that this behavior from the scavengers will only be engaged in if you're consistently really bad to them, to the degree where their entire society declare you public enemy. So it's mostly a feature for experienced players who want to get some excitement out of playing a war-like run, or really really bad people who deserve the punishment  Evil

On the brighter side, if the scavengers really like you, they can send out a "chill squad" which works basically the same, except that instead of spearing you on sight they'll hang out with you as you move through the region, and instead utilize their rocks and spears to protect you from whatever lizards and vultures might be on your tail. The chill squad is not as intense an experience, but it feels really nice to cruise around with your scavenger pack! I hope it will be a cool reward for the player that puts a lot of effort into building a good relationship to the scavengers.





   jamesprimate on April 26, 2016, 03:53:17 PM:

Joar's been in the gamedev battlefield too long, hes going commando!





   jamesprimate on April 26, 2016, 08:52:53 PM:

They definitely look a bit like Taoist Talisman...



good eyes! there might be some kind of connection...

Are stones and spears still the only means of attack? I know there are more defensive organic tools like the flare fruits and smoke pods

i think Joar has some ideas for expanding that a little bit, but it'll be mostly the stuff that you know





   JLJac on April 26, 2016, 10:40:35 PM:






   jamesprimate on April 28, 2016, 09:01:31 AM:

A very nice 15min in-depth sneak peek with Gamespot from PAX East :