code logs -> 2008 -> Mon, 17 Mar 2008< code.20080316.log - code.20080318.log >
--- Log opened Mon Mar 17 00:00:25 2008
00:18
<@MyCatVerbs>
Why's MI considered so spidery anyway?
00:19 * MyCatVerbs has never tried it, so has no reference for why everyone seems to consider it evil.
00:20
< Vornicus>
multiple inheritence is bad because it makes for precedence issues.
00:20
< Vornicus>
Especially when inheriting from a common ancestor, you will often end up with two definitions of a single method, and no particular agreement on which you use.
00:22
<@MyCatVerbs>
Dahhhhh.
00:24
<@MyCatVerbs>
Handy to know, thanks.
00:35 gnolam [lenin@85.8.5.ns-20483] has quit [Quit: Z?]
00:55
<@McMartin>
Also fun is this situation:
00:55
<@McMartin>
class A { field f; }
00:55
<@McMartin>
class B extends A { ... }
00:55
<@McMartin>
class C extends A { ... }
00:56
<@McMartin>
class D extends B, C { ... }
00:56
<@McMartin>
How many copies of f does D have?
00:58
<@McMartin>
And more importantly, if you cast D to a C, and use mutators that mess with f, will they be reflected when you cast it to B and use *those* methods?
00:58
<@McMartin>
In C++ the answer is "by default, no, not even if you cast."
00:58
<@McMartin>
Er. Not even if you *don't* cast.
00:59
<@McMartin>
Unless you do virtual multiple inheritance, in which case they do.
00:59
< C_tiger>
TWWEBTLWN
00:59
<@McMartin>
whut
00:59
< C_tiger>
"Those words were English but that language was not"
00:59
<@McMartin>
Indeed it wasn't. The language was C++.
01:00
<@McMartin>
There are many reasons to hate it. The fact that it attempts to do all forms of MI, and that all of them are wrong, is one of those reasons.
01:24 ReivUni [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
01:24
< ReivUni>
Wheeeee
01:26
< C_tiger>
Wait til the drugs wear off.
01:27
< ReivUni>
Heh. I had two tests in one day for my compsci papers. They -clashed-, until about an hour ago when one of my lecturers let me do their test an hour early.
01:27
< ReivUni>
(I still have four hours of testing straight, but meh)
01:35
<@MyCatVerbs>
McMartin: so if I understand this correctly, the reason multiple-interfaces isn't a problem even though multiple-inheritances is is that interfaces don't specify behavoir (just signatures) and also never specify fields?
01:36
<@McMartin>
MCV: Quite so.
01:37
<@MyCatVerbs>
Even though you can effectively specify a field by adding getFoo+setFoo to an interface, and making the usual conditions part of the interface's contract?
01:38
<@McMartin>
Sure. But note then that you have your answer as to "how many versions are there" - to wit, always one.
01:38
<@MyCatVerbs>
Spiffy.
01:39 * MyCatVerbs vaguely wonders if a straightforward ripoff of Haskell's typeclasses would be useful for a language like Java.
01:41
<@MyCatVerbs>
Since their capabilities are (AFAIK) a strict superset of Java's interfaces, but they have some really really nice additional features, too. Like you can define things like: if X is a member of typeclass Foo, Lists-of-X are members of typeclass Bar.
01:43
<@MyCatVerbs>
(For instance, printing of data structures is implemented like this. instance (Show a) => Show [a] where..., instance (Show a) => Show (Map a) where..., etc)
01:54 * Vornicus makes King Hairy iteration.
01:55 * Vornicus ...actually decides recursion is actually better.
01:55
< Vornicus>
otherwise I have to store iteration data in the structure, which isn't really that cool.
02:10
< Vornicus>
...hell yes, it worked.
02:10
< Vornicus>
And shockingly quickly, too.
02:11 * Vornicus thinks it worked, anyway.
02:14
<@ToxicFrog>
King Hairy?
02:43
< Vornicus>
I wanted to, for each square in a 9x8 grid, find a carcassonne tile that fits, and then move on to the next one, and so forth, until I run out of valid tiles. And then step backwards, find the next tile that fits, etc, etc.
02:43
< Vornicus>
THis would have required storing where i was in the iteration in each tile.
02:46
< ReivUni>
carcassonne tile?
02:46 mode/#code [+o Vornicus] by Vornicus
02:46
<@Vornicus>
I switched it to recursive. http://vorn.dyndns.org/~vorn/carcassonne_random.py <--- messy, but it works. Decomment lines 76 and 86 to get a progress graph; said progress graph could stand some improvement. Anyway it's nondeterministic, and outputs a list of tile IDs and directions; the id tells you what tile to use, the direction tells you which way to point the canonical 'top' of the tile.
02:47
<@Vornicus>
http://vorn.dyndns.org/~vorn/carcassonne_square.txt <--- the formatted output. In a moment I'll be taking a picture.
02:53
<@Vornicus>
Carcassonne being a board game.
02:53
<@Vornicus>
well, a tile game.
02:54
<@Vornicus>
You build a city-state from tiles, and you must match the edges of the tiles with each other.
02:56 ReivUni [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (EOF)]
03:00
<@Vornicus>
bah
03:08 * Vornicus eyes his crappy-ass photography. The target isn't straight, and the lighting is awful.
03:10
<@Vornicus>
Granted, I did this without a flash and holding the camera pointing down over a table at arm's length to keep from blocking the existing light, at night, in the most light-absorbing room in the house.
03:13
<@Vornicus>
http://vorn.dyndns.org/~vorn/carcassonne_square.jpg
03:17
< JeffL>
Are those football-shaped cities allowed?
03:17
<@Vornicus>
Yes.
03:17
<@ToxicFrog>
Yes, but they only score half as much as larger ones.
03:17
<@Vornicus>
They're not worth as much, though
03:17
<@Vornicus>
Usually if you finish a city you get two points per tile and two points per shield
03:17
<@ToxicFrog>
Half as much per tile, that is
03:18
< JeffL>
It's scored?
03:18
<@Vornicus>
Yeah
03:18
< JeffL>
Does your algorithm find 1. A valid map or 2. The highest-scoring valid map?
03:18
<@Vornicus>
(the two croissant shaped cities in the west are worth 8 and 6 points, from north to south, because the top one has a shield)
03:18
<@Vornicus>
A valid map, that fits compactly into a rectangle.
03:31 Derakon [~Derakon@Nightstar-6759.hsd1.mn.comcast.net] has joined #code
03:31 mode/#code [+o Derakon] by ChanServ
03:40
<@Vornicus>
hey, look, the river tiles give me an odd number of city edges. Which means that I /can/ make it self-contained.
03:42
<@Derakon>
Rock.
04:25 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
04:30 Vornicus [~vorn@76.254.192.ns-13365] has joined #code
04:30 mode/#code [+o Vornicus] by ChanServ
04:32 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Client exited]
04:33 Vornicus [~vorn@76.254.192.ns-13365] has joined #code
04:33 mode/#code [+o Vornicus] by ChanServ
04:36 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Client exited]
04:37 Vornicus [~vorn@76.254.192.ns-13365] has joined #code
04:37 mode/#code [+o Vornicus] by ChanServ
04:40 Vornotron [~vorn@76.254.192.ns-13365] has joined #code
04:43 Vornicus [~vorn@76.254.192.ns-13365] has quit [Quit: Leaving]
05:15 Reltzik [Reltzik@Nightstar-6331.dsl.pltn13.sbcglobal.net] has joined #code
05:24 Vornotron is now known as Vornicus
05:26 * Vornicus randomly considers building his own Carcassonne art library. Would not be nearly as involved as Catan's.
05:27
< Reltzik>
You have a Catan art library?
05:30
< Vornicus>
Yes.
05:30
< Reltzik>
... WHY?
05:30
< Vornicus>
For my planned Catan webgame
05:30
<@jerith>
Because he's writing a web-based Catan.
05:31 mode/#code [+o Vornicus] by Vornicus
05:31
<@Vornicus>
http://unspeakablevorn.livejournal.com/30173.html#cutid1
05:31
< Reltzik>
.... cool!
05:48 AnnoDomini [AnnoDomini@83.21.54.ns-26803] has joined #Code
05:48 mode/#code [+o AnnoDomini] by ChanServ
05:55 Derakon is now known as Derakon[AFK]
06:15 Reltzik [Reltzik@Nightstar-6331.dsl.pltn13.sbcglobal.net] has quit [Quit: DEATH TO THE UNDEAD!]
06:31
<@McMartin>
Sweet.
06:31
<@McMartin>
nfrotz works out of the box in Terminal.app
06:34
<@Vornicus>
Woohoo
06:43
<@McMartin>
Though there are some bizarre savegame-related errors I cannot reproduce, and so I am sending off debug versions to petitioners.
06:57 Vornicus is now known as Vornicus-Latens
07:04 GeekSoldier|bed is now known as GeekSoldier
07:41 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
07:42 mode/#code [+o gnolam] by ChanServ
08:11 GeekSoldier [~Rob@Nightstar-9482.dip.t-dialin.net] has quit [Ping Timeout]
08:15 GeekSoldier [~Rob@91.18.96.ns-26390] has joined #code
10:28 Thaqui [~Thaqui@Nightstar-123.jetstream.xtra.co.nz] has left #code [Leaving]
11:14
<@Reiver>
Oh, FWIW, Vorn: Please don't feel like you have to stop explaining things just because I quit ReivUni suddenly.
11:15
<@Reiver>
I come home and read it anyway, so. ;)
11:35 AFKSkull [~none@Nightstar-7066.dyn.optonline.net] has joined #code
11:36
< AFKSkull>
Good morning. Anyone awake?
11:39
< GeekSoldier>
yes.
11:47
<@Reiver>
sup?
11:52
< AFKSkull>
Well, I ws wondring what the best approach to a simple(I think) project I have would be
11:54
< AFKSkull>
I wnt to create a basic importer between two formats of 3d scene. the base file is an extremely bare bones set of coordinates, and the destination format is a very similar ASCII format that has similar layout for coordinates but a lot more miscellenious information.
11:54
< AFKSkull>
Basically, I just want to take the variables from one and plug them into the right place on the other.
11:54
< GeekSoldier>
where does the miscellaneous information come from?
11:55
< AFKSkull>
well, in this case that information is irrelevant- I'll be using default information for it.
11:56
< AFKSkull>
I could probably do it in actionscript, but I recall vorn helping me with a better way to do something similar long ago.
12:03
< AFKSkull>
On the pastebin, 9w2Fx744 is the source format, with each item on it's own line.
12:03
< AFKSkull>
SDpku339 is the detination format
12:03
< AFKSkull>
*destination
12:19 AbuDhabi [AnnoDomini@83.21.80.ns-27252] has joined #Code
12:19 AnnoDomini [AnnoDomini@83.21.54.ns-26803] has quit [Ping Timeout]
12:33
<@Reiver>
hmm
12:33
<@Reiver>
So you basically want a string manipulation, ASCII?
12:33
< AFKSkull>
yup
12:34
<@Reiver>
hmn.
12:34
<@Reiver>
Well, the first and most obvious step is to identify all the different lines in the source and destination files (One assumes they are fundamentally the same when it comes to the Bits With Numbers Attached)
12:35
<@Reiver>
(If not, you may be in for a much larger world of hurt if it's not convinient newlines, but)
12:38
< AFKSkull>
well, it's fairly straightforward
12:39
< AFKSkull>
since in the file spat out of the source, every new line is the appropriate data
12:39
< AFKSkull>
all I need to do is format it suitibly and add the extra information, which will be repeated for each one
12:45
<@Reiver>
Aha
12:45
<@Reiver>
That is indeed very simple.
12:46
<@Reiver>
Only question really, is what languages are you proficient in, and do these lines have easily identifiable variables?
12:49
< AFKSkull>
I am particularly proficient in none
12:50
< AFKSkull>
and except for the fact that they are always in the same place(with dividers) then no
12:50
< AFKSkull>
I imagine the dividers would be plenty though
12:50
< AFKSkull>
I'll be using actionscript if there's nothing more suited to it
12:51
< AFKSkull>
which is basically javascript when it comes to text parsing, at least in 2.0
13:22 * ToxicFrog checks the format
13:22
<@ToxicFrog>
Yes, the dividers are plenty.
13:23
<@ToxicFrog>
Are there any constraints on what languages can be used?
13:28
< AFKSkull>
none whatsoever
13:29
<@ToxicFrog>
http://rafb.net/p/evV4Rw27.html here's a converter in awk
13:30
< AFKSkull>
with the caveat that I'll also need a link to a compiler
13:33
<@ToxicFrog>
Awk is an interpreted language. The interpreter comes standard on any *nix system.
13:34
<@ToxicFrog>
If you're on windows, mingw and cygwin both come with it, and gnuwin32 has a port of it as well
13:34 * AFKSkull nods, is looking it up
13:34
<@ToxicFrog>
It will work best wrapped in bash so that you can easily go, say, for i in *.mdl; do awk -f convert.awk < "$i" > "${i/.mdl/.lwo}"; done
13:35
<@ToxicFrog>
And thus mass-convert your files.
13:35 * ToxicFrog also has a converter in Lua, now, and one in bash itself isn't hard either
13:36
< AFKSkull>
well, what would be simplest, with the least installation and setup of stuff?
13:36
<@ToxicFrog>
In pretty much any language it's "read the input; split it apart on ';'; output the template with some pieces replaced by the stuff that you read;"
13:37
< AFKSkull>
I meant the implementation, not the script
13:37
<@ToxicFrog>
The script is the implementation.
13:38
<@ToxicFrog>
But I wasn't answering that, I was just commenting.
13:38
<@ToxicFrog>
I would say bash, except that it doesn't seem to be possible to get a windows port of bash outside of cygwin or msys
13:38
<@ToxicFrog>
Probably awk, then, if you're ok with invoking it from the dos shell
13:39
< AFKSkull>
I hve no particular problem with it
13:39
<@ToxicFrog>
http://gnuwin32.sourceforge.net/packages/gawk.htm
13:40
<@ToxicFrog>
The thing to keep in mind is that this script converts one file at a time; it's up to the shell to run it on all your model files.
13:40
<@ToxicFrog>
I think cmd.exe has something for that, but don't quote me on that.
13:40
< AFKSkull>
that's not a problem
13:40
< AFKSkull>
this isnt a model file, it's a scene file
13:41
< AFKSkull>
for translation, rotation, and scaling of a gigantic list of preconverted objects
13:41
<@ToxicFrog>
Aah
13:41
<@ToxicFrog>
Oh, it's a list?
13:41
<@ToxicFrog>
It
13:41
< AFKSkull>
yup
13:41
<@ToxicFrog>
s not one object per file?
13:41
<@ToxicFrog>
Ok, let me make some quick modifications to the script then~
13:41
< AFKSkull>
no, it's several thousand objects
13:41
< AFKSkull>
one per line
13:41
<@ToxicFrog>
Does each one need to go into a different file?
13:42
< AFKSkull>
no
13:42
< AFKSkull>
all into one
13:42
<@ToxicFrog>
Awesome.
13:42
<@ToxicFrog>
In that case, just remove the "exit" from the end of the awk script
13:42
< AFKSkull>
basically, just expanding the list, which is basically a stripped down scene file, into the full thing
13:43
<@ToxicFrog>
And then you run it using: awk.exe -f <script file> <scene file> > <output file>
13:43
< AFKSkull>
the numbers don't translate properly, but I already write a script internally to lightwave to scale and move it once it's in the right format
13:43
<@ToxicFrog>
Eg, awk -f convert.awk scene_stripped scene.lws
13:43
<@ToxicFrog>
Er
13:43
<@ToxicFrog>
Eg, awk -f convert.awk scene_stripped > scene.lws
13:43
< AFKSkull>
gotcha
13:43
<@ToxicFrog>
Forgot the redirect operator ??
13:44
<@ToxicFrog>
Without the > scene.lws it will just dump it all to the terminal for you to take a look.
13:44
< AFKSkull>
and then I just get to figure out which of the thousands of objects I want to keep @_@
13:44
<@ToxicFrog>
I note that getting it to adjust the coordinates and suchlike at the same time wouldn't be hard, either.
13:44
< AFKSkull>
well, it's not always the same
13:44
<@ToxicFrog>
Aah
13:44
<@ToxicFrog>
Probably more trouble than it's worth, then
13:45
<@ToxicFrog>
Since you already have a script for that.
13:45
< AFKSkull>
so what I did was make it so I'd adjust a single reference object, and then it would automatically propagate the changes
13:46
< AFKSkull>
but it only works if I have them loaded properly and placed relative to their initial relative spots
13:47 * AFKSkull gives it a try
13:48 mode/#code [+vvvvv AbuDhabi AFKSkull Attilla C_tiger GeekSoldier] by ToxicFrog
13:48 mode/#code [+iRvvv jerith Kazriko Pi] by ToxicFrog
13:49 mode/#code [+vvv JeffL Raif Serah] by ToxicFrog
13:49 mode/#code [-iR] by ToxicFrog
13:58
<@ToxicFrog>
Well, I'm off to class. Later!
14:01
<+AFKSkull>
ok, it works, but doesn't actually save the file
14:01
<+AFKSkull>
thanks a ton though, Im sure I'll figure it out now^_^
15:27
<@ToxicFrog>
The > filename is meant to save it
15:27
<@ToxicFrog>
It redirects output to that file
15:34
<+AFKSkull>
ah, right
15:34
<+AFKSkull>
I got it now, thanks
15:37
<+AFKSkull>
aha, seems to be working perfectly
15:41
<+AFKSkull>
albeit with absolutely insane results, but that will have to be worked out in the model exporter
15:42
<+AFKSkull>
thanks a lot^_^
15:43
<@ToxicFrog>
No problem
15:44
<@ToxicFrog>
It really is a two minute job in most languages.
15:45
<+AFKSkull>
to be fair, the hardest part of doing it in actionscript would be getting flash to load the file
15:46
<+AFKSkull>
but you saved me a ton of work, definately
15:58
<+AFKSkull>
http://pinkhair3d.blogspot.com/2008/03/wee.html
17:32 mode/#code [+oooooo AbuDhabi AFKSkull Attilla C_tiger GeekSoldier JeffL] by Vornicus-Latens
17:32 mode/#code [+oooo Kazriko Pi Raif Serah] by Vornicus-Latens
17:38 * AbuDhabi crackles with power.
17:52
<@C_tiger>
Ooooh.
17:56 Vornicus-Latens is now known as Vornicus
17:58 * Vornicus updates the access list.
18:12
<@C_tiger>
Does this channel get spammed a lot such that it needs to be +U?
18:13
<@C_tiger>
Or is that just tradition?
18:14
<@AbuDhabi>
Tradition. We don't get very many spammers on this network. Or, rather, they all hang out in #oubliette.
18:14
<@C_tiger>
Ok, just curious.
18:15
<@C_tiger>
I mean I don't get spammers in the other channels I'm in but I thought maybe the more "generic" channels may be different.
18:16 * Vornicus isn't exactly sure why it's +U any more.
18:19
<@GeekSoldier>
there had been a small problem in the past with drive-through spam.
18:20
<@Vornicus>
ah, so
18:21
<@Vornicus>
This is one of the largest public channels.
18:29
<@C_tiger>
Wow, apparently #fleet and #crfh and #code are among the top 5 non-secret channels.
18:30
<@AbuDhabi>
#fleet and #crfh are secret.
18:30
<@C_tiger>
Oh, right, I'm in them, that's why they show up in /list
18:48
<@Vornicus>
um
18:49
<@Vornicus>
..heh
18:49
<@Vornicus>
Anno got there first
19:19 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
19:19 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
19:19 mode/#code [+o gnolam] by ChanServ
19:26 * Vornicus fiddles with the carcassonne thingy, changing the outputter and the match checker.
19:27 * Vornicus also adds cloister data.
19:38 AbuDhabi is now known as Steven
19:46
<@jerith>
Is #crfh secret?
19:47
<@jerith>
I'd've thought a webcomic channel would be public.
19:52 * Vornicus rejiggers his progress output, watches it tick over, is so glad he knows that backspace trick.
19:55
<@jerith>
Backspace trick?
19:56
<@Vornicus>
To make a progress bar.
19:56
<@jerith>
Ah.
19:56
<@Vornicus>
If you want to rewrite something, you backspace over it, flush the backspaces, and then write what you want.
19:56 * jerith nods.
19:58
<@Vornicus>
So I've got my carcassonne progress thingy buzzing through possibilities, and telling me what fraction of the possibilities it's gone through for each individual tile.
20:03 GeekSoldier is now known as GeekSoldier|bed
20:15
<@Vornicus>
THis one's taking a while, because it's got other things to deal with.
20:16
<@Vornicus>
Other restrictions, that is. The original did not take nearly so long, because it didn't have to restrict the search space so the river doesn't go off the edge.
20:46
<@jerith>
http://www.classnamer.com/
20:48
<@Vornicus>
RepublicanHashSubscriber.
20:48
<@Vornicus>
Yeah...
20:48
<@gnolam>
Hah.
20:49 * gnolam is so going to use that in his next assignment.
20:53 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
20:55 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
20:55 mode/#code [+o gnolam] by ChanServ
21:05 Jeff [Kaline@Nightstar-12251.dsl.sndg02.pacbell.net] has joined #code
21:07 JeffL [JPL@Nightstar-12251.dsl.sndg02.pacbell.net] has quit [Ping Timeout]
21:16
<@Vornicus>
gah. This is taking an age.
21:19
<@Vornicus>
...I imagine that this would go faster if I could path the river first.
21:27 Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout]
21:29 Reiver [~reaverta@Nightstar-8829.xdsl.xnet.co.nz] has joined #Code
21:29 mode/#code [+o Reiver] by ChanServ
21:30
<@gnolam>
What are you doing, exactly? Pre-placing a Carcassone board?
21:30
<@Vornicus>
Trying to build a Carcassonne board that fits into a rectangle
21:32
<@gnolam>
Ah.
21:32
<@gnolam>
Just to see if it can be done? :)
21:32
<@Vornicus>
I'm pretty certain it can be done. It's just factorial complexity.
21:35 Steven is now known as AnnoDomini
21:37
<@Vornicus>
Right now I'm watching one buzz at around 80/84 complete, and trying to figure out how to prebuild the river.
21:42
<@Vornicus>
Because it's pretty clear that what's happening is I'm getting rivers that can't hope to match up, and so in order to fix it it has to go all the way back to the start of the river and try again.
21:43
<@Vornicus>
Which is an incredible amount of work because the algorithm doesn't understand that.
21:43
<@gnolam>
Ah.
21:44
<@Vornicus>
(the algorithm is just a recursive thing - it tries all the available tiles in the next available space, and if it finds one that works, it goes on to the next, and if it doesn't, it backs up and continues that one's iteration)
21:44
<@C_tiger>
Ick.
21:45
<@Vornicus>
Which works fine, when you don't have the heavily restricted river tiles in there; it gets an answer for river-free in a few seconds.
21:45
<@Vornicus>
--and that's in unoptimized python with a time-consuming debug.
21:45
<@C_tiger>
Can you prebuild river "sections"?
21:46
<@Vornicus>
I think what I'm going to do is try pathing and placing the river /first/, and then convincing the recursive section to walk over it.
21:46
<@C_tiger>
Ok, that works too.
21:46
<@Vornicus>
To step over it, rather, so it doesn't try placing anything on the river.
21:49
<@C_tiger>
Well, the river should divide the board right? so can you use a "fill" algorithm, treating the river as a boundary?
21:50
<@Vornicus>
The river doesn't really divide the board.
21:50
<@Vornicus>
The river is twelve tiles, with a beginning and an end.
21:51
<@C_tiger>
regardless.
21:51
<@C_tiger>
I mean by treating the river as a boundary, you avoid all the problems of disjointed tiles when you "walk over" it.
21:52
<@Vornicus>
Then comes the problem of "which order do I cover the tiles in" and "where exactly in the rectangle is the river"
21:53
<@C_tiger>
I thought you were prebuilding the river.
21:53
<@Vornicus>
Right
21:53
<@C_tiger>
So you know where the river is.
21:53
<@C_tiger>
I'm just suggesting "walk around" rather than "walk over"
21:54
<@Vornicus>
thing is, using the walk-around I need to use the river's position and spiral out from it (this is actually pretty hard) and then filter out things that aren't in the rectangle
21:54
<@C_tiger>
No, I mean still start in the corner.
21:55
<@C_tiger>
But when you hit the river, fill rather than jump.
21:55 * Vornicus thinks
21:55
<@C_tiger>
The wall is a boundary too.
21:55
<@C_tiger>
It's just a recursive fill algorithm.
21:55
<@Vornicus>
...I don't even know any fill algorithms.
21:56
<@C_tiger>
Isn't it just for each tile, fork for each tiles around it.
21:56
<@C_tiger>
*each tile
21:56
<@Vornicus>
ah, so
21:56
<@C_tiger>
If a tile is completely surrounded, stop.
21:57
<@Vornicus>
THing is, it's poosible for the river to touch two edges and this block off some of the tiles as regards one corner.
21:58
<@Vornicus>
--indeed, I can create a scenario where there are as many as three disjoint sections.
21:58
<@C_tiger>
But that's an easy case to check for. Fill from one corner. Test other corners as needed.
21:58
<@C_tiger>
The only issue is if you have a circular river.
21:59
<@Vornicus>
I think I'm joust going to do skip. It's non-branching recursive, then.
22:00
<@C_tiger>
Ok.
22:00
<@C_tiger>
*shrug* it was an idea.
22:00
<@Vornicus>
(and in this case, non-branching recursive is preferable because branches can block each other off...)
22:04 Brother_Willibald [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
22:04 gnolam is now known as NSGuest-5587
22:06 NSGuest-5587 [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
22:07 Brother_Willibald is now known as gnolam
22:28 AnnoDomini [AnnoDomini@83.21.80.ns-27252] has quit [Quit: I. AM. BEOWULF.]
23:35
<@Vornicus>
...alternatively, I can path the river, and then add checks to the match thing to make sure that river tiles get into the path.
23:36 The_Mighty_END [~Zeratul@58.6.44.ns-20543] has joined #code
23:47 Reiver [~reaverta@Nightstar-8829.xdsl.xnet.co.nz] has quit [Quit: Changing servers]
23:48 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
23:48 mode/#code [+o Reiver] by ChanServ
--- Log closed Tue Mar 18 00:00:35 2008
code logs -> 2008 -> Mon, 17 Mar 2008< code.20080316.log - code.20080318.log >