code logs -> 2012 -> Thu, 28 Jun 2012< code.20120627.log - code.20120629.log >
--- Log opened Thu Jun 28 00:00:48 2012
00:21 io|gone is now known as io|SPAMM
00:28
< celticminstrel>
Apparently with a template class specialization you can declare the member functions in a header and define them in a source file. I guess that makes sense.
00:28
<&McMartin>
That interaction has only been properly implemented in the past six or seven years.
00:28
< celticminstrel>
Meaning lots of compilers don't support it?
00:29
< celticminstrel>
Or didn't until recently?
00:29 cpux|2 is now known as cpux
00:29
<&McMartin>
The latter, except for cases where it was not only supported but actually mandatory
00:29
<&McMartin>
Basically, until linkers became C++ template aware you had to instantiate every template in every file.
00:29
< celticminstrel>
Mandatory meaning they wouldn't allow you to define the member function inline?
00:30
<&McMartin>
No, they'd *require* it
00:30
< celticminstrel>
Okay.
00:30
< celticminstrel>
Whatever; it works this way, and I don't care much about compiler portability here.
00:32
<&McMartin>
"use a compiler that supports the standard, dammit" is totally reasonable
00:38
< Rhamphoryncus>
Hrm. I guess I can add that to my todo list
00:38
< celticminstrel>
?
00:38
< Rhamphoryncus>
Learning about putting templates in source rather than header files
00:39
< celticminstrel>
It's probably still not possible when you intend to allow them to be instantiated with any arguments.
00:39
< celticminstrel>
I was talking about a template specialization, so the arguments were already fixed.
00:39
< Rhamphoryncus>
And do inlines still work? I wouldn't be surprised if clang has an advantage here, with the link-time optimization
00:50
<~Vornicus>
good lord.
00:51 Attilla [Obsolete@Nightstar-8afef565.as43234.net] has quit [Ping timeout: 121 seconds]
00:52
<~Vornicus>
this code is growing legs.
00:52
<&McMartin>
Mmm?
00:52
<~Vornicus>
WEll, right now I'm writing the code that chooses the current velocity.
00:53
<&McMartin>
Remember that gravity and friction exist as constants
00:55
<~Vornicus>
RIght, except that this isn't a physics
00:55
<~Vornicus>
You have a constant speed when you're pressing the dpad, and a different constant speed when you're not.
00:57
< Rhamphoryncus>
Weee. rgba, xyzw, uvw, stpq, strq
00:59
< celticminstrel>
Inlines work, yes.
01:00
< celticminstrel>
I just switched from an inline definition in the template specialization to a non-inline one in a separate source file.
01:03
< Rhamphoryncus>
looks like stpq is allowed in glsl. Defacto replacement for uvw then
01:04
< Rhamphoryncus>
Interesting that they've got half the alphabet used in different naming schemes
01:05
<~Vornicus>
But it has to check: what speed I have along the path, what path I'm on, and where on the path I am.
01:11 * Vornicus tries to figure out how to /tell/ what path you're on.
01:20 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
01:22 * McMartin grumbles at this code, which keeps subtly tying itself into knots
01:25 * Vornicus tries to get an object to tell him its list of variables.
01:27
< celticminstrel>
What language?
01:27
<~Vornicus>
game maker
01:27
<~Vornicus>
Found it
01:27 * McMartin manages to draw his Intermediate AI while waiting for a compiler
01:28
< celticminstrel>
Oh, dunno then.
01:28
<~Vornicus>
Sort of.
01:28
< Rhamphoryncus>
So apparently cube map textures are as simple as supplying a direction vector. Opengl then chops it into one of the 6 faces
01:29
< Rhamphoryncus>
and if I generate a sphere from an origin point then I already have exactly that
01:30
<~Vornicus>
okay now i really found it.
01:38
<~Vornicus>
Where it gives an index for the paths but I don't know how to find the ID of a particular path
01:44
< Rhamphoryncus>
.. huh. Maybe the vertices are dirt-simple too. Lay them out as a cube, then normalize their distance to the origin..
01:46
<~Vornicus>
WARNING: this will give you large size distortion between the corners and the faces
01:46
<~Vornicus>
(using a cube map at all does this)
01:47
< Rhamphoryncus>
Yup, but this is only for rendering
01:48
< Rhamphoryncus>
The game map will be geodesic, then translated into a cubemap heightmap using procedural generation, and then stashed in a virtual texture
01:48
< Rhamphoryncus>
(technically the virtual texture will drive the translation)
01:49 * Vornicus wanders around the thing trying to figure out how to find the index of a named path
01:50
< Rhamphoryncus>
Which let's me have the minimal distortion where I need it and dirt simple rendering where I don't
02:16 * Vornicus befuddles at it.
02:43 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
02:43 mode/#code [+o PinkFreud] by ChanServ
02:56 KiMo is now known as Kindamoody
03:00 Attilla [Obsolete@Nightstar-8afef565.as43234.net] has joined #code
03:07 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
03:15
<~Vornicus>
Nope. Not finding what I want.
03:23 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
03:23 mode/#code [+o PinkFreud] by ChanServ
03:29 * McMartin will poke at it in a bit.
03:33
<~Vornicus>
This, or getting the name of a path from the index, would give me the ability to choose actions based on what path I'm on without having to go through combinatoric shit to figure that out.
03:35 franny [fran@Nightstar-e67f9d08.com] has quit [Operation timed out]
03:36 io|SPAMM [Alexandria@Nightstar-e67f9d08.com] has quit [Operation timed out]
03:36
< celticminstrel>
Hm. Need to get the entity that's "nearest" another entity. It sounds simple, but... there are options...
03:36
<~Vornicus>
when you say "nearest", in what space?
03:36
< celticminstrel>
"in what space"?
03:36 io|SPAMM [Alexandria@Nightstar-e67f9d08.com] has joined #code
03:37
<~Vornicus>
Do you have these entities on a line, or plane, or...?
03:37
< celticminstrel>
On a plane.
03:37
< celticminstrel>
With discrete coordinates.
03:37
<~Vornicus>
okay, and are you doing euclidean distance, manhattan distance, broadway?
03:37
<&McMartin>
Vorn: Each object has a field named "path_index" that is the path it is currently following.
03:38
< celticminstrel>
Well, that's what I meant by "options".
03:38
<~Vornicus>
RIght, that much I got
03:38
< celticminstrel>
I'm not sure.
03:38
<~Vornicus>
But the problem is that the paths I am aware of have names and I do not see a way to get their index.
03:38
<~Vornicus>
Like I start my gondola on a path named "garage" and path_index is 18
03:38
< celticminstrel>
Manhattan distance is x+y, right?
03:39
<&McMartin>
"garage" should be an alias for the number 18.
03:39
<~Vornicus>
Yes but
03:39
< celticminstrel>
What's broadway?
03:40
<~Vornicus>
I need to know what path things are on, to determine what branch of code I should be on when I decide how the gondola is going to move.
03:40
<~Vornicus>
Broadway: max(x, y) + min(x, y) * k, where k is some value in [0, 1)
03:41
<&McMartin>
Vorn: Something about your design deeply confuses me and I'm not sure what it is.
03:41
<~Vornicus>
Basically you have diagonal lines between cells that you can take
03:41
<&McMartin>
Can you post a screencap of the room, maybe?
03:41
<&McMartin>
I get the feeling I'm missing something *extremely* basic.
03:42
< celticminstrel>
How is max(x,y) + min(x,y) different from x+y...
03:42
< celticminstrel>
Oh, never mind.
03:42 io|SPAMM [Alexandria@Nightstar-e67f9d08.com] has quit [Operation timed out]
03:42
<~Vornicus>
It's not, but order of operations says you multiply by k before adding~
03:42
< celticminstrel>
*k changes it.
03:42
<~Vornicus>
http://www.youtube.com/watch?v=rRE1LKwD8zY <--- Let's Play Ducks Ahoy
03:44
<~Vornicus>
The gondola moves along canals. You control which direction it moves; if you're in a north-south canal, up and down work normally, and left and right will (for most places) direct you north or south depending on which way gets you to a canal first.
03:44
<~Vornicus>
Let's Play Ducks Ahoy... in German, apparently
03:46
< celticminstrel>
Why can't I find anything about this on Google or Wikipedia...
03:46
<~Vornicus>
My paths are simple components of the canals.
03:46
<&McMartin>
Hmm. It is not obvious to me that paths are the way to go here.
03:47
<&McMartin>
Since at any given point Up/Down/Left/Right all work.
03:47
<~Vornicus>
In order to determine the gondola's behavior I need to know what path it's on -- but the data I get from asking the gondola is the index number... but I do not have a way of correlating index number with the name of the path.
03:47
<&McMartin>
... what are you imagining the logic to be here?
03:47
<&McMartin>
Like, do you later on switch on this, or...
03:48
<&McMartin>
There's path_get_name(), but that gets you a string - I don't see that being useful for anything but debugging
03:48
<~Vornicus>
Logic goes like this: "Okay, person pressed... down. This is canal Tower Right, the east-west canal that goes under the teal bridge, and that means I'm closer to C street. Set velocity to +2."
03:49 io|SPAMM [Alexandria@Nightstar-e67f9d08.com] has joined #code
03:49
<~Vornicus>
It is useful, because now I can check that name against the list of named paths I created.
03:49
<~Vornicus>
WHich I don't have index numbers for.
03:49
<&McMartin>
But
03:49
<~Vornicus>
But?
03:49
<&McMartin>
OK, maybe the basic thing I'm missing is that you aren't making these in the path editor as path resources?
03:49
<~Vornicus>
I am making them in the path editor as path resources.
03:50
<~Vornicus>
I do not have their index numbers.
03:50
<&McMartin>
You don't have to
03:50
<~Vornicus>
I do have to.
03:50
<~Vornicus>
I need to know what canal I'm in.
03:50
<&McMartin>
If you're on Tower Right, then towerRight == path_index when you're on towerRight, as I read this.
03:50
<~Vornicus>
...really.
03:50
<&McMartin>
The name of the path in the path editor is a global constant, if paths work anything at all like sprites, objects, backgrounds, and rooms.
03:51
<~Vornicus>
See this, I had no idea about.
03:51
< celticminstrel>
So, um... what's the point of broadway distance?
03:51
<&McMartin>
Hm
03:51
<&McMartin>
So, what part of
03:51
<&McMartin>
19:38 <&McMartin> "garage" should be an alias for the number 18.
03:51
<&McMartin>
was unclear there?
03:51
<&McMartin>
Because I thought that's what I was saying there.
03:51
<~Vornicus>
I thought you meant the string literal "garage"
03:51
<&McMartin>
Oh.
03:51
<~Vornicus>
Which made absolutely no sense whatsoever
03:52
<&McMartin>
OK, no. I meant the token.
03:52
<~Vornicus>
celmin: broadway distance with a k of 0 is distance as a chess king moves.
03:52
<~Vornicus>
with a k of 0.5 it's distance in D&D 3e
03:53
<~Vornicus>
with a k of 1 it's equivalent to manhattan distance.
03:53
< celticminstrel>
I'm not sure what distance in D&D 3e is.
03:54
< celticminstrel>
Chess king distance... that'd be "the number of tiles you have to pass through to end up at this one if you can move in eight cardinal directions"?
03:54
<~Vornicus>
generally, when you move diagonally in 3e D&D, the first step that way costs 1, the second costs 2, the third costs 1 again
03:54
<~Vornicus>
Yes.
03:55
<~Vornicus>
So with a k of 0.5 and rounding down, you get the distance in steps that walking to that square takes.
03:55
< celticminstrel>
Things only move in four cardinal directions.
03:55
< celticminstrel>
Maybe manhattan is best.
03:55
<~Vornicus>
okay, you'll want manhattan distance.
03:55
< celticminstrel>
Alright.
03:55 * Vornicus fiddles with game maker again, tries it out.
03:56
<&McMartin>
Note also that because these are global constants it's usually a good idea to prepend resource identifiers with their type
03:56
<~Vornicus>
I see that now.
04:03
<~Vornicus>
Damn, my kingdom for a switch statement.
04:03
<~Vornicus>
or "in"
04:04 io|SPAMM is now known as iospace
04:05
< celticminstrel>
I just defined a commutative operator-...
04:05
<&McMartin>
"in" is "with", more or less.
04:05
<&McMartin>
But there are some wackinesses
04:05
<&McMartin>
GML is a little vague about whether references to an object are to an object or to Every Object Of That Class
04:06
<~Vornicus>
oh look, there's a switch.
04:07
<~Vornicus>
"with" is not at all what I want, I want if k in giant_freaking_list
04:07
< celticminstrel>
Occasionally I contemplate putting each class in its own file, but that would probably double or triple the number of files, and most of the new ones would be only ten or twenty lines...
04:19
<&McMartin>
Vorn: I think that "in" might be only in Pro
04:20
<&McMartin>
There is some clunky support for pre-rolled data structures
04:23
<~Vornicus>
I see the data structures
04:24
< celticminstrel>
Um... && has higher precedence than ||?
04:24
<~Vornicus>
I can't find a straight up function reference.
04:24
< celticminstrel>
Or is it the other way around?
04:24
<~Vornicus>
&& is multiplication, || is addition
04:24
< celticminstrel>
Oh, good point.
04:24
< celticminstrel>
Forgot that.
04:24
<&McMartin>
In Contents under Help, under "GML Reference"
04:24
<&McMartin>
Grouped by topic
04:24
< celticminstrel>
So, I should have parentheses here.
04:25
<~Vornicus>
Right, I see no list of functions for array handling
04:25
<&McMartin>
Yeah, because arrays don't get them, only ds_vectors.
04:25
<&McMartin>
Or whatever the name is
04:25
<~Vornicus>
oh I see
04:27
<&McMartin>
(Hex Inverter uses ds_grids for the board.)
04:28
<~Vornicus>
Okay I think I can live with this.
04:32
<~Vornicus>
ack. okay apparently jedit and game maker's "edit script in external editor" thing don't work together.
04:32
<&McMartin>
Huh
04:32
<~Vornicus>
jedit.exe closes and returns immediately
04:33
<~Vornicus>
So jedit itself is open and looking at the temp file that gm creates, but gm sees that jedit.exe has closed, takes focus, and deletes the temp file.
04:34
<~Vornicus>
then jedit goes "oops, that was deleted underneath me", and gm will never look at that temp file again.
04:50 Derakon[AFK] is now known as Derakon
04:53
<&Derakon>
Dude. http://local.wasp.uwa.edu.au/~pbourke/fractals/burnship/
04:55 iospace is now known as iospacedout
05:00
<&McMartin>
Dude indeed
05:06
<~Vornicus>
Man I have crazy stupid feature requests
05:06
<~Vornicus>
Scalable GUI throughout Gamemaker, everything feels too small.
05:57 * Vornicus works on the end path code, which is absolutely insane.
05:59 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Client closed the connection]
05:59 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
05:59
<~Vornicus>
Well, no, really it's just a shitton of data
06:08 cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
06:10 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
06:16 * Vornicus fiddles with the data slightly.
06:23 Derakon is now known as Derakon[AFK]
06:49 * Vornicus is pretty sure he's going to have to do a few more tricks with that later when he has the boat actually stopping, but so far.
07:06
<~Vornicus>
derp. okay, checking keydown state in the midst of an even,t using code. Ah. keyboard_check
07:11 You're now known as TheWatcher
07:14 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
07:17 * Vornicus befuddles now as the code editor says there's a syntax editor and he sees nothing wrong.
07:19
<~Vornicus>
er, syntax error
07:20
<~Vornicus>
oh, that's not actually a method, or something, wtf?
07:21
<~Vornicus>
how the nosehairs does it know what I'm telling it to do that to if it's not a method.
07:21
<@TheWatcher>
It just nose.
07:24
<~Vornicus>
full context: I'm trying to use a function in game maker called path_start; it is supposed to tell an object that it should now follow a particular path... but it doesn't take an object reference, and it isn't a method.
07:25
<~Vornicus>
right, enough, sleeptimes.
08:10 You're now known as TheWatcher[afk]
08:22 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [Client closed the connection]
09:04
<&McMartin>
"This" is implicit either in the with statement that encloses it or implicit in the object that is running the script.
09:04
<&McMartin>
There is also "other"
09:12
< Rhamphoryncus>
Woo. Just took the wrong pill. :P
09:13
< gnolam>
You're going to wake up in the morning and believe whatever you want to believe?
09:14
< Rhamphoryncus>
Naw, boring side effects like a headache
09:42 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
10:32 You're now known as TheWatcher
11:22 Kindamoody is now known as Kindamoody|out
11:36
<@TheWatcher>
Signs you probably haven't had enough sleep to be trying to code: it takes three attempts to hit the ';' key
11:49
< gnolam>
So that's the reason Python doesn't use semicolons or braces but does use semantic whitespace: the spacebar is /really/ easy to hit.
11:49
<@TheWatcher>
"Python: the language for people running 20 hours of sleep debt"?
11:50 iospacedout is now known as iospace
13:21 iospace is now known as io|gone
13:24
< gnolam>
http://www.theverge.com/2012/6/27/3120783/nixie-tube-chess-set-hack
13:32 * TheWatcher hates all over php, especially it's not-actually perl-compatible regular expression functions
13:33 * TheWatcher has that ' shot
14:38 You're now known as TheWatcher[afk]
14:38 io|gone is now known as iospace
15:06
<~Vornicus>
...nope. THis code will be hundreds of lines long if I do it piece by piece.
15:06
< iospace>
:P
15:10 * Vornicus tries to figure out what parts of the data he cares about.
16:21 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
16:22 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
16:22 mode/#code [+o ToxicFrog] by ChanServ
17:38 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
17:58 Attilla [Obsolete@Nightstar-8afef565.as43234.net] has quit [[NS] Quit: ]
18:00 ShellNinja is now known as Number3
18:04 Attilla [Obsolete@Nightstar-8afef565.as43234.net] has joined #code
18:04 Tarinaky is now known as Atreus
19:00 * iospace hmms... decides a second fan is inorder for her board
19:07
< froztbyte>
TheWatcher[afk]: it's funny that you expected otherwise
19:14
<&jerith>
TheWatcher[afk]: There are at least three different regex engines in PHP.
19:14 Kindamoody|out is now known as Kindamoody
19:38
< Rhamphoryncus>
float low = min(min(f_tridistance.x, f_tridistance.y), f_tridistance.z);
19:38
< Rhamphoryncus>
float high = min(min(f_tridistance.x, f_tridistance.y), f_tridistance.z);
19:38
< Rhamphoryncus>
float weight = smoothstep(0.005, 0.025, high);
19:38
< Rhamphoryncus>
19:38
< Rhamphoryncus>
colour = mix(line_colour, vec4(f_colour, 1), weight);
19:38
< Rhamphoryncus>
swapping low for high gives the same result o.O
19:44
<@rms>
Because they're the same value?
19:44
< Rhamphoryncus>
.. fuck :)
19:44
< Rhamphoryncus>
s/min/max/
19:50 Kindamoody is now known as Kindamoody[zZz]
20:10
< RichyB>
Fun thing. On Linux, if I dd if=/dev/sdb or of=/dev/sdb to take or lay down a disk image, the bytes that it reads|writes will push everything else out of my filesystem cache and make my laptop slow as it has to keep swapping programs back in.
20:10
< RichyB>
Setting iflag=direct or oflag=direct stops the blocks from going through the cache machinery, so everything else on the laptop stays responsive.
20:26
< Rhamphoryncus>
yay, I have a beach ball!
20:26
<@TheWatcher[afk]>
froztbyte: 'expect', no. 'complain bitterly about', yes.
20:26
< Rhamphoryncus>
Well, it's not actually a beach ball pattern, but it is a multicoloured sphere
20:27
< Rhamphoryncus>
Composed of 49152 triangles, heh
20:28
< Rhamphoryncus>
hehe, if I go inside it looks square :)
20:30
< RichyB>
Rhamphoryncus, hah! "Yay, I have a beach ball!" to me sounds like a Mac user loudly and sarcastically complaining about performance. ;)
20:30
< Rhamphoryncus>
heh
20:30
< Rhamphoryncus>
I don't know what that means but it sounds funny ;)
20:30
< RichyB>
OS X has a spinning multicoloured beach ball cursor as its alternative to Windows' hourglass timer.
20:31
<&McMartin>
The hourglass icon on OS X is colloquially known as "the beachball of doom"
20:31
< Rhamphoryncus>
ooooh
20:32
< Rhamphoryncus>
I understand why a sphere looks like a cube, but it still feels weird heh
20:34
< froztbyte>
TheWatcher[afk]: fair enough
21:52 You're now known as TheWatcher
22:01 * TheWatcher knucklecracks, attempts to work out a simple way to add ease-in and ease-out to dark engine joint tweqs
22:20 iospace is now known as io|gone
22:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:38 himi [fow035@0C0840.B22E58.E3471A.E028A1] has joined #code
22:38 mode/#code [+o himi] by ChanServ
--- Log closed Fri Jun 29 00:00:03 2012
code logs -> 2012 -> Thu, 28 Jun 2012< code.20120627.log - code.20120629.log >

[ Latest log file ]