code logs -> 2015 -> Sat, 02 May 2015< code.20150501.log - code.20150503.log >
--- Log opened Sat May 02 00:00:55 2015
00:02 Turaiel[Offline] is now known as Turaiel
00:19 Turaiel is now known as Turaiel[Offline]
01:21 Turaiel[Offline] [Brandon@Nightstar-olc20d.resnet.mtu.edu] has quit [[NS] Quit: Bouncer terminated]
01:56 * Vornicus fails miserably at getting graphviz to do what he wants wit gentle prodding
01:58 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection reset by peer]
02:25 * McMartin sets about trying to install the full HaxeFlixel stack.
02:34 Ogredude [quassel@Nightstar-dm1jvh.projectzenonline.com] has joined #code
02:34 mode/#code [+o Ogredude] by ChanServ
02:44
<~Vornicus>
Flixel as in the thing that, uh, Manufactoria was built in?
02:51
<&McMartin>
Probably. It's a common Flash game library. Haxe is a language and system for cross-platform development that is what Papers Please was written in.
02:51
<&McMartin>
My understanding is that HaxeFlixel bridges the two.
02:57 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Leaving]
02:57 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
03:05
<&McMartin>
I'm also back to poking at Monocle to make it good enough to implement, well, anything I've previously released
03:08
<~Vornicus>
including Sable?
03:16
<&McMartin>
Anything means "any one of" here, not "all of"
03:17
<&McMartin>
So Sable, Target Acquired, or Hex Inverter
03:17
<&McMartin>
I can't implement Hex Inverter because mouse-sprite collisions aren't really there
03:17
<&McMartin>
I can't implement Target Acquired because I don't yet have pixel-perfect collisions
03:17
<&McMartin>
Sable is Out Of Scope
03:19
<&McMartin>
One of the sample programs along the way to getting that stack installed is a bejeweled clone named Pirate Pig (part of OpenFL)
03:19
<&McMartin>
It's almost cute
03:19
<&McMartin>
But not quite, and so it is just half-assed and twee. =(
03:25
< VirusJTG>
need to reboot brb
03:25 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection reset by peer]
03:26 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
03:27
< VirusJTG>
well... getting there
03:41
<&McMartin>
OK, it looks like I've got the stack up and running
04:02 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
04:09
<&McMartin>
Now to make it all go on Linux as well.
04:29 TheWilfox [awilfox@Nightstar-b8i.hbu.99.192.IP] has joined #code
04:46
<&McMartin>
http://the-toast.net/2015/05/01/every-question-in-every-qa-session-ever/
05:08
<&McMartin>
And now it's working on Linux
05:41 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
06:02 kourbou|zzz is now known as kourbou
06:04 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Don't think much of what others think of you. Think of what you think of others.]
06:11 Checkmate [Z@Nightstar-pdi1tp.customer.tdc.net] has quit [Ping timeout: 121 seconds]
06:11 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: ]
06:17 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
06:33 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:48 TheWilfox [awilfox@Nightstar-b8i.hbu.99.192.IP] has quit [[NS] Quit: Don't hang on, nothing lasts forever but the earth and sky.]
07:21 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: ]
07:40 Kindamoody[zZz] is now known as Kindamoody
08:08 kourbou [kourbou@Nightstar-pjt.geh.161.37.IP] has joined #code
08:10 kourbou [kourbou@Nightstar-pjt.geh.161.37.IP] has quit [[NS] Quit: Don't think much of what others think of you. Think of what you think of others.]
09:37 Kindamoody is now known as Kindamoody|afk
10:00 mac is now known as macdjord|slep
11:01 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has quit [Client exited]
11:06 GreenGuy [GreenGuy@Nightstar-fik25i.gnomino.eu] has joined #code
11:10 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has joined #code
11:16 GreenGuy [GreenGuy@Nightstar-fik25i.gnomino.eu] has quit [[NS] Quit: Leaving]
11:31 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has quit [Ping timeout: 121 seconds]
11:32 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has joined #code
11:38 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has quit [Ping timeout: 121 seconds]
11:42 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has joined #code
12:00 kourbou|phone [kourbou@Nightstar-mqk.m1t.161.37.IP] has joined #code
12:01 kourbou [kourbou@Nightstar-tk5.i3r.165.37.IP] has quit [NickServ (RECOVER command used by kourbou|phone)]
12:01 kourbou|phone is now known as kourbou
12:16 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has joined #code
12:17 Kindamoody|afk is now known as Kindamoody
12:25 kourbou|phone [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
12:26 kourbou [kourbou@Nightstar-mqk.m1t.161.37.IP] has quit [NickServ (RECOVER command used by kourbou|phone)]
12:26 kourbou|phone is now known as kourbou
12:38 catadroid` [catalyst@Nightstar-ndh970.dab.02.net] has joined #code
12:40 catadroid [catalyst@Nightstar-p9cb1l.range86-174.btcentralplus.com] has quit [Ping timeout: 121 seconds]
12:41 catadroid` [catalyst@Nightstar-ndh970.dab.02.net] has quit [A TLS packet with unexpected length was received.]
12:42 kourbou is now known as kourbou|foodz
12:42 catadroid [catalyst@Nightstar-ndh970.dab.02.net] has joined #code
12:42 catadroid [catalyst@Nightstar-ndh970.dab.02.net] has quit [A TLS packet with unexpected length was received.]
12:49 GreenGuy [GreenGuy@Nightstar-fik25i.gnomino.eu] has joined #code
12:51 kourbou|foodz [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
13:19 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
13:30 GreenGuy [GreenGuy@Nightstar-fik25i.gnomino.eu] has quit [Connection closed]
13:38 GreenGuy [GreenGuy@Nightstar-5sh.fa6.179.88.IP] has joined #code
13:39 GreenGuy is now known as NSGuest58407
13:40 NSGuest58407 is now known as GreenGuy
14:06 GreenGuy [GreenGuy@Nightstar-5sh.fa6.179.88.IP] has quit [Connection closed]
14:07 GreenGuy [NSkiwiirc@Nightstar-fik25i.gnomino.eu] has joined #code
14:07 Kindamoody is now known as Kindamoody|afk
14:22 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
14:22 mode/#code [+qo Vornicus Vornicus] by ChanServ
14:27 GreenGuy [NSkiwiirc@Nightstar-fik25i.gnomino.eu] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
14:56 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: ]
15:15 GreenGuy [GreenGuy@Nightstar-5sh.fa6.179.88.IP] has joined #code
15:16 GreenGuy is now known as NSGuest2800
15:25 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
15:25 mode/#code [+o Vash] by ChanServ
16:13 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has quit [Client exited]
18:06 Meatyhandbag [sebastianfe@Nightstar-dk0.5eb.224.136.IP] has joined #code
18:21 NSGuest2800 is now known as GreenGuy
18:51 Orthia [orthianz@Nightstar-tap.qer.184.203.IP] has quit [Ping timeout: 121 seconds]
18:55 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: What does the 'x' do?]
18:56 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
18:56 Orthia [orthianz@Nightstar-629.6n6.184.203.IP] has joined #code
18:56 mode/#code [+o Orthia] by ChanServ
19:02 GreenGuy [GreenGuy@Nightstar-5sh.fa6.179.88.IP] has quit [Connection closed]
19:49
< [R]>
Is there something like HTML-tidy that doesn't shove linebreaks everywhere?
19:52
<&McMartin>
I'm kind of surprised that's not a setting
19:54 kourbou is now known as kourbou|foodz
19:55 * McMartin finds himself once again in a position where he needs to implement something like inheritance or closures in C.
19:56
<&McMartin>
Step one is probably to do a couple takes of it with copy-paste to see which bits can be kept the same, and then turn the rest into method-like functions.
19:57
<&McMartin>
(This is for collision detection in Monocle. I'll also need to stockpile a bunch of efficient collision algorithms for various shapes~)
20:09
<&McMartin>
GENTLEMEN. LADIES. KITTENS THAT HAPPEN TO HAVE FOUND THE BUTTON THAT MAKES THE WARM LIGHT BOX TURN ON.
20:10
<&McMartin>
I am pondering collision detection between axis-aligned bounding boxes and circles.
20:10
<&McMartin>
I believe, but am not certain, that I merely have to check to see if any corner of the AABB is inside the circle, or if any "axis extremum" of the circle is inside the rectangle.
20:10
<&McMartin>
But so far, my proof of this is "I can't seem to draw a counterexample"
20:10 kourbou|foodz [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
20:11 macdjord|slep is now known as macdjord
20:11
<&jerith>
Hrm.
20:12
<&McMartin>
Also it is the stroke of noon. Perhaps I will also think about this over lunch.
20:12
<&McMartin>
(By "axis extremum" I mean the point on the circle that is the most positive or negative on the X or Y axis, so a circle at the origin of radius 1 has axis extrema at (0, +/- 1) and (+/- 1, 0))
20:15
<&McMartin>
Aha, I *have* found a counterexample
20:15
<&jerith>
Circle with diameter slightly bigger than a square?
20:15
<&McMartin>
... no I haven't
20:16
<&McMartin>
... yes I have
20:16
<&McMartin>
The circumscription cases all work, though
20:16
<&McMartin>
Draw a narrow bar through the top quarter of the circle.
20:16
<&jerith>
Something like the Vitruvian Man's boxes?
20:17
< [R]>
Isn't circle-based colision the simplest though?
20:17
<&McMartin>
R: I'd often say that AABB collision is the simplest
20:17
<&McMartin>
However, sometimes you want circles
20:17
<&McMartin>
And in this case I'm ultimately also going to need pixel-perfect
20:17
<&McMartin>
So a sleazy way to do this is to turn "circle" into "pixel mask" and go from there if it's not circle-to-circle, but I'd prefer not to because there should be easier ways.
20:17
< [R]>
It's just "is the circle's radius lesser than the point closest to the circle?"?
20:17
<&jerith>
AABB/AABB and circle/circle are both pretty easy.
20:18
<&McMartin>
Yeah
20:18
<&McMartin>
I suspect the question here is "how to most efficiently compute "the point on the AABB with the point closest to the center of the circle"
20:18
< [R]>
Gets hard when you have weird shapes though.
20:18
<&McMartin>
... but it's an AABB, which means it's either directly axis-aligned with the center of the circle (that is, if projected against an edge, the center is *on* the edge) or it's a corner, yes?
20:20
<@macdjord>
McMartin: Isn't there are easy way to calculate the intersection of a line and a circle? Do that for each of the 4 lines, then check for one object completely within the other.
20:21
<&McMartin>
macdjord: I believe that is the algorithm for the OBB case.
20:21
<&McMartin>
I think I can simplify it for the axis-aligned case.
20:21
<&jerith>
McMartin: I think your corners and axis extrema work if you also add a check for the centre of each shape being within the other.
20:21
<@macdjord>
jerith: Nope.
20:21
<&McMartin>
jerith: I think that fails the same way
20:21
<&McMartin>
If I extend my "horizontal bar" arbitrarily far to the right, I can move the center of the rectangle out.
20:22
<@macdjord>
Assume the long box extending through - then make it longer in one direction until- yeah.
20:22
<&jerith>
Oh, right.
20:23
<&McMartin>
macdjord: I think the "intersection of line and circle" case sort of ends up becoming "read this value" and I can simplify further because I'm not trying to find *where* it intersects, merely *that* it does.
20:23
<&McMartin>
The geometric construction is, I think, "find the point on a line closest to some other point"
20:24
<&McMartin>
We can restrict ourselves to the two lines of the rectangle nearest the center, which makes it more like a pair of rays, or an angle ABC
20:25
<&McMartin>
So we find the closest point to the circle's center on AB and BC - and if it's not on the segment, we check point B for that
20:25
<&McMartin>
If the distance between those points is less than or equal to r, there is a collision.
20:26
<&McMartin>
And since they are axis aligned, "the point closest to the circle's center", if the circle is at (x, y), are basically (0, y) and (x, 0)
20:26
<&McMartin>
(Well, really it's more shuffling constants around)
20:27 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
20:27
<&McMartin>
It's probably actually cheaper to just do all four comparisons, looking at it, rather than figure out which one or two comparisons are truly necessary; that's even more branches.
20:29
<@macdjord>
McMartin: Actully, I would expect it would be faster to check for which zone the circle's center is in: below, below-right, right, up-right, etc.
20:29
<&McMartin>
Only if it saves more than two branches.
20:29
<&McMartin>
Because that's two branches each time~
20:29
<@macdjord>
Then you either just check the distance tot he nearest corner, or find the nearest point on the correct line.
20:29
<@macdjord>
Oh, right.
20:29
<&McMartin>
That's "I'll have to write it and see"
20:31
<&McMartin>
Yeah, this will work.
20:31
<&McMartin>
And I'm starting to see what the architecture will look like
20:31
<&McMartin>
... it's going to look like multiple dispatch -_-
20:31 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: Kernel upgrade]
20:35 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
20:35 mode/#code [+ao McMartin McMartin] by ChanServ
20:36
<&McMartin>
Correction: Previous algorithm assumes circle's center is outside of the rectangle.
20:36
<&McMartin>
If it's inside the rectangle, you're done~
20:38
<&McMartin>
So that means it is basically macdjord's suggestion but being axis-aligned lets you find "closest point" with basically no math.
20:38
<&McMartin>
It's basically a min or max operation, depending
20:57 kourbou_ [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
20:57 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [NickServ (RECOVER command used by kourbou_)]
20:57 kourbou_ is now known as kourbou
20:58 kourbou|phone [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
21:06 catadroid [catalyst@Nightstar-sbtq4p.dab.02.net] has joined #code
21:11 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
21:11 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:17 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [NickServ (RECOVER command used by kourbou|phone)]
21:17 kourbou|phone is now known as kourbou
21:28 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection closed]
21:54 catadroid [catalyst@Nightstar-sbtq4p.dab.02.net] has quit [Ping timeout: 121 seconds]
22:00
<&McMartin>
Vorn! We were performing feats of geometry earlier. It would be awesome if you could sanity-check it.
22:13 Kindamoody|afk is now known as Kindamoody
22:14
<~Vornicus>
Tallyho
22:15
<~Vornicus>
Okay, first claim
22:16 * abudhabi presses it.
22:17
<~Vornicus>
"I believe, but am not certain, that I merely have to check to see if any corner of the AABB is inside the circle, or if any "axis extremum" of the circle is inside the rectangle." - not true, consider a long thin rectangle passing through a circle but *not* through the center
22:18
<~Vornicus>
ah, you found it
22:23
<~Vornicus>
okay, aabb vs circle collision. 0. xlo - r <= xcen <= xhi + r and ylo - r <= ycen <= chi + r; outside of this is definitely false
22:23
<~Vornicus>
er, yhi, not chi
22:24
<~Vornicus>
1. if 0, xlo <= xcen <= xhi or ylo <= ycen <= yhi; this true means collision is yes
22:25
<&McMartin>
That's "0. If the aabb that circumscribes the circle doesn't intersect the aabb, no collision; 1. If the center of the circle is inside the aabb, there is a collision", yes?
22:26
<~Vornicus>
1 is a little more loose
22:26
<~Vornicus>
note the *or*
22:27
<~Vornicus>
It covers the cross shape made by pushing the edges of the aabb out by r
22:27
<&McMartin>
Oh, I see. The idea is that we know the center is at least r from some edge at this point, so if it projects onto any line segment, it's in. Right.
22:28
<&McMartin>
That leaves the "webbing"
22:28
<&McMartin>
between the branches of the cross
22:29
<~Vornicus>
if xcen < xlo: xoffset = xlo - xcen; else: xoffset = xcen - xhi, and the y equivalent
22:29
<~Vornicus>
then if xoffset**2 + yoffset**2 <= r**2, you've hit a corner
22:32
<~Vornicus>
mmmm, with images: http://www.metanetsoftware.com/technique/tutorialA.html#section3
22:32
<&McMartin>
That was pretty clear, really.
22:33
<&McMartin>
2 is "if you're outside of the cross, check the closest corner with the point-in-circle method"
22:33
<~Vornicus>
Yep.
22:33
<&McMartin>
(I need point-collision anyway to do mouseclicks right)
22:34
<&McMartin>
Which turns into six short-circuiting tests followed by the actual comparison.
22:41
<~Vornicus>
Using SAT the way metanet does also gives you the shortest path out
22:45
<&McMartin>
This is for Monocle's object collision. I want to get to a boolean value as rapidly as possible
22:48 Checkmate [Z@Nightstar-pdi1tp.customer.tdc.net] has joined #code
22:48 mode/#code [+o Checkmate] by ChanServ
23:05 Kindamoody is now known as Kindamoody[zZz]
23:17 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
23:20 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
23:26 Vornotron [vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
23:29 Vornicus [vorn@Nightstar-uhn82m.ct.comcast.net] has quit [Ping timeout: 121 seconds]
23:48 catadroid [catalyst@Nightstar-p9cb1l.range86-174.btcentralplus.com] has joined #code
--- Log closed Sun May 03 00:00:11 2015
code logs -> 2015 -> Sat, 02 May 2015< code.20150501.log - code.20150503.log >

[ Latest log file ]