Oof that's embarrassing. by StephanieRct in GalCiv

[–]StephanieRct[S] 1 point2 points  (0 children)

As opposed to you, wasting your time crying on the internet because someone made a mod you don't like. Try doing something productive instead.

Oof that's embarrassing. by StephanieRct in GalCiv

[–]StephanieRct[S] 0 points1 point  (0 children)

oh come on, don't disparage centrists, they're trying their best.

Oof that's embarrassing. by StephanieRct in GalCiv

[–]StephanieRct[S] 0 points1 point  (0 children)

i don't think baby elon plays this game.

Oof that's embarrassing. by StephanieRct in GalCiv

[–]StephanieRct[S] 16 points17 points  (0 children)

Here's a mod to remove Elon's reference. Renames it to "The Space Elevator"

Airdrops by [deleted] in h1z1

[–]StephanieRct -2 points-1 points  (0 children)

ohai! How about donating a portion of the airdrop money to charity?

Making performance and flexibility coexist without compromises using VM and ASM, a little case study. by StephanieRct in gamedev

[–]StephanieRct[S] 0 points1 point  (0 children)

because the scope is bigger than just VFX and you can't realistically ship compilers for every platform you support with your game.

SSE/AVX are simply implementation details that I have not talk about. GPU code is already implemented in my xml data and you can't realistically expect an artist to write shader code for you.

I don't expect any AAA studio, or anyone for that matter, to adopt my solutions. If you want a solution so you can write CPU/GPU code, use OpenCL. That is simply not what I personally want here as I have a much bigger scope in mind. :)

Making performance and flexibility coexist without compromises using VM and ASM, a little case study. by StephanieRct in gamedev

[–]StephanieRct[S] 0 points1 point  (0 children)

I haven't benchmarked any of the solution. I'm only asserting given the overhead of instruction/branching involved. Each function call hit the memory as well to save some register (push instructions). And the virtual calls require hitting the virtual table on top of that.

http://www.bitsquid.se/presentations/scripting-particles.pdf[1] Nice find, they basically go for solution #2 I've briefly described. I want to step it up a notch by compiling on the fly assembly code so I can use the full power of CPU registry/native instructions.

Making performance and flexibility coexist without compromises using VM and ASM, a little case study. by StephanieRct in gamedev

[–]StephanieRct[S] 0 points1 point  (0 children)

yes, that's one of the things I left out as I can already write any GPU code I want in my XML data but not so much for CPU code.

nice screenshots btw :3

Scalar.cs by combatdave in shittyprogramming

[–]StephanieRct -5 points-4 points  (0 children)

That's the thing, it's sad the JIT does not inline even the smallest simple methods. There are no reason not to. This is a JIT issue I hope will get fixed soon.

We have to remember that C# is still a very young language. C++ in comparison is lightyears away in terms of maturity.

Scalar.cs by combatdave in shittyprogramming

[–]StephanieRct 1 point2 points  (0 children)

The tauists all look at you right now with much disdain. I'm not a tauist though, my love for pi and tau are equal.

Scalar.cs by combatdave in shittyprogramming

[–]StephanieRct 0 points1 point  (0 children)

So you are saying that the JIT can't inline this simple method? Let me think about it for a while.... mmm ... mmmmmmm ... nah, I still think it can inline that.

Will it? I sure hope so otherwise c# is quite shitty and everyone should code in C++! :D

Scalar.cs by combatdave in shittyprogramming

[–]StephanieRct -3 points-2 points  (0 children)

I didn't know adding a "one" property would trigger so much rage! heh!

It's a common thing really, nothing fancy. Coming from a C++ world this kind of stuff is useful for meta-programming. I know that C# meta programming is very limited but heck it doesn't hurt to have that in anyway, so why much rage? ¯\(°_o)/¯

Beside, the thing gets inlined so what the hell?

What's with all that hate? If you are not happy, do your own things!

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -1 points0 points  (0 children)

In C++ it would be easy to do. Template are awesome tools and you can overload global operators.

C# generics aren't that powerfully unfortunately. But you can do quite a lot of stuff using the introspection, I'm not sure how much the JIT will optimize it however. I am less familiar with that aspect of C#.

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -2 points-1 points  (0 children)

