« first day (1820 days earlier)      last day (3197 days later) » 

1:00 PM
@Tyyppi_77 get the hit position, instantiate a sprite, make it slightly transparent, rotate it randomly, change the scale slightly to stretch for some variation
 
Pip
@Joe you can't switch on non-const cases in C#
basically in each case whatever:, the `whatever has to be compile-time constant
 
@Joe I have a Material, and a bunch of declared Materials, and I want to compare the material to see which material it is, but C# is saying it has to be an int, string, enum, or something basic
 
Joe
you can cheat it I think... switch(true){ case (newCondition >999):
dont know if youd want to, or if that helps
 
meh I'll just if it
 
user92578
We were talking about this blood right?
 
user92578
1:03 PM
 
@Chris So ... Dictionary<Material, MaterialType>?
 
the blood against the solid ground blocks are heavily skewed/scaled
if anything I think I change the rotation on them
 
user92578
How do you make sure that it doesn't render the blood sprite on the wall?
 
@MartinSojka that'd be a good way actually, store the key and what to do
@Tyyppi_77 I don't. there's always a wall, plus it's heavily shadowed, so I can get away without having to mask or clip any calculations
so it's always partially overlapping the block onto the wall, but it looks fine -- is part of my art direction I chose, bit of an easy solution
 
As a recovering C addict in the C++ phase, it's a little painful to invoke a hash table lookup when the type ID could be jammed into the Material struct and recovered with a single dereference
 
1:08 PM
if I had a scene like your outdoor stuff, I'd probably choose a few pre-made sprites that are cut off, and choose them to fit
 
Joe
hmmm have to do android debugger attaching over the network... doesnt work via usb or bluetooth
 
user92578
Oh right the shadow borders between the ground blocks and the back wall hidens the overlap I suppose
 
@Joe wtf lol, I had to use USB and the other options didn't work :P
 
@Joe you could try using the ADB Log thing and just see?
 
user92578
Yeah I can't really do that in GunHero
 
Joe
1:09 PM
@MickLH i can use unity remote on USB
 
user92578
But thanks for telling me how you did it!
 
Joe
but I cant get the damn usb working for on device app build
 
user92578
Okay G-gaps won't show atleast for now. SDL_TTF is stretching the font so the gap is disappearing
 
@Tyyppi_77 You can scissor your blood rendering to get the same clipping effect
 
user92578
That'd probably be quite tricky to implement
 
1:10 PM
@MickLH That would be my preferred solution if I can change Material. I might not though - it might be a third-party library, for example. A dictionary lookup is the "safe" (if slower) variant.
 
@MartinSojka Oh I saw the validity in your reasoning, I'm not calling anyone out except myself :P
@Tyyppi_77 Are you using SDL rendering functions, or OpenGL
 
user92578
SDL
 
Then I have no idea, but in OpenGL it's literally as simple as:
glEnable(GL_SCISSOR);
glScissor(x, y, w, h);
// render stuff here
glDisable(GL_SCISSOR);
So I'd expect SDL to expose similar functionality
 
user92578
Okay
 
user92578
Is the area the area where it is allowed to render, or the area where it is not allowed to render?
 
1:13 PM
Where it is allowed
 
user92578
Ah, okay
 
user92578
Well that sounds quite simple then actually
 
It's usually hardware accelerated too
 
user92578
I gotta write this down for when I actually try to implement the ground blood
 
user92578
Thanks
 
1:15 PM
np, good luck lol
 
Joe
@Chris lol that log thing is going nuts
 
filter it with Unity
tag:Unity I think?
 
Joe
and that will display debug.log messages?
 
I think so, unless it's reported as your app name or something, pretty sure it will though
 
Joe
that was way easier than what i was trying to do *Thank you (was the purpose of this message)
 
1:30 PM
all good
this CSharpatron is crazy. as I toggle the C# scripts it created to become active (meaning it hides away the UntyScript file and enables the C# file in its place), if there are dependencies of files that I haven't toggled live yet, it creates a dummy copy of the dependent script it needs, just a barebones class of the same name with empty methods and empty vars, just so the compiler doesn't cry, meaning I can carry on to test the next file, it's great
 
Joe
1:45 PM
sounds awesome what did that cost you
 
$45 USD
 
Joe
really? thats cheap if it works well
 
so far so good, not done yet though (so will reserve final judgement til it's all converted and done lol)
yeah, has like twenty 5-star ratings
people saying it trumps all others they've tried
think I wasted one week last year trying to convert this over
 
Joe
idk call me crazy, theres something cool about porting... seems like an interesting way to learn a new language
 
and just to have all my prefabs remain intact, it's some sort of crazy wizardry, much impressed
yeah
 
Joe
1:51 PM
are you planning on segmenting this into steps
or just making a change over all at once
 
I honestly learned a lot about C# through the chat in here hahaha
or at least seeing it and being exposed to it, warmed up to it ;)
 
Joe
i never touched C# before this chat
 
sxufdghizdurfhgzidthpzxidutjhzodtuhj FL STUDIO WHY DO YOU GLITCH CORE CRASHED SOUND CARD REMIX EVERYTHING
 
:(
 
Da-DingDa-DingDa-DingDa-Ding HAHA ITS GOOD HAHAHAHAHA HAHAHAHAHAHAAHAHAHAHAHAHAHAHAHA HAHAHAHA
killall -9 FL.exe :(
 
1:52 PM
Well, before I started having to enable these dummy classes, it had moved over my non-dependent classes all fine, prefabs intact, game ran
 
Joe
@Chris actually i was writing js in unity for about 4 months before i saw your first message about compile times and I switched that day
 
so atm I'm in non-testing mode, assuming it'll all work while I convert some 400-odd files remaining
@Joe hah, good on ya.
 
Joe
uh oh @MickLH has finally lost it, what happened
 
$ killall -9 FL.exe happened
You write something amazing, FL studio crashes, you lose all your work. Just another 10 minutes in the life of a musician.
 
Joe
some things are so amazing, the world doesnt deserve them? (he said realizing this was the most emo thing ever written)
 
1:57 PM
*Every time I try to make a silly little song
My efforts are all wasted 'cause machinery goes wrong*
 
Pip
@Chris C# is great
 
Hi! Good day, you guys familiar with bezier curve??
 
Yes
But don't ask to ask, please. (Just ask your question instead)
 
Lol, do you mind?
 
Nope :P
 
2:04 PM
No, but it saves time =p
 
But others may
 
Plus, people sometimes read but don't say anything. However if your question is interesting they'll respond (source: I've done this many times)
 
^ (I only responded because the timing of everything was really lucky)
 
++
 
Also there's a log so someone can come in in a bit and see the question and answer it, while otherwise you'd be stuck at asking to ask
 
2:06 PM
 
Oh.. I got shy, haha nevermind
 
@jane Bezier curves are linear interpolations between linear interpolations. What do you want to know? I'll have to take a 5 minute break in about 20 seconds
...
 
@Pip Great won't cut it. It's excellent!
 
@jane do ask! Bezier curves are cool
 
Hey guys is windows 10 really this bad?
Everyone seems to be having so many problems
 
2:07 PM
Jul 18 at 13:15, by Kevin van der Velden
user image
 
wait, I'm reading that Microsoft bought Pando Networks in 2013: techtimes.com/articles/39960/20150316/…
 
@TheMuffinCoder it's the first day of a new operating system, wait another month
@jane bezier curve image :D
 
@KevinvanderVelden yea i was planning on doing that :P i like windows 8.1
I do have the preview on a older computer and had no problems other than no audio worked
 
I'm just really having a hard time on how I would calculate it on my code :P I'm very stupid when it comes to math.
 
We've coincidentally talked about this a few months ago so I'm just gonna quote myself:
Jul 18 at 13:21, by Kevin van der Velden
Curve3( p0, p1, p2, p3, t ) = lerp( Curve2( p0, p1, p2, t ), Curve2( p1, p2, p3, t ), t )
Curve2( p0, p1, p2, t ) = lerp( Curve1( p0, p1, t ), Curve1( p1, p2, t ), t )
Curve1( p0, p1, t ) = lerp( p0, p1, t )
 
2:09 PM
Lol yeah the lerp pyramid is gonna be the lightest load on your math brain
 
What is lerp pyramid??
 
@jane not a specific term
 
Haha, see stupid questions lol
 
Lerp is a linear interpolation (from point A at t=0 to point B at t=1)
 
user92578
@KevinvanderVelden :)
 
2:10 PM
And a pyramid cause, well, it's a pyramid shape kind of :D
 
Everyone!!! Gangplank is dead in league
 
lerp(
	lerp(
		lerp( a, b, t ),
		lerp( b, c, t ),
		t
	),
	lerp(
		lerp( b, c, t ),
		lerp( c, d, t ),
		t
	),
	t
)
 
user92578
BTW I never got the solving for y working
 
Lol it's kindof a trip.... I want to post what makes it clear to me, but I bet it will confuse the situation worse
 
Alright, so if I have p1 and p2 as a line segment... how would I be able to calculate the tangent? I have searched some answer... but really, my brain is not getting anything at all.
 
2:13 PM
@jane You want the derivative of your bezier curve?
I'm interpreting "tangent" as the tangent line at a given point on the curve
 
Yeah, exactly!
 
So it's called derivative?? Is that the term I'm looking for? Lol
 
@jane Well that's a big part of it, you actually want the first order taylor series
 
@jane I applaud you for trying to figure it out. I don't like math either
 
2:15 PM
@Joe I just like the gif I posted because I was looking at making bezier curves and couldn't wrap my head around it... and then I saw that gif on wikipedia and it clicked
 
@jane Which is just y0 + (x - x0) * Derivative
 
@Joe Also I will watch this in a bit
 
Joe
this whole talk is amazing
 
@jane [x0, y0] would be the point you want the tangent line to cross the bezier curve
 
Joe
this gave me a grasp on alot of concepts i i hadnt considered before
 
2:17 PM
I will download it and watch it on my way to work tomorrow hehe thanks @Joe
 
Joe
I think i actually got it from a post here maybe a year ago.. i dont remember who linked it
 
That exact link isn't found in the search, just claim it for yourself
 
What is that equation for?
 
@jane The equation I listed is your tangent line, in y = m * x + b format
 
Which one? (if you hover over a message there's an arrow on the right side of it which you can click to reply to a specific one)
 
2:21 PM
@MickLH so that equation is derived from y = m * x + b?
 
It is y=mx+b, where b = y0, and m = Derivative
It's shifted on the x-axis also, to be centered on your point
 
@Chris thanks! :)
 
I'm not sure how to explain this without resorting to calculus
 
m=(y2-y1)/(x2-x1) For linear curves
 
You're fundamentally asking for a calculus operation
 
2:24 PM
Damnit now I want to write a raymarcher or something
Hmmph
 
@KevinvanderVelden Prototype my "Shadow Map Bending" idea :P
It uses ray marching to re-project shadow maps for small movements of the light source
 
Maybe, I'll need more info =p
 
Am I giving you a hard time? @MickLH sorry XD
 
@jane No it's all good :) I am just trying to not blast you with math since you asked specifically for not that :P
 
Though... hmmm, I could create a prototype that dynamically shoots rays and updates the texture in idle time
 
2:26 PM
@KevinvanderVelden If you actually want to work on it with me, I can get my ass in gear and get a first draft of a whitepaper finished up
 
Sure, don't know how much time I'll have
Given that I have about 50 bazillion projects I want to work on =p
 
lol I understand... all too well
 
Joe
 
@MickLH the equations you gave to me are hints to my treasure.. haha, thanks for the effort!! I'm just gonna dig deeper in internet
hehe
 
@jane I'm sorry I must do this, but I need to break the stagnation in our conversation.
d/dx lerp(f(t), g(t), t) = t*g'(t)+(1−t)*f'(t)+g(t)−f(t)
So, @jane, how far into that do you get before calling "fuck it" ?
 
2:30 PM
So this is calculus?
Haha
 
Yeah that's the analytic derivative of your function in closed form. (Aka, after the game has been won)
 
I like art, and my brain considered that as abstract. Haha
What is that lerp?
 
Linear interpolate
 
If I have to derive a formula from that equation....
 
lerp(a, b, t) has t as a percentage (from 0 to 1)
lerp(a, b, 0) = a
lerp(a, b, 1/2) = (a + b) / 2
lerp(a, b, 1) = b
 
2:33 PM
So a is the starting point and b is the end point?
 
Yes
 
And that one in the middle is....
Midpoint?
 
Please be very specific, which one in the middle?
 
:23110705
Oh
 
ah, that's just to show you, that if you give it 1/2, it calculates the middle for you
 
2:35 PM
That with 1/2 at lerp
 
And if you give it 1/4th, it gives you the point 1/4th away from a, 3/4ths away from b
 
So why do i need the middle point?
 
What middle point? In your bezier curve?
 
Ahh... yeah?
Ooohh
 
Lerp from start to middle, lets call that "Start Middle"
Lerp from middle to end, lets call that "End Middle"
Now your Bezier is the lerp from "Start Middle" to "End Middle"
 
2:37 PM
oohhh!!!
 
That would be a 2nd order bezier curve.
 
Now I get it!
Kind of
 
You can do it even a level deeper, that's a 3rd order curve.
Here's the picture for that:
30 mins ago, by Kevin van der Velden
Jul 18 at 13:15, by Kevin van der Velden
user image
You could do as many levels as you want
 
I think I'm getting it :)
 
I called it a pyramid earlier, because the math goes like this:
 
2:39 PM
You understand that?
 
Lol yes
 
Applied mathematics is the art of chaining together lots of tiny functions, each of them doing almost nothing, in just the right way.
 
so, programming
 
Just pretend it's a B for bezier @jane :P
 
user92578
 
2:41 PM
@Chris Only if you're programming in side-effect free languages, or avoid functions and methods with side effects (like everything involving IO).
 
true
 
Alright haha, now I have an idea. :) thanks a lot @MickLH you're my math hero!
 
but really, like anything, just breaking things down and understanding how every little thing does its job
 
Dat mutable state doe
There should be a nerd comic about this.
Something something, Shows protagonist pages of hard math...
> No problem!

Alternate reality, Same exact hard math, but one function saves and loads with a variable...
> Nuclear bombs going off, shows galaxy with exploding earth bits flying by
 
user92578
FUCK THE RENDERING ARTIFACT LINES ARE BACK
 
user92578
2:50 PM
MY FUCKING ARCH ENEMIES
 
@MickLH Got a gif of a 2nd Brezier?
2nd order that os
 
Normally the 3rd order is used, because it feels intuitive
And is flexible enough to make a passable approximation of a circle by hand
 
Cool
That's really cool actually.. Why don't we learn this in school?
 
With the 3rd order curve, P1 is like a "softened" but mostly direct control over the derivative at P0
 
Yeah
 
2:58 PM
You can also approximate Euler spirals pretty damn well with them.
(Those are used as transition curves in highway and railroad engineering).
 
user92578
Sorry, I know that you guys just got off helping someone with beziers
 
user92578
But
 
lol, still getting off @Tyyppi_77
 
user92578
I have implemented the nested lerp calls for tween curves to my framework
 
user92578
And I plan on using the beziers so, that they always start at 0,0 and end at 1,1
 
user92578
 
I predicted the link accurately
 
user92578
Now given the x value (the Time in the link), I would have to solve the y value (Progress) from the curve
 
user92578
So basically that's a sort of limited bezier I guess
 
I tackled this problem a while back for my bezier renderer
 
user92578
I have no idea how I would do something like that, but I guess it shouldn't be as hard as solving a "real bezier"
 
3:02 PM
It was ugly lol, yes you will definitely want to take advantage of the special case
 
user92578
Yeah I researched a bit on solving beziers a while back, did not look nice
 
Basically, solve for t from x, then plug that into your equation for y
Solving for t from x is the ugly part, because it's 3rd order polynomial
 
user92578
Ah, see I was confused with the t & x, probably assuming that in the special case they were the same
 
user92578
So is that for the special case?
 
Well lol, your special case is why it's possible to "just plug it in"
 
user92578
3:05 PM
Oh, okay
 
Solving for t will give you 3 answers
But in your special case, 2 of them will be complex
So just take the real valued t and you're set
 
user92578
It always takes me a while to get this stuff because I first have to realize what these things mean in Finnish
 
user92578
Aight, third degree polynomials, I think I might be able to do that
 
user92578
Do you do this stuff on a paper Mick or do you use some software?
 
maxima
sometimes it chokes on hard integrals and you have to bust out mathematica but for the most part it's good enough
 
user92578
3:10 PM
Three versions in sourceforge.net/projects/maxima/files/Maxima-Windows/…, which one do I want?
 
Biggest one
 
It's the same program with different runtimes bundled, I'd pick the fastest one
 
user92578
The one with most dowloads
 
The program is really not any kind of high performance anything :P
 
user92578
So first I want to get the equation for t using x, right?
 
3:11 PM
It needs any help it can get
@Tyyppi_77 Well, that's a way about the problem, I'm not sure if it's the only way.
 
user92578
and x in my case is the "Time", so a value from 0-1
 
user92578
Now if I just knew how to use this shit
 
Define lerp: lerp(a,b,t):=a*(1-t) + b*t;
Define cubic:
cubic(a,b,c,d,t):=lerp(
    lerp(
        lerp(a,b,t),
        lerp(b,c,t),
        t
    ),
    lerp(
        lerp(b,c,t),
        lerp(c,d,t),
        t
    ),
    t
);
 
user92578
Yeah that what I was looking into
 
user92578
wait why do I implement lerp like that?
 
3:16 PM
because it's easiest for me to type it that way without thinking
 
user92578
But a + (b - a) * t is okay too?
 
whatever you like!
 
Probably more calculations for higher dimensional values
 
user92578
you dont want to tell me why my version is worse than yours? :D
 
the program can convert between them really
It doesn't matter
Type it my way, then type ratsimp(lerp(a,b,t))
 
3:17 PM
Though, hmm
I wonder which is faster
Meh
 
returns: (b−a)*t+a
 
user92578
Oh, cool
 
user92578
fuck i forgot the ":"
 
it wont go back to my way with factor() lol
it goes to b*t−a*t+a instead
which gives a tiny insight I hadn't noticed before
 
user92578
@MickLH you really typed all this in a surprisingly short period of time?
 
3:20 PM
Lol the ridiculous part is that I should have copied what @KevinvanderVelden typed earlier
 
@MickLH yes
 
I think it's letter for letter the same, except whitespace
 
user92578
LOL
 
1 hour ago, by Kevin van der Velden
lerp(
	lerp(
		lerp( a, b, t ),
		lerp( b, c, t ),
		t
	),
	lerp(
		lerp( b, c, t ),
		lerp( c, d, t ),
		t
	),
	t
)
 
@Tyyppi_77 wanna see something pretty? type cubic(a,b,c,d,1/2)
 
user92578
3:22 PM
all the fractions
 
lol wanna what happens if you try to copy paste it here? ((d/2+c/2)/2+(c/2+b/2)/2)/2+((c/2+b/2)/2+(b/2+a/2)/2)/2
 
user92578
(((d-c)/2-(c-b)/2+c-b)/2-((c-b)/2-(b-a)/2+b-a)/2+(c-b)/2-(b-a)/2+b-a)/2+((c-b)/‌​2-(b-a)/2+b-a)/2+(b-a)/2+a
 
user92578
Why is mine so much longer???
 
that's what he said
 
user92578
Because I used the other Lerp implementation?
 
3:23 PM
Probably
 
probably
lol
 
For 1/4, simplified: (d+9*c+27*b+27*a)/64
 
user92578
Okay, and then I need to solve the t
 
user92578
So it's Cubic(0, a, b, 1, t)?
 
user92578
3:27 PM
(-3*b+3*a+1)*t^3+(3*b-6*a)*t^2+3*a*t
 
lolokok srstim agn
 
(d-3*c+3*b-a)*t^3+(3*c-6*b+3*a)*t^2+(3*b-3*a)*t+a
That's for generic t, huh
 
user92578
And, but my case simplifies it just a tad
 
Yeah
Essentially removing one variable
 
user92578
And then solve(Cubic(0, a, b, 1, t), t)?
 
3:29 PM
Try it and see!
 
user92578
Which gives me three answers, and one of them is 0?
 
user92578
Can't be right
 
Think about what you're asking it to do
Hint: If you give it an expression instead of equation, it assumes you want the root
 
user92578
Ah
 
user92578
But instead I just want the equation
 
3:30 PM
solve(cubic(0,a,b,1,t) = x, t);
 
user92578
AH RIGHT
 
enjoy the horror!
[t=(−(sqrt(3)*%i)/2−1/2)*(sqrt((9*b^2+(−18*a−6)*b+9*a^2+6*a+1)*x^2+(−4*b^3+6*a*b^2+(6*a^2+6*a)*b−4*a^3−12*a^2)*x−3*a^2*b^2+4*a^3)/(2*(3*b−3*a−1)^2)−(a*(b*(18*x−3)−6*x−3*b^2)−9*b^2*x+6*b*x−x+a^2*(−9*x−3*b+6)+2*b^3+2*a^3)/(−54*b^3+a*(162*b^2−108*b+18)+54*b^2−18*b+a^2*(54−162*b)+54*a^3+2))^(1/3)+
(((sqrt(3)*%i)/2−1/2)*(b^2+a*(−b−1)+a^2))/((9*b^2−6*b+a*(6−18*b)+9*a^2+1)*(sqrt((9*b^2+(−18*a−6)*b+9*a^2+6*a+1)*x^2+(−4*b^3+6*a*b^2+(6*a^2+6*a)*b−4*a^3−12*a^2)*x−3*a^2*b^2+4*a^3)/(2*(3*b−3*a−1)^2)−(a*(b*(18*x−3)−6*x−3*b^2)−9*b^2*x+6*b*x−x+a^2*(−9*x−3*b+6)+2*b^3+2*a^3)/(−54*b^3+a*(162*b^2−108*b+18)+54*
 
user92578
OH MY GOD
 
It's better with colours
 
For some reason, I don't know if this is intended or just a side effect of the algorithms inside... but in cases like this where there is only one real answer, Maxima likes to put it at the end.
 
user92578
3:32 PM
So I want the last one?
 
Probably
also there is a last() function, to get the last item from an array, conveniently
 
I don't think he wants it at all
 
user92578
Is there a parameter that picks the last result line?
 
Do you want to take an output, the a and b values and then calculate the t from that?
If so: That's what the returned equation from solve does!
If not: then you use the simplify option =p
 
user92578
Like last(USETHEPREVIOUSRESULT)?
 
3:34 PM
@KevinvanderVelden He's trying to linearize a bezier curve, to use it's shape as a function of X, instead of a parameterized curve of T
@Tyyppi_77 the % character does that
last(%);
 
user92578
thanks
 
user92578
How can you tell so quickly that which one of them is real?
 
Well this is not actually a safe way, but it's the one with no imaginary i in it :P
 
user92578
Ah
 
user92578
Oh yeah, now I see it
 
3:37 PM
(It's not safe and it might turn out to not be that one though, because a negative inside a radical would become imaginary, and then could cancel the i outside the radical)
 
user92578
So I should be able to test this now, right?
 
user92578
Plugging in a few test variables, and feeding it to the Cubic() again
 
You could do that, I prefer to graph it
 
user92578
Graph the whole thing or just the equation I just got
 
looks like there's a latex extension for chrome, converts latex between [; and ;] into images https://chrome.google.com/webstore/detail/tex-the-world-for-chromiu/mbfninnbhfepghkkcgdnmfmhhbjmhggn
like so: [;e^{\pi i} + 1 = 0;]
 
user92578
3:41 PM
BTW thanks for suggesting maxima, this would have taken ages by hand
 
kinda screwed up on a dark background though, since it assumes a white background with dark text
 
@IcyDefiance there is also ChatJax, which uses $
I would love if people started using ChatJax here lol
look for this link:

start ChatJax
^^drag this^^ to your bookmark bar or right click on it to add it as a bookmark.
Then if you post a formula that maxima spits out, use tex(%);
and it will convert it to latex
 
$[\frac{d+3\cdot c+3\cdot b+a}{8}]$
 
ooh that renders to text instead of an image, too, which means I can style it with css
 
3:45 PM
@Tyyppi_77 where were we, plotting right? I recommend always plotting as a sanity check
cubic([0,0],[0.17, 0.67], [0.83, 0.67], [1,1], t);
plot2d([parametric, %[1], %[2], [t,0,1]]);
 

« first day (1820 days earlier)      last day (3197 days later) »