« first day (1751 days earlier)      last day (3284 days later) » 

3:00 PM
How do I proceed?
 
Jon
get the angle between intersection point and mouse position
then add 90 degrees to it
this doesn't really work in 2d as far as I remember though
you are gonna need to do some trig
float angle = Mathf.DeltaAngle(Mathf.Atan2(source.y, source.x) * Mathf.Rad2Deg, Mathf.Atan2(target.y, target.x) * Mathf.Rad2Deg);
 
Jon
ah, interesting, that might work
 
one thing I am curious about is though
is let's say I have 60 from the angle then I add 90 to it it gives me 150 degrees
maybe i'm slow but I want 90 degree angles
not 150 degree angles
 
Jon
ok, then I'm not really sure what the heck it is you are trying to accomplish here :)
maybe explain from higher level what it is you want to do
 
3:08 PM
maybe you're right too but I'm just confused
I have draw two intersecting lines
then I want to rotate either one about intersection point
such that the line snaps at 90
to indicate to the user that they reached a right angle
 
Jon
the lines are irrelevant to where you want to snap them from what I am understanding though.
 
explain?
 
Jon
so... if your mouse enters a certain range, you want it to snap into place?
 
yes
at right angles
basically I want to make a measuring tool
 
i looked at this earlier
 
3:09 PM
that alerts the user they have 90 deg
hurray
 
you move the image, lines whatever how ever many degrees from the start point of the mouse clieck to the end point
and you let it move freely
 
lol:
57
A: What's the opposite of "embarrassingly parallel"?

Brian RasmussenInherently sequential. Example: The number of women will not reduce the length of pregnancy.

 
then you say which quarter i am in 0-90 , 90-180,180-270, 270 - 360
then on mouse up i would interpolate from the images current rotation to the nearest quarter
 
either implementation is fine, that is fine
 
that way you have smooth animation
and it snaps nicely to the rotation you want
 
3:11 PM
yes
 
done it that way for 3 apps
 
