code logs -> 2006 -> Sat, 04 Nov 2006< code.20061103.log - code.20061105.log >
--- Log opened Sat Nov 04 00:00:53 2006
00:21 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
00:39 You're now known as TheWatcher[T-2]
00:41 You're now known as TheWatcher[zZzZ]
01:22 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
01:50 * Janus throws the towel at it.
01:51
< Janus>
Alright, that kind of pathfinding, though it looks nice in concept, just isn't going to work.
01:54
<@Vornicus>
describe "that kind of pathfinding" - I'll examine it when I return.
01:54 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ]
01:56
< Janus>
Well... I guess the best way to describe would be...
01:58
< Janus>
Where the person stands is where a vine is planted, and where that person needs to go would be the sun. The vine will first grow straight to the sun, but if something gets in its way, the vine splits in two, they curve a bit around the obsticle, and make a v-line for the sun again.
01:59
< Janus>
The first branch to touch the sun wins, and the ones that don't die off, leaving only one vine path. Then, the vine is pulled tight between the person and the target, so that the only place it bends is at the corners.
02:02
< Janus>
It works fine as it is right now if there's nothing in it's way, and it also works if there's only a little bit of something in its way. But, if something large gets in the way, the game will slow down tremedously, and eventually be unable to find the target.
02:20 * Janus has several theories to where the trouble is after looking at it.
02:21
< Janus>
First, because of how the function uses recursion, one branch keeps growing, and all the others don't get a chance until it reaches the destination, making it a bit pointless.
02:24
< Janus>
Actually... that's the only theory I have.
02:27 * Janus tries to rework it without using recursion.
02:36
<@McMartin>
Yeah, BFS requires a queue to work through, not a stack.
02:36
<@McMartin>
While you can do BFS with recursion, unless you're using a language where recursion replaces, like, for loops, then you aren't really going to gain anything with recursion.
02:42 * Janus runs BFS through his acronymn library, and only comes up with "Burger, Fries, and a Shake."
02:43
<@McMartin>
"Breadth-First Search"
02:43
<@McMartin>
As opposed to "depth-first search"
02:44 Vornicus-Latens is now known as Vornics
02:44 Vornics is now known as Vornicus
02:45
< Janus>
Ah, I see.
02:50
<@McMartin>
The usual way of doing both is to keep a list of places to check.
02:50
<@McMartin>
In DFS, you put the Next Thing To Check at the beginning of the list, so that you're basically running as far down as you can, then backtracking.
02:51
<@McMartin>
In BFS you put all the locations you discover at the end of the list
02:51
<@McMartin>
Effectively, checking all length-1 paths before trying any length-2 ones.
02:56
< Janus>
I'd have to say BFS sounds more appealing, as it wouldn't be as nessessary to check through every possibility to find the best one.
02:56
< Vornicus>
look up Dijkstra's algorithm for the canonical pathfinding BFS
02:57
<@McMartin>
Indeed; that'll let you have it automatically avoid costly terrain unless it turns out to be worth it, too.
02:59
< Vornicus>
Also note that, if possible, you should be working with significant features as opposed to the whole world - if you're doing this on a plane with polygons, it makes sense to /only/ consider the corners of polygons.
03:00
<@McMartin>
If you're doing standard nav meshes, actually, midpoints of lines on the polygons works better.
03:00
<@McMartin>
Otherwise they'll zigzag to follow the triangles.
03:00
<@McMartin>
... though, really, that means more "treat your triangle mesh as a hex mesh"
03:00
< Vornicus>
Rather - if you're doing this in a world like the old Atari game Combat.
03:03
< Janus>
Would this work if the movement was unrestricted, as in, (float x, float y) free? It just seems this algorithm is meant more for set paths between two spots, assuming the train won't 'derail'. Of course, I'm probably wrong on that.
03:03
< Vornicus>
Dijkstra is designed for /graphs/, which are decidedly discrete.
03:05
<@McMartin>
You really probably want to sneak a navigation mesh in so that it's easier to think about it.
03:05
< Vornicus>
indeed.
03:05
<@McMartin>
When you're walking to the store, you don't do a search for every step you take.
03:06 * Janus watches for the cracks, but asside from that, that makes sense.
03:06
< Vornicus>
Alternatively, you can determine your obstacles and use their corners as the vertices of a graph, with everything you can walk directly to (cast a ray to each other vertex, take only those that do not cross another obstacle) being a node that node connects to.
03:07
< Vornicus>
If you're walking to a point that's on the other side of a house, you don't go straight at the house and turn, you go toward a /corner/ of the house.
03:09
< Janus>
Alright. However, what could be done if the object one is walking around is round..?
03:09
< Vornicus>
Use a polygon
03:09
< Janus>
Alright, that would be accurate enough.
03:11
< Vornicus>
seriously, above a certain threshold, you can't tell that a round thing is, in point of fact, a polygon.
03:12
< Janus>
Now... what if the obstruction isn't really an obstruction, but just a cliff face, where it would be passible on a certain part of the map, but an obstruction on another...?
03:12 * Janus may be thinking 2-Dimensionally here...
03:12
< Vornicus>
Then your obstruction is not a /single/ obstruction.
03:14
<@McMartin>
And your nav mesh doesn't connect between the bottom of the cliff and the top directly.
03:14
< Vornicus>
Right.
03:15
<@McMartin>
(Or if it is climbable, just only with difficulty, then it's connected, but the edge is a very costly one)
03:19
< Janus>
I think I've got it... a nav mesh is simply a collection of vertices, the edges between them, and the cost of going from one to the other, right...?
03:19
<@McMartin>
Yeah
03:25 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: off to ponder~]
04:04 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
05:00 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
05:00 mode/#code [+o Chalcedon] by ChanServ
05:33 takyoji [~caleblang@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
05:34
< takyoji>
Anyone know of a free anti-malware software that runs on Windows XP SP1 and below?
05:34
<@McMartin>
AdAware SE; SpyBot Search and Destroy
05:34
< Vornicus>
Hijack This
05:36
< takyoji>
yea, someone else also recommended Adaware and spybot
05:36
< takyoji>
I completely forgot about Ad-Aware.. I used to use it
05:37
<@McMartin>
Spybot also turns into a jetpack and a humongous cannon if you know the right controls.
05:37
<@McMartin>
*BEEP* DESTROY
05:37
< takyoji>
xD
05:37 * Stephenie hides
05:38
< Vornicus>
...you mean like the Vespavenger's scooter?
05:38
<@McMartin>
Actually, like Evil Killer Death Spybot 5000 from Adventurers.
05:38
< Vornicus>
heh
05:42 mode/#code [+oooooo Ev3 Janus Jo}{n Stephenie Syloqs-AFH takyoji] by Reiver
05:42 mode/#code [+oo Thaqui Vornicus] by Reiver
05:44 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: zzz]
06:09
<@takyoji>
wooo! The second place I've been the operator
06:09
<@takyoji>
The primary place I administer is #tech
06:09
<@takyoji>
but its pretty much dead now
06:51 takyoji [~caleblang@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
06:58 * Vornicus finally finds the name of a paper he can actually look up: How To Tangle With A Nested Radical
06:58 * Vornicus duly downloads.
07:01 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
07:08 You're now known as TheWatcher
07:20 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
07:20 mode/#code [+o Chalcedon] by ChanServ
07:26 Chalcedon is now known as ChalcyAFK
08:20 You're now known as TheWatcher[swim]
08:34 Vornicus is now known as Vornicus-Latens
08:41 MahalOUT [~Mahal@Nightstar-11770.worldnet.co.nz] has quit [Quit: It's hard to be mad at someone who misses you while you're asleep. ]
09:08 Netsplit Troika.TX.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: @Jo}{n, @ChalcyAFK, @Stephenie
--- Log closed Sat Nov 04 09:14:35 2006
--- Log opened Sat Nov 04 09:15:13 2006
09:15 TheWatcher[swim] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
09:15 Irssi: #code: Total of 11 nicks [0 ops, 0 halfops, 0 voices, 11 normal]
09:15 Irssi: Join to #code was synced in 23 secs
09:19
< McMartin>
Rar
09:19 * McMartin stabs Python for not handling nested scopes properly.
09:20 Chalain [~chalain@Admin.Nightstar.Net] has joined #Code
09:20 ServerMode/#Code [+o Chalain] by Troika.TX.US.Nightstar.Net
09:20 mode/#code [+o Chalain] by ChanServ
09:22 jerith [~jerith@IRCop.Nightstar.Net] has joined #code
09:22 mode/#code [+o jerith] by ChanServ
09:29
< McMartin>
>>> from __future__ import braces
09:29
< McMartin>
SyntaxError: not a chance
09:30
<@jerith>
Morning all.
09:30 * jerith grins.
09:30
< McMartin>
I am somewhat annoyed at Python at the moment, though.
09:31
< McMartin>
Because while I can read upvalues, I cannot update them.
09:31
< McMartin>
Even with +=.
09:31
< McMartin>
This is forcing me to use OO in places I'd really rather not.
09:37
<@jerith>
upvalues?
09:37
< McMartin>
However, this is apparently common enough that there's an Official Python Line on it, to wit: "Use classes."
09:37
< McMartin>
I'd like to be able to define nested functions that muck with their caller's internal variables.
09:37
< McMartin>
My internal form of code structuring is, uh, more FP than OOP.
09:38
<@jerith>
Ah.
09:38
< McMartin>
In this case I have:
09:38
<@jerith>
Yes, they want you to use classes.
09:38
< McMartin>
(a) a class with one "public" method
09:38
< McMartin>
(b) a private method that is only called by that method.
09:38
< McMartin>
(c) three fields that are only written by the private method and read by both the public and private one.
09:39
< McMartin>
And all my instincts scream that (c) should be locals in (a), and (b) defined as a local function inside (a), and (a) should not be a method, but a standalone function.
09:39
< McMartin>
Ah, such is life.
09:39
<@jerith>
Better than Ruby, though.
09:40
< McMartin>
ML isn't an option here, so I'm basically out of luck anyway~
09:40
< McMartin>
Also, they have decent reasons for it
09:40
< McMartin>
(And if I were using ML, I wouldn't be having updates either)
09:42
<@jerith>
foo = method(:quit)
09:42
<@jerith>
foo.call
09:42
<@jerith>
Or foo[]
09:46
<@jerith>
All just an incredibly horrible hack to get around not being able to assign functions directly because you can call them without parentheses.
09:48
< McMartin>
Ah. Fun.
09:48
< McMartin>
Hmm
09:48
< McMartin>
This lexer should really be a generator.
10:05 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
10:05 mode/#code [+o Reiver] by ChanServ
10:59 Jo}{n is now known as EvilDarkLord
11:08 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #Code
11:08 mode/#code [+o Pi] by ChanServ
11:19 Ev3 [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has quit [Quit: Don't try to read the quit message, that is impossible. Instead only realize the thruth; "there is no quit message" and you will see it is not you who read the quit message but the quit message who reads you.]
11:40 You're now known as TheWatcher
12:07 Thaqui is now known as ThaquiSleep
13:03 Reiver is now known as ReivZzz
13:47 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
13:47 mode/#code [+o Chalcy] by ChanServ
13:48 ChalcyAFK [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
14:14 ReivZzz is now known as ReivSLEP
15:28 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
16:07 * jerith ponders Rails.
16:15 * TheWatcher sidetracks jerith
16:45 * jerith derails.
17:04 * jerith decides that $c16's CS teacher needs to be disembowelled.
17:04
<@jerith>
He advocates putting a "try { foo() } catch (Exception e) {}" around stuff.
17:04
<@jerith>
Who the hell *teaches* kids to ignore *all* exceptions?!?
17:08
< TheWatcher>
could be worse
17:10
< TheWatcher>
could be using catch(Throwable t) {}
17:11 * jerith nods.
17:12
<@jerith>
At least the NullPointerExceptions he's causing aren't silently disappearing...
17:22 You're now known as TheWatcher[afk]
17:23 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
17:42 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
17:44 Syloq is now known as Syloqs-AFH
18:05
< ToxicFrog|AFN>
McMartin: what makes it a generator and not a lexer?
18:11 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
18:22 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
18:42 You're now known as TheWatcher
19:00 EvilDarkLord is now known as Azadir
19:43 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
20:20 ToxicFrog|AFN is now known as ToxicFrog
20:30 Mahal [~Mahal@Nightstar-11770.worldnet.co.nz] has joined #Code
20:31 mode/#code [+o Mahal] by ChanServ
21:33 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:33 mode/#code [+o Chalcy] by ChanServ
21:35 Chalcy is now known as Chalcedon
21:49 ThaquiSleep is now known as ThaquiWork
22:15 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: din]
23:04
< McMartin>
ToxicFrog: Generators are a data type in Python. It is a generator instead of a function.
23:04 Azadir is now known as EvilDarkLord
23:09 EvilDarkLord is now known as EvilSLEPLord
23:16
< ToxicFrog>
Aah.
23:21 Chalcedon is now known as ChalcyChores
--- Log closed Sun Nov 05 00:00:53 2006
code logs -> 2006 -> Sat, 04 Nov 2006< code.20061103.log - code.20061105.log >