code logs -> 2007 -> Sat, 02 Jun 2007< code.20070601.log - code.20070603.log >
--- Log opened Sat Jun 02 00:00:48 2007
00:04 Derakon[AFK] is now known as Derakon
00:05 Thaqui [~Thaqui@Nightstar-26109.jetstream.xtra.co.nz] has joined #code
00:05 mode/#code [+o Thaqui] by ChanServ
00:22 * Derakon eyes http://66.235.60.44/~chriswei/temp/polygon4.png and sighs.
00:22
<@Vornicus>
...cute.
00:22
<@Derakon>
If I collide C against B, then I back out to the left, cancelling C's horizontal velocity. I want to collide against A, thereby just cancelling the vertical velocity, but I see no way to achieve that without massively ugly logic.
00:22
<@Derakon>
A and B are ground polys; C is the player.
00:23
<@Derakon>
C can fly! But if he bumps his head against the ceiling, then he comes to a stop.
00:27
<@Vornicus>
and of course N doesn't provide any enlightenment.
00:31
<@Derakon>
Well, I'm hoping the N forums will.
00:31
<@Derakon>
But the guides they provide are strictly one-on-one.
00:31
<@Vornicus>
Something, to me, just feels wrong about making each individual tile be a polygon in its own right.
00:31
<@Derakon>
Heh.
00:32
<@Derakon>
I may well combine features together to make macro-tiles, so to speak.
00:32
<@Derakon>
But any deformable terrain must be dealt with in this way.
00:33
<@Vornicus>
In terms of collisions, anyway - is there possibly a way to ignore an edge that is completely occulted?
00:33
<@Derakon>
Only idea I've come up with so far is to have C not actually react to any collision detection until it knows everything it's run into. Then it tries all the different possible reactions until it finds one that is minimal (i.e. after taking it, all other collisions do not occur).
00:33
<@Derakon>
How do I tell that it is occluded?
00:34
<@Derakon>
I could have non-closed polygons, but then I cannot deform the terrain and my calculations of normals is screwed up and I cannot use some tiles as terrain edges without defining multiple polygons for them.
00:34
<@Vornicus>
um, using something like POV-Ray's "merge", possibly.
00:34
<@Derakon>
I'd have to build logic for "composite" polygons into the engine.
00:35
<@Vornicus>
though - why is terrain deformable, anyway?
00:35
<@Derakon>
Because this is Metroid with melee combat?
00:35
<@Derakon>
"Deformable" means "destructible".
00:35
<@Derakon>
I.e. "this block looks suspicious; I'll wail on it a bit to see if it gives".
00:35
<@Vornicus>
...why did I forget that that happened?
00:35
<@Derakon>
Heh.
00:36
<@Vornicus>
I was thinking the miner bot from Kirby's Adventure, or the crawler from Super Metroid, and that's it.
00:36
<@Derakon>
Crawler? You mean the thing guarding the spring ball?
00:37
<@Vornicus>
the one that chomps terrain that you can't.
00:37
<@Derakon>
Yeah, that one.
00:37
<@Derakon>
Looks like two spiked wheels connected by legs.
00:37
<@Vornicus>
exactly
00:50
<@Derakon>
I note that it is evidently possible to code up any terrain in Super Metroid as being "destroy when a critter touches it".
00:51
<@Derakon>
Based on some of the mods I've seen.
00:56
<@Vornicus>
If your dude is small enough, you can just merge the nearby polygons to get a more sane poly.
00:57
<@Derakon>
Determining which polygons are (a) close and (b) viable for merging would require much nastiness.
00:57
<@Derakon>
Since the collision detection is in the engine, and the logic is in the Lua.
00:57
<@Vornicus>
Not really. You're using a tile based system, right?
00:57
<@Derakon>
Nope.
00:57
<@Vornicus>
...sigh.
00:57
<@Derakon>
The engine does things by a quadtree.
00:57 * Derakon pats Vorn.
02:04 Derakon is now known as Derakon[AFK]
02:25 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
03:23 Mahal is now known as Mahal|CHORES
03:29 TuxRug [~lm_lappy@Nightstar-23846.clsp.qwest.net] has joined #Code
03:30
< TuxRug>
Hello, I need some help with Javascript running in MSHTA.
03:31
<@Vornicus>
What's "MSHTA"?
03:31
< TuxRug>
The code has a java applet in it, but if I leave the applet running and close the HTA, mshta keeps running with 99% CPU while throwing errors from Java
03:31 Derakon[AFK] is now known as Derakon
03:32
< TuxRug>
mshta.exe is built into windows. It runs HTML code as an application, outside a browser window.
03:32
<@Vornicus>
ah, that thing.
03:32
< TuxRug>
I've figured out that it's the applet, is there a way to make it unload if someone tries to close the window?
03:33
<@Vornicus>
There should be an event on the applet that says "I'm closing"
03:34
< TuxRug>
because when I close the window, the applet throws an error and then mshta stays in memory hogging the CPU
03:35
<@Vornicus>
RIght, I got that much.
03:36
<@Vornicus>
Did you define an event for the applet closing, inside the applet?
03:36
< TuxRug>
it's someone elses applet
03:36
< TuxRug>
and the code works fine in firefox and IE7. It just does this in MSHTA
03:37
< TuxRug>
here's my code: http://pastie.caboo.se/67141
03:39 * Derakon åø´¨Ýß­¦µ…æ¾¼¥©ç®¬÷«´½¨ÁÏÎÓÇÒÍ¿±»
03:39
<@Derakon>
Er, whoops. Don't mind me.
03:39
< TuxRug>
$$$?
03:39
<@Derakon>
I'm trying to find the theta key on my keyboard. ¬.¬
03:40
<@Derakon>
Screw it. I'll use delta.
03:40
< TuxRug>
?
03:40
< TuxRug>
copy and paste that ? and it should come up theta
03:41
<@Derakon>
Not in this client, which I really should replace.
03:41
< TuxRug>
it comes up ? on my screen in my client but if i copy and paste it...
03:41
<@ToxicFrog>
Question mark here.
03:41
< TuxRug>
oh never mind it's notworking here either...
03:41
< TuxRug>
oops
03:41
<@ToxicFrog>
What character set are you using?
03:42
<@Derakon>
I don't know, TF, but I do know that it's had charset problems in the past.
03:42
< TuxRug>
what os?
03:42
<@ToxicFrog>
I was asking TuxRug, actually.
03:42 * ToxicFrog is using UTF-8
03:42
< TuxRug>
oh me? dunno here either
03:42
<@ToxicFrog>
?
03:43
< TuxRug>
i saw the accented a, trademark, and superscript a
03:43
< TuxRug>
and euro works
03:43
<@ToxicFrog>
It's impressive that ? turned into three characters for you, since it's only two bytes
03:44
< TuxRug>
lol really?
03:44
<@ToxicFrog>
And ? isn't euro for me, it's 0x0080. Euro is EUR.
03:44
<@Derakon>
Heh. This client sees accented a, single-tick, and superscript a.
03:44
<@ToxicFrog>
It's 0x266A, eighth-note.
03:44
<@Derakon>
Yeah, guess this old thing's doing ASCII on me.
03:44
< TuxRug>
came up as ^a, (tm), a
03:45
<@ToxicFrog>
Yeah, whatever you're using it isn't UTF-8.
03:45
< TuxRug>
so any idea how to kill an applet before an hta app exits?
03:46
<@ToxicFrog>
Not one, sorry.
03:46
<@Vornicus>
Um
03:46
<@Vornicus>
eighth note is 3 bytes.
03:47
<@ToxicFrog>
...xchat's character chart lists it as two, and accepts raw entry of 26 6A as being eighth-note.
03:48
<@Vornicus>
0010 0110 0110 1010 -> 0010 011001 101010 -> 11100010 10011001 10101010
03:48
<@ToxicFrog>
...how does that work?
03:49
<@Vornicus>
...UTF-8?
03:49
<@ToxicFrog>
Assume for the moment I know little about UTF-8 except that it's a widechar format that is backwards compatible with ASCII.
03:49
<@Vornicus>
okay.
03:49
<@Vornicus>
UTF-8 is a variable-width encoding.
03:49
<@Vornicus>
ASCII - anything up to 7 bits wide - is represented as is.
03:50
<@Derakon>
Anyone have a handy link for deriving the angles of an SSS triangle? ¬.¬
03:50
<@Vornicus>
Law Of Sines!
03:50
< TuxRug>
that's only useful if you know one of the angles, Vornicus
03:50
< TuxRug>
look up law of Cosines
03:50
<@Derakon>
Hmm...actually, come to think, this is an SS triangle. ¬.¬
03:51
<@Vornicus>
http://mathworld.wolfram.com/LawofSines.html
03:51
<@Derakon>
http://66.235.60.44/~chriswei/temp/circle1.png
03:51
<@Derakon>
r is known; d / 2 is desired to be known.
03:51
<@Derakon>
Oh, and p is known.
03:51
< TuxRug>
http://mathworld.wolfram.com/LawofCosines.html <- use this one Derakon
03:52
<@Vornicus>
Anyway, TF: then to 11 bits, it goes 110abcde 10ghijkl
03:52
<@Vornicus>
and then to 16 bits: 1110abcd 10efghij 10klmnop
03:52 TuxRug [~lm_lappy@Nightstar-23846.clsp.qwest.net] has left #Code []
03:52
<@Vornicus>
and it continues in this way.
03:52
<@ToxicFrog>
Aah.
03:53
<@Vornicus>
Advantages are that it's compatible with ASCII (unlike UTF-16), that it's not modey (unlike JIS), and that it's pretty easy to detect for.
03:55
<@Vornicus>
The main disadvantages are that if you're working in a single character group, it's likely to be larger than the same in UTF-16, and you have to actually traverse it to see how long it is.
03:56
<@ToxicFrog>
Now it makes sense. thankey.
03:57
<@Derakon>
Could someone please check my work? http://metanet.2.forumer.com/index.php?showtopic=17590&st=0&#entry353344
03:57
<@Derakon>
Man, I feel like I'm in high school.
03:57
<@Vornicus>
In your case, Der: d/2 = sqrt(r^2 - p^2) or r*cos(u) or r*sin(?/2)
03:57
<@Derakon>
...d'oh.
03:58
<@Derakon>
Pythagoras. Why didn't I think of that before?
03:58
<@Vornicus>
Because it's /way too freaking obvious/
04:00 * Derakon is ashamed of his failure to grasp the obvious, then.
04:00
<@Derakon>
...dude. The N forums translate "sqrt" into a square-root symbol.
04:00
<@Vornicus>
Also, theta is not on the OSX US keyboard.
04:00
<@Derakon>
So I discovered. I used and µ instead.
04:01
<@Derakon>
Not traditionally symbols for angles, but they'll survive.
04:04
<@Vornicus>
Usually I just use the character palette when I need that kind of madness.
04:05
<@Vornicus>
(also, what you really should have done, and this would have made it obvious - actually mark the d-p angle as right. then it would have just gone "oh duh", and that's that)
04:06
<@Derakon>
Yeah.
04:08 ReivZzz is now known as Reiver
04:38 Vornicus is now known as Vornicus-Latens
04:45
< MyCatVerbs>
Nightstar services are hungry. Waffles...
05:13 Mahal|CHORES is now known as Mahal
05:44 Reiver is now known as ReivOut
05:58 KBot [~karma.bot@Nightstar-29692.neoplus.adsl.tpnet.pl] has joined #Code
05:58 AnnoDomini [~farkoff@Nightstar-29190.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
05:59 KarmaBot [~karma.bot@Nightstar-29190.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
05:59 KBot is now known as KarmaBot
06:04 AnnoDomini [~farkoff@Nightstar-29692.neoplus.adsl.tpnet.pl] has joined #Code
06:04 mode/#code [+o AnnoDomini] by ChanServ
06:07
<@Derakon>
Hrm...I think I fixed my little collision problem. I have another one where two triangular tiles meet up, but I think I can handle that...
06:08
<@Derakon>
Well, maybe.
06:08
<@Derakon>
My solution for the first problem was the one I really wasn't looking for - I've added a second update cycle that runs after collision detection does, which allows sprites to sort through their "stored" collisions and decide which ones to deal with.
06:12 * Derakon ponders just not allowing two triangular tiles to be next to each other.
06:20
<@Derakon>
...oh, feck. Bug when saving my map destroyed it.
06:33 * Derakon shakes fist at Lua. "If you're going to complain about me giving a string to the pairs() function (when it is *clearly* a table), then don't complain when I try to format the same value as a string in a printf statement!"
06:44
<@Derakon>
...ah, that was a stupid mistake.
06:44
<@Derakon>
"local map = serializeMap(map)" is just asking for trouble.
06:50 MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has quit [Quit: Off for a day or two.]
07:11 You're now known as TheWatcher
07:18 Derakon is now known as Derakon[AFK]
07:36 ReivOut is now known as Reiver
09:10 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
09:10 mode/#code [+o gnolam] by ChanServ
09:27 GeekSoldier|drnk is now known as GeekSoldier
09:28 Forjadon [~Forjadon@Nightstar-1216.ue.woosh.co.nz] has joined #code
09:28 mode/#code [+o Forjadon] by ChanServ
11:02 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has quit [Quit: A fine is a tax for doing wrong. A tax is a fine for doing well]
11:15 Mahal is now known as MahalBedd
11:16 You're now known as TheWatcher[afk]
11:17 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has joined #code
11:50 Forjadon [~Forjadon@Nightstar-1216.ue.woosh.co.nz] has quit [Quit: Leaving]
13:14 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has left #code [Leaving]
13:19 Vornicus [~vorn@67.50.40.ns-3674] has joined #code
13:19 mode/#code [+o Vornicus] by ChanServ
14:13 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has quit [Quit: On the other hand, you have different fingers.]
14:15 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has joined #code
15:01 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has quit [Ping Timeout]
15:07 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has joined #code
15:19 You're now known as TheWatcher
15:25 Thaqui [~Thaqui@Nightstar-26109.jetstream.xtra.co.nz] has quit [Quit: Leaving]
16:31 Reiver is now known as ReivZzz
17:11 Derakon[AFK] is now known as Derakon
17:16 You're now known as TheWatcher[afk]
17:46 GeekSoldier [~Rob@Nightstar-4082.pools.arcor-ip.net] has left #Code []
18:37 You're now known as TheWatcher
18:42 GeekSoldier_ [~Rob@Nightstar-3682.pools.arcor-ip.net] has joined #code
18:43 GeekSoldier_ is now known as ghost
18:44 ghost is now known as GeekSoldier
19:53 AnnoDomini is now known as Yahir
21:06
<@TheWatcher>
Hm
21:06
<@TheWatcher>
Is there a way to pick a ranom file out a directory in bash?
21:07
<@TheWatcher>
*random
21:07
<@Derakon>
Assuming bash has arrays and an RNG, yes.
21:08
<@TheWatcher>
I may just perl it, for ease, really
21:08
<@Derakon>
Heh.
21:08
<@Derakon>
perl -e 'foreach(`ls`){chomp; push @l, $_} $i = rand $#l; print "$l[$i]\n";'
21:08
<@Derakon>
I think that should do it.
21:09
<@Derakon>
Might need a +1 on the argument to rand.
21:10
<@TheWatcher>
except that I'd use @l = glob("*.$ext")
21:14
<@Derakon>
Well, fine, then!
21:16
<@TheWatcher>
;)
21:20
<@Derakon>
Also, print $l[rand $#l] . "\n"; is more concise. ¬.¬
21:26 * TheWatcher notes that using ,"\n" is more efficient than using ."\n"
21:28
<@Derakon>
If efficiency were a concern, you probably wouldn't be using Perl.
21:28
<@Derakon>
But point taken, nonetheless.
21:43 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
21:52 Chalcedon [~Chalcedon@Nightstar-1216.ue.woosh.co.nz] has joined #code
21:52 mode/#code [+o Chalcedon] by ChanServ
22:37 Derakon is now known as Derakon[AFK]
22:38 MahalBedd is now known as Mahal
22:57 Mahal [~Mahal@Nightstar-12512.worldnet.co.nz] has quit [Quit: brb, reboot]
23:02 You're now known as TheWatcher[T-2]
23:04 Mahal [~Mahal@Nightstar-12512.worldnet.co.nz] has joined #Code
23:04 mode/#code [+o Mahal] by ChanServ
23:05 You're now known as TheWatcher[zZzZ]
23:16 GeekSoldier is now known as GeekSoldier|Sleep
23:24 TakyojiClone [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
23:26 Chalcedon is now known as ChalcyAFK
23:27 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
--- Log closed Sun Jun 03 00:00:54 2007
code logs -> 2007 -> Sat, 02 Jun 2007< code.20070601.log - code.20070603.log >