Jon
if (Mathf.Abs(angle % PiOver4) <= range) { //inrange }
where range == 0.1 or whatever
 
exactly, i personally just look at the given objects relative angle to work out what range it sits in, but either way is good
so in that case angle over the z if its in orthographic
 
Oh btw this is 2D
x,y
no z
 
then it still has its relative angle
 
Jon
3:13 PM
Unity realllllyl needs to add the SortingOrder of the MeshRenderer in the editor
 
and it also needs to have a system to decouple how simple animations effect parent gameobjects transformations in the hierarchy
 
Jon
my request is really easy though
 
I guess also I am wondering if the user draws the intersecting lines and the relative angles are 120 and 60 for obtuse and acute, how do I know what to restrict or which direction to proceed?
 
Jon
you should write a small demo that calculates the angle between your intersection point, and the mouse
 
you have totally lost me now
 
Jon
3:14 PM
you can then visually see what you are doing
keep adding to your demo till you ahve what you want
 
lol
 
Jon
might be funny but that is how I writ pretty much everything I do
start small, decoupled, proof of concept
then add it into your project
 
I think maybe I am confusing myself
 
me too, all my math is visible when you turn on gizmos
other wise id have no hope in hell debuging it visually
 
user92578
I always go right into the features and spend days looking for small bugs in the math code
 
Jon
3:16 PM
i have like 100 prototype folders
 
wait let me show what I have now
in a drawing with more info
 
I still have one problem with my math -.-
 
At 0 degrees my robot turns the opposite way, lol
 
Jon
@Hjorthenify i have a fix for that
 
3:17 PM
crappy not to scale drawing but but when I draw two intersecting lines, I calculate the angle between the lines
 
Jon
public static float WrapAngle(float angle)
{
    angle = (float)Math.IEEERemainder((double)angle, 6.2831854820251465); //2xPi precission is double
    if (angle <= -3.141593f)
    {
        angle += 6.283185f;
        return angle;
    }
    if (angle > 3.141593f)
    {
        angle -= 6.283185f;
    }
    return angle;
}
 
So in the drawing it is 120 deg for obtuse and 60 angles for acute, for example
 
Jon
everytime you change your angle, just run it through this wrapping function
 
Now the user just wants to get to 90
How can I get it so the user gets to 90
 
@Jon It's not that, but it calculates the distance it has to go as the opposite way
 
3:18 PM
from where they are
 
interesting function, i always use Pythagoras to calculate angles between 2 points
 
Jon
this doesn't calculate an angle
 
just rounding ?
 
Jon
it wraps your angle around PI
instead of going nonstop
 
oh i see
 
Jon
3:19 PM
so, if you hit 3.14 -- it goes to -3.14
it is important for my day/time thing
 
@Jon I'm in degrees though because that's what eulers want :P
 
Jon
as I calc time based off of PI
DegToRad is literally a multiplication
float rad = deg * Mathf.Deg2Rad;
 
angle = (angle + PI) % (2*PI) - PI;
just 'cuz I hate using if statements if math can do the job
 
kind of like that
 
3:22 PM
in another series for B2
 
@Jon Yeah, but the problem is not that it goes past PI, but that the difference between the angles are calculated to be going in the wrong directionif one of them is at 270 an the other at 2
 
@Almo don't invite me. I'll probably go 1/8 again. -.-
 
hahah
didn't seem entirely your fault man
 
Jon
@Hjorthenify what are you using to calc it?
 
Math :P
    public static float TurnLimited(float currentAngle, float desiredAngle, float limit)
    {
        float diff = currentAngle - desiredAngle;
        if(diff < -180)
        {
            diff = 360 - Mathf.Abs(diff);
            diff = -diff;

        }
        else if (Mathf.Abs(diff) > 180)
        {
            Debug.Log(diff);
            diff = 360 - diff;
        }

        if (Mathf.Abs(diff)  <= limit)
         {
             return desiredAngle;
         }
         else
         {
           //  return currentAngle + limit*(diff/Mathf.Abs(diff));
 
3:23 PM
@Almo it was 1/2 my fault, 1/4 shit luck, and 1/4 naut being incapable of ganks. so mainly my fault.
 
heh ok :)
 
Jon
every try a hinge joint?
 
oh shit
I see what you meant naut synergy
he's got a launcher
 
Basically if desired angle is within the limit, then go there, otherwise tell the object which direction to turn to get there the fastest
@Jon Thought about it, but I would need to add RigidBodies for that
 
he should have come by for the gank, depth charge and you get guaranteed ult on them
 
3:24 PM
yep, and thresh's E gives me a short window to ult too, but that entire game I didn't get a chance to use either
 
oh shit
Xin really was on your ass there
 
yeah I could've turret hugged to stop xin after the first death or two. I would've been useless, but I wouldn't have kept dying. I just didn't expect him to keep showing up after ahri was already ahead.
 
You once told me: "A jungler is not supposed to gank the losing lane to save it. He should gank a winning lane to amass more kills"
 
user92578
Aww yeah dynamic rendering scaling based on the window size:
 
user92578
 
3:27 PM
Maybe he took your advice :)
 
yeah but no one actually does that in silver, lol
except him
 
hahah :)
looks nice Tyyppi
 
user92578
thanks
 
user92578
kinda still need to figure out how I'm going to round that
 
user92578
the formula is screenWidth / 480
 
Jon
3:28 PM
Cool
 
user92578
But it definitely needs to be rounded to something, as otherwise the rendering will look wavy
 
I am deeply sorrowed by my shitty cpu; I cannot play good simulation games for a long time
If the sim gets large enough, then my cpu starts to chocking for memory then freeze to death.
 
user92578
^ :(
 
at least it's not overheating. ducks
 
with blazing fever of course.
 
3:33 PM
oh ok. :)
 
Which is the reason why I have a separate cooler beneath my laptop (which is still not good enough, my laptop loves sim games and gets ever hotter).
 
@Jon Errhh Jon I just realized.. The code works fine but mirrors at 90 degrees...
 
last game I downloaded that I couldn't play on my computer was Cities in Motion 2 before I had the Black Cylinder. Now that I have it, I can't be bothered to learn to play it. Too complex.
 
