« first day (3940 days earlier)      last day (1070 days later) » 

12:00 AM
Thanks! It was fun to put together! ๐Ÿ˜Š Still got a few features I want to toy with adding yet...
 
 
9 hours later…
9:17 AM
Guys how come 1f * 11f - 11f is returning -0.00000xxx instead of 0?
 
Let me see that. I know about precision errors but I don't know the details of them. And it's not giving me the problem when I use literals but it is giving me problems when I assign the values to variables
 
I'm not able to reproduce that problem.
public void TestFloatMath() {
        float a = 1f;

        float b = 11f;

        float c = 11f;

        Debug.Log($"Testing a * b - c = {a}f * {b}f - {c}f = {(a * b - c).ToString("R")}");
    }
 
nwp
Floating point registers are longer than their representation in memory. I think it was 84 bits, but I'm not sure. Chances are if you switch to release mode the compiler keeps the values in registers and the effect disappears.
 
user92578
9:26 AM
Yeah same can't reproduce that
 
So, I'd expect one of the calculations leading to one of the three variables is returning something slightly different from 1 or 11 - you've lost precision somewhere earlier in the pipeline, not in this line.
 
wait
ClipPoly(ins, intermediateVertCount, outs, 0, 1, -rowWorldZ);
inside ClipPoly:
d[vertIndex] = (pnx * ins[vertIndex].x) + (pnz * ins[vertIndex].z) + pd;
pnx is 0, pnz is 1, .z is exactly -11, pd is exactly 11
and d[vertIndex] will be -0.00000000x something
 
user92578
What are the data types there?
 
Try printing these inputs out in round-trip precision to ensure your IDE/output isn't rounding them for display.
 
all floats tyyppi
 
user92578
9:31 AM
Then I'm doubting "exactly"
 
Gregory how do I do that?
 
In C# you can use .ToString("R") as I demoed above. I'm not sure what language or framework you're working in.
 
C#, let me see
yep
pd is 10.99999999999999
but IDE says 11
 
That'll do it. You might be able to configure your precision display somewhere, depending on your IDE.
 
why doesn't IDE show exact value tho?
 
user92578
9:40 AM
But then that has to be different than .z
 
.z is -11 exactly
 
user92578
right yeah
 
user92578
IDE probably doesn't show exact value because usually just generic range of values is enough, and the full precision is not super easy to decipher when there are multiple of those
 
Single-precision floats default to 7 digits. 10.99999999999999 rounded to 7 digits is 10.99999 + rounding up = 11.00000
Round-trip precision is much more verbose, so we usually only use it when trying to serialize/deserialize data, or debug.
 
9:59 AM
floats also vary based on things like compiler used, operating system, etc. If that's relevant
 
Good article about what is and isn't deterministic/guaranteed in floating point. They're more consistent than we usually give them credit for, but there are still enough gotchas to bite us in programs of significant complexity.
2
 
 
3 hours later…
1:07 PM
If floating point can be made to be non-deterministic then couldn't that be leveraged in Pseudo Random Number Generation? Perhaps even to the point of eliminating the Pseudo?
This calls for more reading
 
Haha, not quite the right kind of non-determinism.
 
nwp
It'd be difficult to prove that the distribution is uniform.
Using AES instructions is probably better.
 
For an RNG we want "I get a statistically uncorrelated result from each subsequent invocation". For floating point what we have is, "Results can differ if you re-compile your program under different conditions"
Within a single running instance of a program, the same floating point computation will give the same result, again and again, unless you have some library code somewhere changing the precision/rounding settings on your thread without your knowledge. (In which case, it can be only as random as that library code, or less so)
So, it doesn't help us solve the problem of "how can I de-correlate the results from multiple calls to this function within a single running instance of my game"
 
1:29 PM
We often talk about floating point numbers like they have some quantum weirdness going on, or random bit rot. But actually the standards give very good guarantees about what bit patterns and precision you get after each operation, given your settings. The main trouble is that there are so many settings and ways compilers could arrange your code, that are difficult to verify they're all identical/equivalent.
 
1:52 PM
Makes sense.
 
nwp
Recompile the program with a random flag each time you need a new random bit.
 