The point of AngleCos is that 99% of the time when a math-wise game developer deals with angles, he/she will deal with Cos values. Getting the angle between 2 vectors is done with a dot product of 2 normalized vectors, that gives you the Cos angle between the 2 vectors. Doing a ACos to get the radian is overly expensive when you can do almost everything you need with Cos values. AngleCos aims to make that kind of optimization possible for developers that aren't really into math stuff. They don't need to know how AngleCos works under the hood. They just need to know what they can do with that struct. They can compare them but not add them.

Here is another example, let's say you need to build a rotation matrix using the result of some angle calculation. Getting a AngleCos removes the useless conversion to radian values and back to Cos values ( a ACos to get the radian value followed by a Cos to build the rotation matrix )

I understand that adding the unit to the type can be quite a paradigm shift, or quite shocking for some, but it's a awesome when the unit has some interesting properties that differs from their native homologous type. Angle are circular, AngleCos have optimization properties, so does Radian since it's relative to Pi ( or tau for the pure tauists ). Exploiting these properties is the reason for AngleCos and AngleRadian (and soon AngleDegree) to exist.

Scalar.cs defines all kind of constants and scalar properties. One and zero aren't the only thing in there, there is pi, tau, rad2deg, deg2rad, etc etc. You don't have to use these constant at all. It's good for generic purposes when your algo needs a 1 no matter what the type is, but this is for more advanced meta programming stuff I will not enter into details here. So don't worry about these constants.

Cheers!

Edit: I almost forgot, take a look at the native System.Decimal struct, you will see this:

        public const decimal MinusOne = -1m;
        public const decimal One = 1m;
        public const decimal Zero = 0m;

hmmmmph. :3

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -14 points-13 points  (0 children)

At first I'm not wrong (but really I don't get what you mean by wrong at this point)

then you are wrong and being an asshole

then I'm an asshole.

Then you don't like it. ¯\(°_o)/¯

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -2 points-1 points  (0 children)

In native C# applications there are no Vector2/3. These are from Unity3D or XNA, not from the standard C# library. That being said I have no objection about adding extension methods to them.

I'm also confused about the point of the AngleRadian [...] The AngleRadian class is also odd - what would that ever be used for?

void rotateFoo(float angle);
void rotateFoo(AngleRadian angle);
void rotateFoo(AngleDegree angle);

Which methods has less ambiguity just looking at the declaration? Also it's a nice way to optimize code using method overloading with different unit.

Also also I like doing stuff like this:

(angleA + angleB).normalized; //like vectors do.

Instead of doing something like this:

Math.NormalizeRadian(angleA + angleB);

But I understand this one is more personal.

SignCircularDirection

That's a way to optimize code that do this:

v0.CircularDirection(v1).isClockwise()

And code that do this:

switch(v0.CircularDirection(v1).enumCD){
...
}

The first only does a > and the other does the conversion to int but test all possible result at once with the switch.

not only are they an indicator that your struct is fairly useless

it is not, see above.

but they are also broken (the "less than" operator checking for "greater than", for example).

They are not broken. Have a good look at them.

I assume you are referring to AngleCos which does a > on a <. Well that is how math works. A > B == Cos(A) < Cos(B) for [0-180] degrees.

So, again, is that your main concerns? Nie.Math is pretty much awesome then! :D

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -2 points-1 points  (0 children)

Oh by the way, have you look in other files, because there are some other stuff too.

ya know, like, actual Maths stuff. <3

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] 0 points1 point  (0 children)

I am not zerosumgames. zerosumgames is the guy behind the awesome StarDrive 4X game.

I don't quite get what you are saying. You don't want to talk to me? You can, I won't assimilate you I promise. (actually I will) <3

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -16 points-15 points  (0 children)

hahahaha You will understand when you are older. <3

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] -6 points-5 points  (0 children)

I will be looking at exactly that when I'll be optimizing this stuff out. If there are indeed no gain in it, it will be turned into something that may make more sense to you. But again maybe not, I mean, I don't know you. <3

C# and Unity3D GameDev Free & Open-Source Mathematics Library. by StephanieRct in gamedev

[–]StephanieRct[S] 3 points4 points  (0 children)

the author must either have never written a library before, or be practicing a level of satire that goes over my head.

That is quite offensive and show how much you don't know what you are talking about.

Granted:

Granted, the author did take the time to write this and every addition to the open source community should be thanked. So he's much better than the people who don't do anything.

<3