user92578
Rounding to the nearest 0.2 seems to work nicely
 
user92578
not really
 
user92578
3:41 PM
0.5
 
user92578
That'll do for now
 
I'm invisible. I'm invisible. An eraser of love. An eraser of love. Why don't you call me I feel like flyin' too. Why don't you call me I feel like flyin' too.
 
lol I'm trying to read an excel file using ClosedXML. one of the cells contains a formula that errors out in excel. ClosedXML just sets the value to 0 instead of throwing an exception or anything, and there's no way to figure out that the formula is broken.
0 is a valid value for other cells in the same column, so I can't just test for that
fuck silent errors
 
user92578
yeah
 
user92578
Next up: Initializing the menu button values to their correct settings values
 
user92578
3:44 PM
That's going to be real annoying
 
user92578
I think I'm just going to do a method that sets all the list button values at load
 
user92578
Aight, works
 
user92578
I'm off
 
user92578
This was a nice and productive day
 
4:18 PM
Last night I learned Bloodborne has a lock on targeting feature for fighting. The game got much easier after I accidentally triggered it. Not sure how I missed that memo.
 
4:29 PM
lol yeah that's required in most of dark souls
 
I don't know if I knew that in DS either... didn't get too far though
 
backfires once in a while, mainly when the enemy is real tall, but it's useful in any other combat
 
I made a ton of progress last night thanks to that
 
btw Donut, do you read excel files with C# very often?
I've pretty much given up on ClosedXML being able to solve my problem. Need a different way to read them.
 
Will your app be run on a machine with office installed?
 
4:33 PM
it should be
I can double-check later
 
Excel interop
If it's a server environment you are not supposed to install office on it and use interop though
But if its a client PC, get office installed and use excel interop
 
Jon
interops yuck
 
yuck but it works
Now if it were a CSV.... lots of options
mainly pick a library and convert it to objects
 
yeah I have a different function for CSV that works fine
 
Jon
excel is open format
they just make is so ridiculously hard to do anything with the file, that there is no point in trying
 
4:36 PM
Which is why resorting to interop isn't as crazy as it sounds lol
It's possible there is a good library out there
I don't know what it is though
 
yeah I might have to go with interop
kind of worried about how formulas will work that way...but I guess I'll find out
lol and the interop library uses dynamic crap everywhere. how am I supposed to know what to type?
 
Jon
interops yuck.
a lot of it will be trial and error
it sucks so bad you have no idea
 
4:54 PM
fuck it I'll just dive into the source of ClosedXML and make it throw an exception when I want it to
 
what are you even trying to do? lol
 
read an excel file and insert the rows into a database
problem is the excel file is (a) autogenerated and (b) contains formulas
and if one of the formulas returns an error, my program is supposed to fail intelligently
when reading with ClosedXML, it doesn't tell me that the formula returned an error. it just gives me the value 0 for no reason.
so I need some kind of indicator that the formula is broken so I can give an appropriate message to the user
 
interesting
 
Pip
heyo
 
This is the part where I start investigating where the excel file is coming from and why excel, and if we can replace excel, etc.
 
5:07 PM
I'd have to ask my boss, and he'd have to ask someone at the company we're doing this for, who might have to ask his boss... lol
it might come down to that, but I'd rather figure it out if possible
 
Depends on how much time you've been allotted to figure it out I suppose
A lot of times its faster (or at least more beneficial to outweigh the added cost) to replace the bullshit component than it is to work around it.
 
uhh, 4 more hours, lol. this was supposed to be a real simple project, and except for this problem, it was.
ooh, exporting as CSV gives #VALUE! wherever the formulas error out. I wonder if I can make Interop just do that...
 
i'm invisible... an eraser of love...why dont you call me i feel like flying in two...i scream..!!!!!i scream so much!!!!
 
@IcyDefiance I was about to say, get a CSV some way :)
 
@SpartanDonut You're such a good employee.
 
5:20 PM
I'm a lazy employee
who hates doing bullshit work
 
Lol but you think from the perspective of the company
 
Kind of lol
 
When I'm hired as a programmer, I'm not a consultant :P
 