user92578
2:42 PM
Rich strings are annoying :( I'm hacking in multicolor string support to ImGui and embedding special color code strings into the rendered text is basically the only neat way to do this without refactoring the whole library, but it will involve some annoying extra layers of first embedding the color into the string and then parsing it out while copying the non-color data into a separate buffer for the actual rendering pass...
 
user92578
For my own game text rendering I have a rich string class composed of sections of text andor sprites with color, size etc. properties, but constructing those isn't super fun either, but at least that skips the construction&parsing overhead
 
3:02 PM
random.org uses atmospheric noise to generate random numbers. Probably about as close as we can get
 
You can get custom RNG hardware.
 
Saw a neat project a while back about making a DIY radiological RNG out of a smoke detector and a webcam...
 
I thought there was a site that used physical dice & camera, but I can't seem to find it now.
I think maybe it was DiceOMatic.
 
3:33 PM
There's also some PC cards you can get that use some quantum mechanical system to generate random data
 
 
3 hours later…
6:12 PM
Hmm.
It appears my project is indie now. My brother and I got into an argument in which my brother protested that he get 50% shares when all he does is audio. I have to script and make the game in unity, I also have to make the models, handle legal stuff, promotional things like ads, and everything else. He for some reason did not understand this so I had no choice but to exclude him from the project. He would not stop arguing about how he should get 50% shares for his audio.
It clearly wasn't going anywhere.
 
user92578
Sorry to hear that. "Indie" btw does not mean the same as "solo", you two as a team still would've counted as indie :)
 
He kept on repeating that scripting was easy and was only worth 5% shares. This angered me, because scripting is very difficult and if audio is worth 50%, scripting is worth far more. He also said model-making is easy and audio is harder, which I do not think is true. Everything the player sees in the game I must make. This is more difficult than everything the player hears. The player's experience is more defined by visuals than it is by sound.
 
Yep. And when you get close to the end, you can ask him to do audio for a fixed price.
 
Close to the end, you mean so that I have everything already laid out?
I see.
 
Yes. Once you know what audio you need.
 
6:19 PM
Right.
 
Also, maybe if he think it's easy he could lend a hand ;P
 
yep
 
user92578
Comparing difficulty in either direction probably won't get you very far. Personally I struggled with audio a lot, it's definitely the least polished area of the game just because I lacked a lot of experience with it.
 
It was my project from the start, and he decided to join in. So it felt as though he was trying to take over the project, and he starting using caps lock on his messages and the entire message bold.
But @Vaillancourt very good point. When I'm close to the end, I'd have so much done already that he couldn't take the project away from me, because at that point, he cannot begin to assume roles as something else when I've already done everything in that job. So by that point, all he'd be is "the audio designer", nothing more.
Also a great idea in "fixed price", I mean, at that point, He won't be getting shares, he'll be getting a set amount for his work. As if I hired him. This way, "Shares" isn't a problem, because he's a hired worker and nothing more.
 
Yeah, and don't "share profit", pay him $200 as a one shot deal for the job that needs to be done, and make sure he transfers the copyright ownership to you.
 
6:24 PM
Right.
 
Just be prepared to pay a substantial amount, even for one-shot work - good audio design is not cheap.
 
Yeah; I suppose you'll need to negotiate the price with him.
 
Yeah, but he isn't a professional audio designer and he often goes about making his own music for the game when I ask clearly for "Rock" and all he makes is "Techno" which isn't my type of thing.
 
I've paid more than Vaillancourt's estimate there for just a couple of background music tracks. It sounds like you game may have substantially greater needs.
 
Definitely.
 
6:26 PM
Might just be time to find a different contractor then. ๐Ÿ˜‰
 
Yeah
 
Not that "sharing profit" is bad per se, it's just that if you end up sharing the profit with a lot of people you'll end up with very little profit for yourself (Unity takes a cut, Steam takes a cut, etc).
Oh right, I don't know at all how much this costs :P
 
user92578
But also you're not down anything if you end up flopping :D
 
My brother started trying to control what happens to the game he was talking about putting the game onto fishy game stores that I've never heard of. Steam wants how much cut? Oh, and luckily Unity takes a set amount per seat, which is tiny for 1 seat.
@DMGregory How much for a couple of background tracks? Just trying to get the idea of how much this stuff pays
 
Also, I don't recommend new creators accept deals where the only payment is shared profit, because as we covered before, most games do not turn a profit. So that's an easy way to end up on the hook to do work for no payment. ๐Ÿ˜Ÿ
I don't remember the exact figures, as this was several years ago.
 
6:28 PM
Huh.
Yeah, and if the game gets good, taking profit, they get far more than they deserve.
I think Unity also handles the issues if someone tries to copy my game.
But the only thing is, all my favorite games are made with unreal, which tells me that I may want to go with Unreal as it may work better than Unity.
 
I don't think Unity handles protecting your game from cloning, no.
 
Like, Unity games aren't always "official" or "good" in any way. Whereas I refer to Unreal games as "real" games, or should I say "Unreal" games. ;)
 
What you're perceiving there is accessibility, not quality.
 
wdym
 
Unity is very easy for beginners to pick up, so you see a lot of games made by beginners.
 
6:33 PM
I mean, I know the capabilities of Unreal, seeing what it can do in Borderlands 3.
 
There's nothing inherent in a Unity game that makes it "not real". Lots of titles by big commercial studios use it too.
 
@Wasabi If scripting is so easy, let him do it.
 
The quality of a game comes more from how the development team uses the engine (and the budget they have to spend time on it), rather than which engine they used.
 
good audio is definitely not cheap, but it's not 50% of the money either
Like Nidhogg in GameMaker
 
@Almo Lol, yeah. He'll come whining back to me with a real understanding of how difficult scripting really is within no time :D
 
6:36 PM
Hearthstone, Rust, Cuphead, Ori and the Blind Forest... these are all Unity games
Beat Saber too I think
 
Kerbal Space Program, too.
 
Cognizer is a small game, but it is a "real" game.
 
Is it Unity?
 
yes
I wanted the easy cross-platform it gives
 
@Almo By "real", I meant the games someone would be playing on a PS4, and the game would have been bought from some place like gamestop.
 
6:37 PM
that's totally not a good definition of Real
 
You can make PS4 games on Unity, and people have.
Fall Guys, Lovers in a Dangerous Spacetime, Apex Legends, Valorant are all Unity games too.
 
Lol, I just found a question that seems an awful lot like my brother. But still, I'll respond to it as if it were any other person.
 
Valorant?
WOW
 
You don't have to respond to it. It's best not to stir up interpersonal drama on StackExchange.
 
I had been under the impression they made their own engine
 
6:41 PM
"Legends of Runeterra and League of Legends: Wild Rift are multiplatform titles made with Unity that expand on Riotโ€™s beloved franchise."
 
6 years dev before release on Valorant...
I mean, get it right. no complaint
but that's a long time
 
@DMGregory Right.
 
Wild Rift is very good
 
Ah, it might be that Valorant is using a Unity service but not the engine itself. The case study is a little vague.
 
I can imagine using unity for the most part, but they probably had to put in their own network code
 
user92578
Valorant is UE4 I'm pretty sure, but Unity owns the company making the whatever voice product Vivox that Unity page is plugging
 
I could believe that
 
If a person makes the 3 main protagonist of the game, and spend 2 years working all the details, they could be paid more than the person who made 300 models which are all background items.
 
True.
This is why I say that what they are making also plays a role in the amount they are paid.
 
You might want to reflect on the fact that this is an area where you don't yet have much experience yourself. You might not be the expert voice to weigh in on this topic just yet.
 
6:51 PM
Very, very good point.
 
You can get there, but work up to it in stages. Try to ship a commercial game before opining on what it takes to do so.
 
I also don't want to get any of our stuff mixed up into Game Development SE, so best to avoid aggravating input. Best I not get involved with it.
 
That's quite a thing to say after replying to the post four times. ๐Ÿ˜‰
 
Yeah.
But, best to refrain from it now before it gets too late.
 
7:08 PM
@DMGregory lol, "90-10" So unrealistic. I didn't mention any shares because I cut it off. Speculating on shares before going solo isn't necessary.
 
Keep in mind that this chat is publicly visible.
 
Yeah.
Very true.
 
Also, I'll note that you're continuing to reply to that thread after you agreed it might not be a good idea, and giving advice about how to finish a game when you yourself have not finished a game.
 
Oh yeah. I'm just trying to help where I can. Avoiding the topic of the whole shares thing.
If it has nothing to do with the shares thing, I guess it isn't harmful, I mean the user also appears to be new to SE.
 
 
4 hours later…
10:48 PM
anyone who was helping me with my 100 bullets per second audio problem, if you are curious, what i did was:
dedicate 16 audio channels to bullets. If a bullet wanted to shoot within 50ms from the last bullet from same gun, just dont play any sound. Add a 5% pitch variance to all bullet sounds. If all 16 channels are being used, take over the oldest channel (cutting off the currently playing sound).

it turned out pretty well. Thank you everyone for your help
 
11:10 PM
Smart! I love the sound of that solution. It might be worth posting as a Q&A on the main site that we can link other folks to when they have similar issues.
 
11:49 PM
Good idea. I'll do that tomorrow
 

« first day (3940 days earlier)      last day (1070 days later) »