I think from the perspective of how can I do the least or most satisfying work
And then I skew that perspective in a way to persuade them that its the right choice
 
Lol close enough
 
5:23 PM
:D
 
Many people would just take the bullshit work, get paid, and then afterwards say "but doing it this way would be better in the long run"
Maybe people don't mean to do that and they just realized after
 
me: xlApp.Quit();
excel: lol no
me: read from csv
windows: can't open csv 'cuz it's in use
 
Jon
i did quite a lot of stuff in excel vba
i wrote a chart generator for scientists
 
Pip
@IcyDefiance that's annoying
@Jon tiles did not happen yesterday, but I actually have time today
 
Pip
5:35 PM
Actually, let me revise that. I got tile maps loading, but the pool needs to finish
 
Jon
nice
i got my day/time working
 
Pip
the tiles happened but are not being rendered because the renderers are not pooled correctly for draws yet
Nice!
Pic?
 
@Jon yeah I already fixed it, though it wasn't that complicated. I needed to force the workbook to close without saving changes...even though I had just called SaveAs()...
stupid interop
 
Jon
still needs work
 
extra dope
 
Jon
5:38 PM
:D
22
Q: Stumped in Malbolge

JonI am currently writing a text-adventure type game in Malbolge. Can anyone tell me how to accept a user input in Malbolge? I am able to output text to the screen, however, I can't seem to figure out how to accept input.

 
@Jon why are you even doing this xD
 
Jon
i posted that question in 2009 lol
 
oh right xD
 
> named after the eighth circle of hell in Dante's Inferno, the Malebolge
lol
 
check out the discussion of that malbolge program
they try to figure out if it just outputs the text, or if it's actually looping
the consensus is that it must be looping.
 
Jon
5:51 PM
heh, that is cool
 
:D
 
Jon
they have added a ton of 2d stuff
still nowhere near what unity offers, but open source, and getting there
 
well-named
Waiting for Godot (/ˈɡɒdoʊ/ GOD-oh) is an absurdist play by Samuel Beckett, in which two characters, Vladimir and Estragon, wait endlessly and in vain for the arrival of someone named Godot. Godot's absence, as well as numerous other aspects of the play, have led to many interpretations since the play's 1953 premiere. It was voted "the most significant English language play of the 20th century". Waiting for Godot is Beckett's translation of his own original French version, En attendant Godot, and is subtitled (in English only) "a tragicomedy in two acts". The original French text was composed between...
type "Waiting for" into wikipedia and this is the top suggestion
 
built-in 2d shadows is kinda awesome imo
 
Jon
I agree
2d normal mapping
they also have the navmesh
that unity requires a hack for in 2d (axis flipping)
 
6:01 PM
just looking at the feature page of godot, I have to say I'm impressed.
 
Jon
look at the feature video
 
I imagine the following image having fight game sound effects and a KO at the end.
(found this as some Last.FM user's avatar)
 
Jon
they wink with both eyes
 
they? it's one girl, multiple winks.
Probably a pop star, given the music taste of the guy who was using it
 
When I try really hard to imagine the sound effects, The rotation shake comes for free :D
 
6:08 PM
:)
 
Jon
 
lolwat
 
oh god it's the face again
is that the one alex used to spam here, or something different?
 
Extremely severe gum disease
 
it's different
similar idea, but not the same one
this isn't nearly as creepy
 
6:14 PM
lol I feel excluded because I don't get the shock out of it
I didn't expect everyone to trip about it, I just thought, "man that's kinda lame artwork but I guess ok for a first try or something"
 
My gut tells me it's the same image just shopped
 
^ feel like this to me, but maybe Jon is just a pro at invoking old memories with new images
 
this was it
 
well maybe not then
Or was there also a front perspective one?
 
Jon
 
6:17 PM
lol it's derpy mario
 
shupe detected some of the pixels... seen quite a few in my day
 
Jon
anyone got requests?
i'll make you a sprite right now
 
cop version and terrorist version!
 
I need a lumberjack
 
Jon
6:19 PM
i meant anything at all, lol
 
the protagonist of my platformer will wear various beards to change his abilities
and he is a lumber jack
 
@Jon oh really? make one with a constant time prime factorization algorithm tattooed on its face, and maybe a winning lotto number or 24
lol no but really one of the guys who said a long time ago that he'll do character and item modeling came back and is helping me again, I would love to hype him up like I've got great concept art for him and give him that
 
Jon
lumberjack
 
I like it but...
 
recognizable. pretty good man
 
6:22 PM
I always imagined him with an even bigger package
 
Jon
i can make it bigger, its on its own layer
 
thats what she said?
 
Jon
i'm gonna quit coding and become an artist
 
layered package, like them Grands biscuits, just not a biscuit
 
@SpartanDonut wait, I think you're invoking undefined behavior using the "thats what she said" function that way
 
6:24 PM
Sorry. I didn't read the spec xD
 
Yeah I'm pretty sure, package already means schlong in context, now it means double schlong
 
[encrypted] looks very interesting: rockpapershotgun.com/2015/05/22/…
 
Jon
 
@Jon you should make a really simple 2D game that's fun to play using just solid blocks of color to represent people, and then put these images in really awkwardly
 
@MickLH oh I meant to invoke the function on Jon's statement
@MickLH easy. one level is an art museum
 
Jon
6:28 PM
you guys like my sketches?
lmao
 
lol I feel like if the animations were bad enough, it could have a gameplay-enhancing effect the way really pretty art does, like it would make it more fun to play because it's hilarious
 
If I curated a museum I'd hang your art in it.
 
Jon
 
Pip
lol
 
Jon
guess who
 
Pip
6:37 PM
haha
 
Jon
know who it is?
 
Q*Bert
 
lol I remembered the face but I'm bad with names, thank fucking god for almo that would have bothered me all day
 
Jon
i looked him up after, and he in fact has two legs
in case someone was gonna use it in a game, here is the updated version
the original sprite is pretty strange
Man, I was reading about truck drivers in the US
they are saying that in 20 years from now, all truck drivers will be replaced by automated vehicles
There are apparently a TON of people employed as truck drivers currently
8 million in the US alone
They are saying this automated driving thing is going to impact that industry pretty fast
the profits are going to be mental.
 
I've noticed the same thing, transportation in general is a massive employer and easily replaced by cheaper, more accurate, safer, more efficient robots
 
Jon
6:48 PM
it is a very exciting future
if we manage to not destroy ourselves
c64 sid chip was ... so fucken good
 
agree. the SID and the TB-303 are the only pieces of analog gear I actually find useful for music still
 
Jon
i have a c64 here
never going to give that away
unfortunately, I need to clean the keyboard as the RETURN key is not responding
 
that SID chip is a hybrid signal processor, it's awesome
it's mostly digital, but the filter sections are analog
 
Jon
yeah, i am aware of how awesome the SID chip is :)
there are articles online about it
 
Mick what do you use for composing?
 
6:53 PM
everyone needs to know :P
 
Jon
people hack that chip too, to create synths
 
@SpartanDonut FL Studio
 
Alright. I've not made the jump and purchased that yet
Demo was fun
 
@Jon I want to get a few of them and build one of those 4 chip synths but broken C64s are really rare these days
 
Jon
6:54 PM
yeah.. c64 are collectable nowadays
 
check THAT shit out
 
Jon
if i saw a maniac mansion in box for c64, i'd pay 200$ for it
 
one of the best C64 musics with oscilloscope output!!!!
 
Jon
one is online now... damnit
 
Pip
@MickLH <3 FL
 
6:55 PM
< $200 as well
er maybe not with currency conversion
 
Jon
too bad it is dutch version
manual and game is in dutch
anyways, c64 stuff, is highly collectable
 
that 2nd scope line really shows the magic in the grit undeniably
 
Jon
especially if you have the boxes
 
when the pulsewidth is really low, the height of each pulse is almost random
 
who designed that damned chip anyway
did that person (or people) know what they were unleashing?
 
6:58 PM
I forget his name, same guy who designed the Ensoniq ESQ-1 I think
 
Jon
it was one guy that created it
 
wow
 

« first day (1751 days earlier)      last day (3284 days later) »