code logs -> 2009 -> Wed, 11 Mar 2009< code.20090310.log - code.20090312.log >
--- Log opened Wed Mar 11 00:00:07 2009
--- Day changed Wed Mar 11 2009
00:00
<@McMartin>
variables can match anything.
00:00
<@McMartin>
So, for the or_list, thing...
00:00
<@McMartin>
or_list [] = False
00:00
<@McMartin>
defines the base case for empty list.
00:00
<@McMartin>
then...
00:00
<@McMartin>
or_list (x:xs) = x || (or_list xs)
00:01 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (Ping timeout)]
00:01
<@McMartin>
Matches non-empty lists so that x is the head, and xs the tail. h:t being the list syntax.
00:13 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
00:14
< Reiv>
blarg
00:15
<@Derakon>
Hrm...well, while this qualifies as "progress", it's still clearly wrong: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen1.png
00:15
< Reiv>
Fut the whack?
00:17
<@McMartin>
Reiv: Last thing you saw?
00:18
< Reiv>
I'd made a statement I no longer recall precisely regarding how the strings were working
00:18
< Reiv>
... voice me?
00:19 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
00:19 mode/#code [+o Reiv] by Derakon
00:19
<@Reiv>
Then I stared at this: http://paste.ubuntu.com/129580/ but it didn't show so I reloaded.
00:20 * Reiv is going through it by hand to see how the heck he got /that/ type out of it.
00:20
<@Reiv>
One too many bools, AFAICT.
00:21 Moltare is now known as Molgorn
00:22
<@McMartin>
Let's try that again
00:23
<@McMartin>
What was the last thing you saw me say?
00:23
<@McMartin>
You disconnected mid-rant.
00:23
<@McMartin>
Oh. As per the past?
00:23
<@McMartin>
Argument transposition problem.
00:26
<@McMartin>
It's foldr (||) False x
00:26
<@McMartin>
Not False (||) x
00:27
<@Reiv>
Oh! ... how did I mess that up?
00:27 * Reiv goes to re-eye the links provided.
00:29
<@Derakon>
Hrm...given a line starting point p1 and ending point p2, I want to get points every 50 pixels along that line. I get the slope m easily enough; the question is what dx and dy are to move 50 along the line. sqrt(dx^2+dy^2) = 50, and m = y / x, so 50^2 = y^2 + y^2/m^2, right?
00:29
<@Derakon>
Er, replace 'y' and 'x' with 'dy' and 'dx' at the end there.
00:30
<@McMartin>
Reiv: If you're using GHCi, you can say ":t fn_name" and it will give you the type signature for fn_name.
00:30
<@Reiv>
HUGS, but same general syntax, yeah
00:30
<@Reiv>
I just clicked; I was doing a Stupid. ;)
00:32
<@Reiv>
It's <operation> <starting> <list>, not <starting> <operation> <list>.
00:32
<@Derakon>
Does my math look reasonable?
00:33
<@McMartin>
Make sure dx isn't zero
00:33
<@Derakon>
Oh yeah. :\
00:34
<@McMartin>
You'll also have multiple solutions because signs are erased by the squaring.
00:34
<@McMartin>
You'll need to fix that too.
00:35
<@Derakon>
Argle bargle fargle. I remember dealing with all this crap in Niobium's polygon collision detection and it was a pain then too. >.<
00:36
<@Derakon>
Wait...basically I'm just trying to express the slope as a vector, right?
00:36
<@Derakon>
So normalize <1, slope> and then multiply by 50.
00:38
<@Derakon>
magnitude = sqrt(1+slope**2); dx = 50 / magnitude; dy = 50 * slope / magnitude.
00:39
<@Derakon>
That runs into problems with near-horizontal lines, of course.
00:43
<@McMartin>
Jaggies?
00:43
<@McMartin>
Yeah, that's the bane of pixelation.
00:43
<@McMartin>
Use a floating point universe, or write your own line-drawing routines and replicate them for specific distances.
00:44
<@Derakon>
Er, this isn't for drawing lines.
00:44
<@Derakon>
This is for removing blocks that are too close to the lines that define the centers of tunnels.
00:44
<@McMartin>
Oh.
00:44
<@McMartin>
Yeah, floating point universe, then.
00:44
<@Derakon>
Basically I start with a "full" universe, then I slap down a tree on that universe, then I delete blocks that are too close to the tree.
00:45
<@Reiv>
This for your spaceship game?
00:45
<@Derakon>
Right now, I'm debugging the "delete blocks that are too close to the tree" logic.
00:45
<@Derakon>
This is for Jetblade RL.
00:45 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
00:45 mode/#code [+o Vornicus] by ChanServ
00:45
<@Derakon>
See also http://derakon.livejournal.com/323578.html
00:45
<@Reiv>
Jetblade?
00:45
<@Derakon>
And then my more recent post for design thoughts on Jetblade RL.
00:46
<@Derakon>
Jetblade is my planned Metroid/Castlevania-style game.
00:46
<@Derakon>
But it's way too ambitious for me now.
00:46
<@Reiv>
Hm. Cliff notes version? I'm trying to remember which is you refer to.
00:46
<@Derakon>
Jetblade RL is intended to get my feet wet while still making something I think I could sell.
00:46
<@Reiv>
Aaah.
00:46
<@Reiv>
And Fullisade?
00:47
<@Derakon>
Fusillade is still going.
00:47
<@Derakon>
But it's stalled out a bit right now while I try to figure out what to do with the frickin' sounds.
00:47
<@Derakon>
Instead of moping around being unproductive, I'm getting something useful done.
00:47
<@Reiv>
Ah, ok.
00:47
<@Derakon>
The post I linked to is "Once Fusillade is in the can, what do I work on next?"
00:48
<@Reiv>
Remind me: The sparks are not actually 3D, but a sprite, yes?
00:48
<@Derakon>
They're all sprites, yes.
00:48
<@Derakon>
Everything except the text is a sprite.
00:48
<@Reiv>
OK.
00:49
<@Reiv>
Well, I would suggest, if you want a minor side project, coming up with a suitably Pretty sprite, perhaps.
00:49 * Vornicus has a paper to write for programming class.
00:49
<@Reiv>
The green ones are okay, but something with a little more sparkle to it might be appropriate. ;)
00:49
<@Reiv>
Vorn: On?
00:49
<@Vornicus>
Systems Hungarian
00:49
<@Reiv>
... which is?
00:50
<@Reiv>
I hope it's not, y'know, Hungarian Systems~
00:51
<@ToxicFrog>
A (horrible) convenention for naming variables.
00:51
<@ToxicFrog>
You give each variable name a prefix that encodes its type.
00:51
<@Vornicus>
I got into an argument about them in class.
00:51
<@Reiv>
So... int_i instead of i?
00:51
<@Vornicus>
I declared them a Thou Shalt Not.
00:52
<@Derakon>
Generally I find it better to use meaningful variable names, like shouldDisplayFPS or configNameToValueMap.
00:52
<@ToxicFrog>
Eg, ulNumberOfPlayers (unsigned long), au8DistanceList (array of uint8_ts)
00:52
<@Reiv>
They told you to write a paper to explain your reasoning, mostly as a "If I make you write enough papers, you'll learn not to argue with the teacher" tactic? :p
00:52
<@ToxicFrog>
It's a bastardization of Apps Hungarian, in which the prefix encodes the variable's purpose or semantic (as opposed to language) type
00:53
<@ToxicFrog>
Eg, rcCursorPos for a row/column pair, usUserInput for an unsafe string.
00:54
<@ToxicFrog>
And is generally what people mean by "hungarian notation" these days, especially if they shudder, twitch uncontrollably, or vomit when saying it.
00:55
<@ToxicFrog>
See also "hungarian notation" under http://freeworld.thc.org/root/phun/unmaintain.html
00:57
<@ToxicFrog>
"Insist on carrying outright orthogonal information in your Hungarian warts. Consider this real world example "a_crszkvc30LastNameCol". It took a team of maintenance engineers nearly 3 days to figure out that this whopper variable name described a const, reference, function argument that was holding information from a database column of type Varchar[30] named "LastName" which was part of the table's primary key. When properly combined with
00:57
<@ToxicFrog>
the principle that "all variables should be public" this technique has the power to render thousands of lines of source code obsolete instantly!"
00:57
<@Derakon>
Haha! Ahh ha ha ha! http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen2.png
00:57
<@ToxicFrog>
See also also, the w32api
00:57
<@Vornicus>
All this said there /is/ a reasonable use for systems-like hungarian in the course: it's used for naming widgets that are not declared in source.
00:58
<@ToxicFrog>
Vornicus: such as?
00:58 * Derakon then makes one change to a constant and makes http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen3.png
00:58
<@Derakon>
So...still some work to be done. :)
01:01
<@Reiv>
TF: If the hungarian notation followed a stricter set of syntax guidelines, it would be more maintainable, no?
01:01
<@Derakon>
This looks almost interesting: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen4.png
01:02
<@ToxicFrog>
Reiv: ha ha ha ha ha ha ha ha ha ha ha ha
01:02
<@McMartin>
The problem with systems hungarian is this.
01:02
<@ToxicFrog>
I cite the w32api, which uses systems hungarian.
01:02
<@McMartin>
Say you have a sixteen-bit variable.
01:02
<@ToxicFrog>
With the move to 32 bit systems, a lot of word (16 bits) variables became long (32 bits).
01:02
<@McMartin>
Say a decade passes and you need to update the API so that you are now using 32-bit variables.
01:02
<@McMartin>
every single function call must now be rewritten.
01:03
<@ToxicFrog>
But they still have the w prefix, because updating this to be l breaks every piece of software written for windows ever next time you try to compile it.
01:03
<@McMartin>
Alternately, you don't do this, and now the annotations are the types they were 10 years ago.
01:03 AnnoDomini [~farkoff@Nightstar-29625.neoplus.adsl.tpnet.pl] has quit [Quit: I am Yulaw! I am nobody's bitch! You - are mine.]
01:03
<@ToxicFrog>
Now, with the move to 64-bit, the variables still claim to be 16 bits wide and are in fact four times that size.
01:03
<@McMartin>
Basically, the only acceptable prefixes are g, p, t, and pfn.
01:04
<@McMartin>
And t is an iffy one, plausibly Win32-specific.
01:04
<@ToxicFrog>
And it's useless information anyways; knowing that it's a window handle is useful, but knowing that window handles are unsigned ints internally? Less so.
01:04
<@ToxicFrog>
p and pfn are pointer and func pointer, yes? What are g and t?
01:04
<@McMartin>
Oh, also m
01:04
<@Vornicus>
TF: for instance: cmbBlarg for a combo box.
01:04
<@McMartin>
g = global, m = member
01:04
<@ToxicFrog>
Vornicus: yeah, that's closer to apps hungarian, IMO
01:04
<@McMartin>
t is the marker in Win32 for "character/string of whatever width this happens to be linked for".
01:05
<@McMartin>
AKA "wx can actually compile, wtf"
01:05
<@ToxicFrog>
Although I prefer to make it obvious in the name; win.MainWindow is probably going to be a GtkWindow, and win.SpellList is obviously a linear container of some kind.
01:05
<@ToxicFrog>
Aah.
01:05
<@McMartin>
Somewhat less important these days, unless you're doing the Win32 equivalent of man 2.
01:05
<@Reiv>
"If anyone even hints at breaking the tradition honoured since F?RTRAN of using i, j, and k for indexing variables, namely replacing them with ii, jj and kk, warn them about what the Spanish Inquisition did to heretics." - ... there's something wrong with using i as a variable? First time anyone told me that. >_>
01:06
<@Vornicus>
i can sometimes be confused with IMAGINARY_UNIT
01:06 * Derakon ponders how to go about detecting collisions in "fat" tree arms.
01:07
<@Derakon>
I suppose the simple approach would be "Hey, dumbass! You tried to remove a block that already doesn't exist!"
01:08
<@Reiv>
We were taught when doing GUIs to follow a vaugely hungarian notation - but I also think we put things on the /end/; I'd have to check.
01:16
<@ToxicFrog>
GUI development is ;.; regardless, really
01:16 * gnolam shudders, twitches uncontrollably and vomits.
01:17
<@gnolam>
In general, I prefer to try to write my code /in Hungarian/ than actually using (systems) Hungarian notation. :P
01:18
<@gnolam>
(Source uses one of those two. Guess which one? Hint: the code is 100% umlaut free.)
01:19
<@Derakon>
Hrm. The "hey dumbass" approach has issues dealing with branching points in the tree. I need something less hacky.
01:20 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
01:21 Finale [c0cb88fd@Nightstar-14595.mibbit.com] has left #code []
01:24
<@Derakon>
The problem with recursive data structures is writing algorithms that require knowledge of the entire structure at once. :\
01:37
<@McMartin>
It's entirely reasonable to name everything LevelCombo or LevelLabel or PlayerNameEdit.
01:37
<@McMartin>
That's close to Hungarian.
01:50
<@ToxicFrog>
Woot!
01:50
<@ToxicFrog>
Symbol table construction is working!
01:50
<@Derakon>
Cool!
01:50
<@Derakon>
I think I have non-intersection working, myself!
01:51
<@ToxicFrog>
Easier than anticipated once I actually sat down and worked out what a symrec should look like.
01:51
<@McMartin>
... what are you writing, again?
01:51
<@ToxicFrog>
Now I just need the actual type checker.
01:51
<@ToxicFrog>
He's writing a random platformer level generator, I'm writing a C- compiler
01:52
<@ToxicFrog>
Anyways, type checking should be pretty easy; add visit handlers for call and var AST nodes, and when it hits them, look them up in the symbol table stack and compare types, dimensions and signatures.
01:52
<@ToxicFrog>
But that can wait until tomorrow, because now it is fettucine primavera time.
01:56
<@Derakon>
Okay, my closeness check broke down a bit, but wow this actually looks like something worth exploring! http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen6.png
01:58
<@Vornicus>
C-?
02:01
<@Vornicus>
Der: why is it that every image you show is awesome?
02:02 * Derakon bows.
02:02
<@Derakon>
Mind you, as it stands these path segments are far, far too short. There's no room to insert jumping puzzles and the like.
02:02
<@Derakon>
Also, they're all straight~
02:03
<@Derakon>
Have another~ http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen7.png
02:04
<@Vornicus>
Shiny some more!
02:04
<@Vornicus>
WHat's it look like with more segments?
02:05
<@Derakon>
It looks like I run out of room on the map. I can shorten them, though; a moment.
02:06
<@Derakon>
I also reduced the block size to 20x20 (from 50x50): http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen8.png
02:06
<@Derakon>
Note the minor issue of crossing lines~
02:07
<@Vornicus>
That's so fly I don't think I /care/
02:07
<@McMartin>
This looks more like Metroid than Spelunky
02:07
<@Derakon>
That is my goal.
02:08
<@Derakon>
Spelunky is inspiration only insofar as "randomized platforming levels" is concerned. And, to be fair, I had this idea before Spelunky came out.
02:08
<@McMartin>
And, um, what's wrong with lines crossing?
02:08
<@McMartin>
You get loops. Isn't that *good*?
02:08
<@Derakon>
Only if it doesn't give the player access to a location they shouldn't be able to reach yet.
02:09
<@McMartin>
Oho.
02:10 * Derakon digs through his temp2 directory looking for evidence of his prior attempt at this concept using Niobium.
02:14 * Derakon finds it not. Oh, well.
02:15
<@Reiv>
Derakon: Why is a crossing line bad? Do the lines do something fundamental other than clear out space?
02:16
<@Reiv>
Also: This stuff is randomly generated, or?
02:16
<@Derakon>
Reiv: the idea is that branching points in the tree represent locked doors; endpoints of the tree represent places where you can get keys to open said locked doors.
02:16
<@Derakon>
If there's a crossing point, or if one line simply comes too close to another such that they open space between them, then the door locks break down.
02:16
<@Derakon>
And yes, this is all randomly generated.
02:17
<@Reiv>
Oh. I personally think the layout is pretty darn shiny anyhow.
02:17
<@Derakon>
(And instead of keys, you get abilities, and instead of locked doors, you have barriers that can be surpassed by those abilities)
02:17
<@Derakon>
Thanks.
02:18
<@Reiv>
And just FWIW, loops are indeed good.
02:18
<@Reiv>
If nothing else, they may provide a shortcut, or quick route back home, once you have a certain tech
02:18
<@Reiv>
Having to retrace your steps /every/ time gets tiresome afterall~
02:18
<@Derakon>
Loops are good only if intentional.
02:18
<@Derakon>
And I plan to add such intentional loops later.
02:19
<@Derakon>
If an unintentional loop gives you early access to the "I win" artifact, well, that's no good.
02:19
<@Reiv>
Ah.
02:19
<@Derakon>
(Especially if it lets you bypass the final boss~)
02:20
<@Reiv>
You'll be unable to check manually? Or is this going to be randomly generated levels?
02:20
<@McMartin>
Fedora 11 Alpha: Boots and runs inside VMware.
02:20
<@Derakon>
Randomly-generated.
02:20
<@Reiv>
With the odd pregen room attached, etc
02:20
<@Reiv>
Awesome.
02:20
<@Derakon>
The goal is to get an infinitely-replayable Metroid-style experience.
02:20
<@Reiv>
Idly, McM! I has a question you can answer far faster than I can look it up.
02:20
<@McMartin>
Shoot
02:20
<@McMartin>
Derakon: ... you know what would be madness?
02:21
<@Reiv>
UQM planets: Are their appearances generated through code, or is there some bigass texture folder somewhere?
02:21
<@McMartin>
Autogenerating data files that Knytt Stories could eat
02:21
<@McMartin>
Reiv: Earth is a texture. All others are made via one of three fractal algorithms, and then hit by some number of meteors, and then eroded by some amount.
02:22 * Derakon eyes McM.
02:22
<@Reiv>
Oooh.
02:22
<@Derakon>
Yes, that would be madness.
02:23
<@McMartin>
Saves you requiring art assets~
02:23 * Reiv was vaugely pondering his 4X game, and had wanted it to have randomly generated planet textures. Suddenly remembered that UQM boasted 'fractal planet designs', and so wondered if its techniques were in-code.
02:23
<@Derakon>
Also prevents me from making any money~
02:23
<@McMartin>
Also true, I suppose~
02:25
<@Reiv>
(And I'd always liked the UQM textures, though quite a few of them ended up 'large stain on planet'.)
02:25
<@Reiv>
But yeah, would save a buttload of texture creation for pure eyecandy. I approve of this idea~
02:28
<@Reiv>
... idly. Haskell question I am toying with.
02:29
<@Reiv>
Is there a straightforward way to specify that a list is a certain number of items long? Say, a list of strings, n strings long?
02:31 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
02:33 * Derakon tries implementing line segment intersection tests, gets this: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen9.png
02:34
<@Reiv>
... a bit small.
02:34
<@Derakon>
You might say that, yes.
02:34
<@Reiv>
Excelent for a bossfight, though
02:34
<@Reiv>
Especially if the boss has some area effect weapon, preferably a burst from his body~
02:34 * Reiv runs.
02:35 * Derakon facepalms.
02:38
<@Reiv>
Will you have randomly generated rooms too, or will there be a number of 'set peice' enviroments?
02:38
<@Derakon>
Hrm...ideally I'd be doing the tree-generation breadth-first instead of depth-first, and doing pruning as I go.
02:39
<@Derakon>
Both, probably.
02:39
<@Reiv>
Cool.
02:39
<@Derakon>
I have a few plans for various kinds of jumping puzzles, for example.
02:39
<@Derakon>
Bosses will probably require set-pieces, though.
02:39
<@Reiv>
(Bonus points if the 'set peice' enviroments are also randomly generated, but using certain pattern restraints, so its variable but still recognisable.)
02:40
<@Derakon>
(That was the plan, yes)
02:40
<@Derakon>
Anyway, I'm talking about breadth-first because of this: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen10.png
02:40
<@Reiv>
So there's a boss fight with a lava floor, and lots of platforms to leap between, but other than some constraints to ensure they're jumpable between and not too hindering... they're still randomly placed.
02:41
<@Derakon>
Right in the middle is the start of the tree, where it splits off in three 120° directions...and two immediately terminate.
02:41
<@Reiv>
... you know, in some ways that layout actually looks really cool.
03:00
<@Reiv>
Stupid basic syntax errors
03:00
<@Reiv>
Haskell: I have a list [1..n] and I want to iterate through it with a [n:ns] loop thingy. Syntax for this would be?
03:09 * Derakon mutters at his line collision checks.
03:09 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (EOF)]
03:09
<@Derakon>
That line intersects one that's higher than it in the tree! No excuse for that!
03:20
<@Derakon>
Okay, my pruning algorithm is just generally buggy: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen11.png
03:20
<@Derakon>
Blue lines would have been created if the pruning algo hadn't said there was something in the way.
03:20
<@Derakon>
Also note the loop. :\
03:28
<@Derakon>
Hrm. I'm using http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ for line segment intersection tests.
03:28
<@Derakon>
But it's saying that (1800, 1300) to (2202, 1398) intersects with (1672, 858) to (1924, 459).
03:28
<@Vornicus>
Sure you're putting them in in the right order?
03:28
<@Derakon>
I just double-checked that.
03:29
<@Derakon>
...oh, wait, no.
03:29
<@Vornicus>
Apply unit tests liberally.
03:29
<@Derakon>
I had P1 and P2 reversed...actually, that shouldn't matter.
03:30
<@Vornicus>
Make a few dozen trivial ones and see what happens.
03:37
<@Derakon>
Hrm...I refactored a bit, and now it's not happening any more. O_o
03:38
<@Vornicus>
TEST TEST TEST
03:38
<@Derakon>
I know.
03:38
<@Derakon>
In the meantime, though, check this out: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen12.png
03:39
<@Vornicus>
Yay depth
03:39
<@Derakon>
(Lines get pruned if they're too close to the borders, too)
03:39
<@Derakon>
Depth?
03:39
<@Derakon>
You mean depth of testing?
03:39
<@Vornicus>
well, depth of somethjing.
03:40
<@Derakon>
Hrm. Closeness algo still needs some work, I see.
04:08
<@Derakon>
Argle bargle fargle.
04:08 * Derakon is trying to get consistent results by seeding the RNG.
04:09
<@Derakon>
And while I am getting consistent results by calling random.seed(foo), if I da "seed = int(time.time()); print "Seed is",seed; random.seed(seed)" then try to re-use that seed, I get different results.
04:11
<@ToxicFrog>
o.O
04:13
<@Derakon>
Here's my init function: http://paste.ubuntu.com/129631/
04:13
<@Derakon>
(And yes, I'm aware that line 8 isn't safe)
04:15
<@ToxicFrog>
Huh
04:15
<@ToxicFrog>
It coerces appropriately?
04:15
<@ToxicFrog>
That is to say, random.seed(1) and random.seed("1") are equivalent?
04:15
<@Derakon>
...possibly not!
04:16
<@Derakon>
It uses hash(seed) if seed is not an int or long.
04:16
<@ToxicFrog>
I would bet money that sys.argv has type List String or similar.
04:16
<@Derakon>
That's got it!
04:16
<@Derakon>
Thanks.
04:16
<@Derakon>
Now I can reproduce maps~
04:20
<@Derakon>
...oh, I see what's happening here.
04:21
<@Derakon>
Line A is created out in the middle of space. Later, line B is created. It passes close to the endpoint of A, but its own endpoint is far away.
04:21
<@Derakon>
In other words, the order of creation of lines is breaking my shortcut.
04:24
<@Derakon>
Yeah, there we go.
04:26
<@Derakon>
http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen13.png
04:31
<@ToxicFrog>
I'd explore it.
04:31
<@ToxicFrog>
What is JBRL, Jetblade Roguelike?
04:31
<@Derakon>
Yeah.
04:31
<@ToxicFrog>
Sw33t.
04:32 * Derakon tries to figure out the proper way to map adjacencies to block shapes.
04:32
<@Derakon>
I have five right now: a square and four 45-45-90 triangles.
04:33
<@Derakon>
I'd rather not have a huge mess of "If your neighbors are THIS configuration or THIS configuration, use THIS shape" x5.
04:35
<@Derakon>
Seems like I should be able to have some kind of 3x3 kernel or something...
05:02
<@Derakon>
Now isn't that pretty? http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen14.png
05:05 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
05:06
< Rhamphoryncus>
Derakon: you should make your own Random() instance rather than call random.seed()
05:06
<@Derakon>
Whyso, Rhamph?
05:06
< Rhamphoryncus>
No risk of a random library messing with it
05:07
< Rhamphoryncus>
entirely isolated and under your control
05:07
<@Derakon>
Ahh, makes sense.
05:07
<@Derakon>
Though, if a random library I'm depending on does use it, I'd want them to consistently use it the same way, which might depend on me seeding the RNG properly.
05:07
< Rhamphoryncus>
You can even extend that by creating new instances for specific tasks, based on the main RNG's output. This lets you change things within that task without spilling over into other activities
05:08
<@McMartin>
Generally you wouldn't want this for replay purposes, though
05:08
<@Derakon>
At this point I just want the map to always be the same given a particular RNG.
05:08
<@Derakon>
Er, given a particular seed.
05:08
<@Derakon>
What happens after that can be random, no big deal.
05:08
< Rhamphoryncus>
yeah, for debugging it's debatable. The use of time as a seed is generally maligned for real use ;)
05:09
<@Derakon>
Really?
05:09
< Rhamphoryncus>
it's rather predictable
05:09
<@Derakon>
Isn't that what Random defaults to if you don't seed it yourself?
05:09
<@Derakon>
...oh, wait, it uses urandom if available.
05:09
< Rhamphoryncus>
not for a long time :)
05:09
< Rhamphoryncus>
yup
05:09
<@ToxicFrog>
Rhamphoryncus: for this kind of thing, it's not a big deal
05:09
<@ToxicFrog>
It's not like jbrl is doing crypto with it.
05:09
< Rhamphoryncus>
aye, I realize that
05:10
< Rhamphoryncus>
no crypto, no money
05:10
<@Derakon>
The only security-conscious code I write is for registration codes, and those are deterministic.
05:32
<@Derakon>
Ooh, this one looks fun. http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen14c.png
05:32
<@Derakon>
I shortened the path length considerably and increased the tree tallness.
05:43 * Derakon enforces maximal branching within 3 nodes of the root, gets this: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen14d.png
05:43
<@Derakon>
So, uh, whoah.
05:45
<@Derakon>
Yes, that little setting has a major impact on the map density.
05:45
<@ToxicFrog>
Cool.
05:45
<@ToxicFrog>
Although, a question...
05:45
<@ToxicFrog>
Don't these maps make more sense for a platformer than a roguelike?
05:46
<@Derakon>
JBRL will be a roguelike in a similar sense as Spelunky is.
05:46
<@ToxicFrog>
Aah.
05:46
<@ToxicFrog>
So, not much like a roguelike at all, then~
05:47
<@Derakon>
Depends on who you ask. :)
05:47
<@ToxicFrog>
The only thing it has in common with roguelikes is random world generation, AFAIK.
05:47
<@Derakon>
And that's not a common element of just about any other genre~
05:48
<@Derakon>
Anyway, today's been productive, so I'm happy.
05:49
<@Derakon>
About 300 lines of Python written, and I have crude but functional procedurally-generated maps!
05:50
<@ToxicFrog>
It's not, but on the other hand, it's a realtime graphical platformer, which is pretty damn far away from roguelike territory no matter how the world is generated.
05:51
<@ToxicFrog>
I mean, if we go by world generation, Soldier of Fortune 2 is a roguelike.
05:51
<@ToxicFrog>
As is Alpha Centauri.
05:51
<@Derakon>
Bah.
05:51
<@Derakon>
Not enough caverns.
05:55
<@Derakon>
Hrm...think the next thing I should probably do is hammer out the platforming code so I can run a stick figure around. That'll make map testing easier.
06:14 * Derakon implements map zooming.
06:14
<@Derakon>
Combine that with a "Have I seen this area" and mapping is basically done~
06:52 Derakon is now known as Derakon[AFK]
07:25 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Quit: ]
07:53 You're now known as TheWatcher
08:14 You're now known as TheWatcher[afk]
09:59 You're now known as TheWatcher
10:05
<@Reiver>
Small suggestion for later design: Be able to manually select the worldgen seed.
10:06
<@Reiver>
Or just hit 'new game' and have it random-generate for realz.
10:10 * TheWatcher readsup a bit
10:10
<@TheWatcher>
Another suggestion, based on something I've been looking into: have two levels of 'I've seen this area'
10:11
<@TheWatcher>
the first being "I have been in a location where I can potentially access that area, but either did not, or could not" and the second being "I have actually been in this area"
10:12
<@Reiver>
So a bit like Aquaria, where you had black (unseen), grey (seen, unvisited) and white (visited)?
10:12
<@TheWatcher>
Exactly
10:12
<@Reiver>
It was really rather clean, really.
10:12
<@TheWatcher>
A problem I have been running into with something that automaps is that, while it keeps good track of where you have been, it doesn't keep track of where you could have gone but didn't, so you have to keep constantly backtracking just in case you've forgotten a turn you could have taken but didn't
10:13 * TheWatcher also eyes this phpbb£ theme, ;.;s
10:13 * Reiver agrees. And Aquaria is a similar style platformer which had the same solution.
10:13
<@TheWatcher>
it could be just right, save that all the icons are unmitigated shite
10:14
<@TheWatcher>
(good lord, the selection of phpB3 themes is dire compared to phpBB2 ;.;)
10:14
<@Reiver>
TW: And the icons cannot be changed without Screaming Madness?
10:14
<@TheWatcher>
Oh, probably
10:14
<@TheWatcher>
I just don't really have /time/ to arse around with it much.
10:15
<@Reiver>
fair
10:15
<@TheWatcher>
Although today seems to be shaping up to be kinda quiet so far, so I might be able to do it in a bit
10:17 * TheWatcher fingertappity, wonders if he can cheat...
10:41 AnnoDomini [~farkoff@Nightstar-29625.neoplus.adsl.tpnet.pl] has joined #Code
10:41 mode/#code [+o AnnoDomini] by ChanServ
10:54 * TheWatcher vaguely stabs last.fm for not letting him ban entire artists, but not too hard considering that they're one of the last music services the british music cartel hasn't managed to overcharge into just blocking the whole UK
11:00 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
11:01 mode/#code [+o gnolam] by ChanServ
11:13
< Molgorn>
I found a way round the Youtube block, at least.
11:13
< Molgorn>
convertube.com is US-based, so you can yoink an mpg of the relevant video through them
11:44 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
13:36 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
13:36 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
13:48 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
13:49 mode/#code [+o Attilla] by ChanServ
14:51 You're now known as TheWatcher[afk]
15:04 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
15:05 Syloqs_AFH is now known as Syloqs-AFH
15:13 KBot [AnnoDomini@Nightstar-29498.neoplus.adsl.tpnet.pl] has joined #Code
15:13 AnnoDomini [~farkoff@Nightstar-29625.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
15:14 KarmaBot [AnnoDomini@Nightstar-29625.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
15:16 KBot is now known as KarmaBot
15:20 AnnoDomini [~farkoff@Nightstar-29498.neoplus.adsl.tpnet.pl] has joined #Code
15:20 mode/#code [+o AnnoDomini] by ChanServ
15:27 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
15:27 mode/#code [+o Vornicus] by ChanServ
15:54 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
16:11 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
16:11 mode/#code [+o ToxicFrog] by ChanServ
16:29 Derakon[AFK] is now known as Derakon
17:24 * Derakon eyes the profiling output for his map generation code.
17:24
<@Derakon>
I'm calling range() nearly five million times?
17:26
<@Derakon>
Actually what's taking the most time, though, is the 353k calls to determine what kind of block a given square of the map should be. And the vast majority of those should be "nothing", so I should be able to short-circuit that...
17:26 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: KarmaBot, @gnolam, @Consul
17:26 Netsplit over, joins: gnolam
17:26 mode/#code [+o gnolam] by ChanServ
17:27 * Derakon chops off 7 seconds of map generation time by adding two lines of code.
17:28
< Tarinaky>
Is one of those two lines /* ?
17:28
<@Derakon>
No, actually.
17:29
<@Derakon>
getBlockType() checks for open spaces around the given block to determine if it should be nothing, a square, or one of four triangles. I simply added a check so that if there are no open spaces nearby at all, it skips the kernel check and just returns nothing right off.
17:30 Consul [~consul@Nightstar-12789.dsl.sfldmi.ameritech.net] has joined #code
17:30 mode/#code [+o Consul] by ChanServ
17:31 NSGuest-3153 [AnnoDomini@Nightstar-29498.neoplus.adsl.tpnet.pl] has joined #Code
17:33 NSGuest-3153 is now known as KarmaBot
18:02
<@Derakon>
Okay, I'm gonna have to improve the efficiency of this algorithm.
18:02
<@Derakon>
http://paste.ubuntu.com/129857/
18:02 mode/#code [-o Derakon] by Derakon
18:02 mode/#code [+o Derakon] by ChanServ
18:02
<@Derakon>
http://paste.ubuntu.com/129857/
18:04
<@Derakon>
It appears to be the code in lines 32-40 that's taking most of the time.
18:06 * jerith is apparently too tired to grok that at the moment.
18:06
<@Derakon>
Given a square at (x, y), I need to check all 8 adjacent squares to see if they are occupied. This tells me what shape the square in question should be.
18:10
<@jerith>
Explain the algorithm to me?
18:10
<@Derakon>
The function only takes .015s per call, but it's called 350k times...
18:10
<@Derakon>
Jerith: okay, so the world is a grid.
18:10
<@Derakon>
Each square in the grid may be empty or occupied.
18:11
<@Derakon>
I only want to draw the occupied squares that are adjacent to open squares.
18:11 ilf_uni [~nsJChat@Nightstar-16340.vl212.georgiasouthern.edu] has joined #code
18:11
<@Derakon>
I could just draw every square as an actual square, but this makes for blocky maps, like this one: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen13.png
18:12
<@Derakon>
So the goal is to determine, based on which nearby squares are occupied, which of five shapes to use for that square.
18:12
<@Derakon>
adjacenciesMap maps adjacency descriptions to shapes.
18:13
<@Derakon>
For example, if the squares below, below and to the right, and to the right are occupied, but the ones above, above and to the left, and to the left are not, then I want to use a triangle whose hypotenuse is on the upper-left.
18:14
<@Derakon>
Like so: http://paste.ubuntu.com/129867/
18:15
<@Derakon>
Right now I'm calling this method for every single block in the map, which is a 720x520 grid.
18:15
<@jerith>
What are the possible values of the blocks?
18:16
<@Derakon>
0: denotes empty space
18:16
<@Derakon>
1: denotes occupied space (all blocks are initialized to 1)
18:16
<@Derakon>
Block instance: denotes a block we've already created
18:16
<@Derakon>
None: denotes a block we've declared to be surrounded by other blocks already.
18:17
<@jerith>
Hrm.
18:17 You're now known as TheWatcher
18:17
<@Derakon>
I suspect I'm most likely to make gains by reducing the number of calls I make to this function...the trick is figuring out how to do that....oooh, actually, I have an idea.
18:18
<@Derakon>
So my method for setting those 0/1 values is to plop a tree down over the map, and then remove blocks that are too close to the lines in the tree.
18:18
<@Derakon>
That takes me right up to the edge of the tunnels.
18:18
<@Derakon>
If I do one more set of iterations, I can say "These blocks are blocks you should check for type."
18:24
<@jerith>
Okay, I have some ideas about that code, but they're not very clear yet.
18:25
<@jerith>
I'm going to brush my teeth and stuff, then go to bed with the other laptop.
18:25
<@Derakon>
Heh. Okay.
18:25
<@jerith>
When I'm in bed, I'll hopefully have solidified things enough to offer suggestions. :-)
18:25
<@Derakon>
I'm getting ~2s map generation time, which is basically obviating the slowdown from this algorithm, with the change I made. Of course, I've also broken mapgen, but if I can get it working...
18:29
<@TheWatcher>
idly, Dera, did you see the suggestiosn from Reiv and I earlier?
18:33
<@Derakon>
Don't think so.
18:33
<@Derakon>
I was out asleep starting ~12h.
18:33
<@Derakon>
Er, ~12h ago.
18:35
<@Derakon>
Haha, that worked!
18:35
<@Derakon>
2.8s to make the same map that was taking 12s before!
18:36
<@jerith>
First, that code isn't very Pythonic. You're trying to write Java.
18:37
<@jerith>
(That doesnt mean it's bad code, though.)
18:37 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
18:37 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
18:37 mode/#code [+o Attilla] by ChanServ
18:38
<@jerith>
Rather than iterating over numbers and looking things up by index, you should use slices or listcomps or something.
18:39
<@jerith>
By giving your blocks array a border of 0s, you can eliminate the bounds checks.
18:39
<@Derakon>
Slices wouldn't work well with the edge of the array though, would they?
18:39
<@Derakon>
Mm.
18:39 * jerith fiddles in ipython.
18:40
<@Derakon>
(While we're on that, array initialization is taking .3s. What's the proper way to construct a large 2D array of 1s?)
18:41
<@TheWatcher>
10:05:42 <@Reiver> Small suggestion for later design: Be able to manually select the worldgen seed. 10:06:00 <@Reiver> Or just hit 'new game' and have it random-generate for realz.
18:41
<@TheWatcher>
and
18:41
<@Derakon>
Manual selection of seed is in; if no manual seed is provided, the program uses the current time as a seed.
18:41
<@TheWatcher>
10:10:41 <@TheWatcher> Another suggestion, based on something I've been looking into: have two levels of 'I've seen this area'. the first being "I have been in a location where I can potentially access that area, but either did not, or could not" and the second being "I have actually been in this area"
18:42
<@jerith>
Hrm, working with lists of lists like that is a pain.
18:42
<@jerith>
When you say "block instance", do you have an actual block object?
18:42
<@Derakon>
Yes.
18:43
<@Derakon>
TW: interesting, will keep that in mind.
18:43
<@jerith>
What kind of information does hat contain?
18:43 macdjord|class [~macdjord@Nightstar-9795.129-97-124-126.uwaterloo.ca] has joined #Code
18:44
<@Derakon>
At the moment, it's just position and draw type.
18:44
<@jerith>
Have you looked a numpy at all?
18:44
<@Derakon>
I anticipate that the type will get more complicated and some blocks may become animated as I add more detail.
18:44
<@Derakon>
My only context for numpy is in manipulating SDL surfaces at the pixel level.
18:46
<@Derakon>
In any event, now that mapgen is taking 2s instead of 12s, I feel like I can stop worrying about performance again for a while.
18:47
<@jerith>
numpy gives you proper arrays.
18:47
<@jerith>
Although I don't think you can shove arbitrary objects in them.
18:47
<@Derakon>
They have to be single-typed?
18:48 macdjord|class is now known as macdjord
18:48
<@jerith>
As far as I recall, yes.
18:49
<@jerith>
(That's one of the things that gives them so many advantages.)
18:54
<@Derakon>
Well, my map is sort of metamorphic as it stands.
18:55
<@Derakon>
I do a first pass where everything's a number, then I do a second pass where things are either 0 or Block instances or None.
18:55
<@Derakon>
If I didn't do the second pass in-place, I could just have the final map be Block instances and None and let the space beyond the walls be empty.
18:55
<@jerith>
Ah, you can define records (rather like C structs) and have arrays of those.
19:03 * ilf_uni needs java homework help. I'm trying to make a program that uses a method to print out a matrix (with each cell being a randomly generated 0 or 1) of a size as inputted by the user, stopping when teh user inputs a 0.
19:04
<@Derakon>
So it'd be something like this?
19:04
<@Derakon>
> 6
19:04
<@Derakon>
[1, 0, 0, 1, 0, 1]
19:04
<@Derakon>
> 2
19:04
<@Derakon>
[0, 0]
19:04
<@Derakon>
> 10
19:04
<@Derakon>
[1, 1, 0, 1, 0, 0, 0, 0, 1, 0]
19:04
<@Derakon>
> 0
19:04
<@Derakon>
Bye!
19:04
< ilf_uni>
err, no, something like this.
19:04
< ilf_uni>
> 2
19:04
< ilf_uni>
0 1
19:04
< ilf_uni>
1 0
19:04
< ilf_uni>
> 3
19:04
< ilf_uni>
0 0 1
19:04
< Molgorn>
Oh, NxN
19:04
< ilf_uni>
1 1 0
19:04
< ilf_uni>
yeah
19:05
<@Derakon>
Ahh, 2D square arrays
19:05
<@Derakon>
Okay, so 2D arrays are arrays of arrays; have you covered that before?
19:06
< ilf_uni>
.
19:06
< ilf_uni>
Err. That is, no, we haven't.
19:07
<@Derakon>
Okay, give me a moment to whip up a diagram.
19:08
< Molgorn>
My lecturer used a comb for a visual aid >_>
19:09
< ilf_uni>
I've actually almost got it, except for some reason that i can't tell instead of ending when it should, the loop I have set up to print out the lines keeps going.
19:11
<@Derakon>
http://derakon.dyndns.org/~chriswei/temp2/arrays.png
19:11
<@Derakon>
Basically, in a 1D array, you have a sequence of values.
19:11
<@Derakon>
In a 2D array, you have a sequence of arrays.
19:12
<@Derakon>
In a 1D array, when you index into the array (e.g. "foo[0]"), you retrieve the first element from the array, which is a value.
19:12
<@Derakon>
In a 2D array, when you index into the array (e.g. "bar[0]"), you retrieve the first element from the array, which is itself an array.
19:13
<@Derakon>
So in order to get an actual value out of the 2D array, you have to index into it "twice".
19:13
<@Derakon>
The first time you index into the 2D array and get a 1D array out.
19:13
<@Derakon>
The second time, you index into that 1D array and get a value out.
19:14
<@Derakon>
Does that make sense?
19:18
< ilf_uni>
Err... we haven't actually covered arrays yet, either, so... I mean, i've read ahead a bit so it kinda does but...
19:18
<@Derakon>
...let me get this straight: you've been tasked to write a program that prints arrays...before learning about arrays?
19:19
< ilf_uni>
Err. Well. Yes? here, let me get a paste of what I have so far...
19:19
< Molgorn>
You could do it without; have it iterate n times over a function that appends a 0 or 1 at random to a string, then have it iterate n times to printf that string
19:19
< ilf_uni>
yeah, that's what I've been doing.
19:20
< Molgorn>
It'd be purely output, though, wouldn't store the matrix as anything
19:20
<@Derakon>
Yeah, that's not really anywhere near as interesting though. :\
19:20
< ilf_uni>
... Well, kind've. I've been using print, then println when I need a new line... hmm, maybe I should be using printf instead...
19:20
<@Derakon>
Print and println are fine.
19:20
<@jerith>
ilf_uni: That works.
19:20
<@Derakon>
IMO you should only use printf when you need to format your text (e.g. with specific alignment or spacing).
19:21
<@jerith>
Basically, you need two loops: one for columns, one for rows.
19:21
< ilf_uni>
Right.
19:21
<@Derakon>
For (i in number of rows) { for (j in number of columns) { print 0 or 1} println }
19:21
<@jerith>
You're making a square, so you need the same number for each.
19:23
< ilf_uni>
Right.
19:23 * ilf_uni hmms a bit, looks at his... hmm.
19:23
< ilf_uni>
Ah, i see where it's infinite looping now. In my main method, not the printing method.
19:25
< ilf_uni>
(Also, may I get voice so I may give links?)
19:26 mode/#code [+o ilf_uni] by Derakon
19:26
<@ilf_uni>
thank you.
19:27
<@ilf_uni>
... Okay, i feel like an idiot now. I forgot to put soemthing in the while loop to let the user put in new input, so it was just looping with the first input over and over again.
19:27 * jerith grnis.
19:27
<@Derakon>
"God, I'm such an idiot" is the programmer's refrain.
19:27
<@Derakon>
Well, that and "Who the hell wrote this? ...oh, I did."
19:27
<@jerith>
ilf_uni: If you use a registered nick I'll add you to the access list in here.
19:28
<@ilf_uni>
jerith: this one isn't registered, but my normal nick (ilovefire) is. I normally only need code help while at uni, though, so... maybe I should register this nick.
19:29
<@jerith>
Services should let you link nicks.
19:29
<@jerith>
Unless I'm thinking of another network.
19:29
<@Derakon>
I remember being able to link nicks years back.
19:31
<@ilf_uni>
Oh, and after I print out the code to turn in, I realize my comments are a bit lacking in coherance and a bit overabunding with profanity. I should fix that before I turn it in.
19:32
<@Derakon>
Yes, you should.
19:32
<@Derakon>
Also, instead ANSI Standard "WTF you have to print it out".
19:36
<@Derakon>
s/instead/insert/
19:38
<@ilf_uni>
Yeah.
19:38
<@ilf_uni>
anyway, homework is done! Thanks, guys.
19:38
<@Derakon>
No problem.
19:38 ilf_uni [~nsJChat@Nightstar-16340.vl212.georgiasouthern.edu] has quit [Quit: Nightstar's Java Chat http://www.nightstar.net]
19:39 * Derakon goes in precisely the wrong direction with his new semi-random tunnel generation algorithm: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen15.png
19:39
<@Derakon>
Good thing the tunnels are forced to connect on the last subsegment~
19:45
<@Derakon>
This is more like what I wanted: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen15b.png
19:45
<@Derakon>
Now I have the issue of space-filling. My current algorithm is pretty brittle and unextensible; I just say "Remove all blocks close to this block", and it does it regardless of any other structures in the area.
19:46
<@jerith>
The tunnels are supposed to be wavy like that?
19:46
<@Derakon>
I need to be able to make certain things as inviolate (so I can create fixed features, barricades, and the like) and also be able to expand open spaces semi-arbitrarily without worrying about running into other tunnels.
19:46
<@Derakon>
They are, yes.
19:46
<@Derakon>
Each "limb" of the tree now gets a type, which currently is either straight or bumpy. My next type is "room", the plan being to have a large open space between the two endpoints.
19:47
<@Derakon>
But if you look at that map, just above the center -- if that segment were a room segment, it'd bump up against that tunnel that loops back around.
20:00 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
20:26
<@Derakon>
How does this look as a spacefilling algorithm? http://derakon.dyndns.org/~chriswei/games/jbrl/spacefill/
20:26
<@Reiver>
<@TheWatcher> Another suggestion, based on something I've been looking into: have two levels of 'I've seen this area'. the first being "I have been in a location where I can potentially access that area, but either did not, or could not" and the second being "I have actually been in this area"
20:27
<@Derakon>
Yeah, TW said that earlier.
20:27
<@jerith>
Heya, Reiv.
20:27
<@Reiver>
^ The intuitive suggestion was to nick Aquaria's approach, where you had black (background), grey (cavity you haven't been in) and white (visited).
20:27
<@jerith>
Just before I go to sleep...
20:28 * jerith prods Reiver with the POINTY STICK OF UTTER JAVA BEPOKEMENT!
20:28
<@Reiver>
Eep
20:28
<@Reiver>
Oh, yes.
20:28
<@Reiver>
Must do that. Have been distracted by Haskell recently.
20:29
<@jerith>
Don't!
20:29
<@jerith>
Or rather, do. Most emphatically. But only after the Java.
20:30
<@Reiver>
Yeah
20:32
<@Derakon>
Sooo...thoughts on spacefilling? >.>
20:36 macdjord [~macdjord@Nightstar-9795.129-97-124-126.uwaterloo.ca] has left #Code [Leaving]
21:35 Finale [c0cb88fd@Nightstar-14595.mibbit.com] has joined #code
21:35
< Finale>
"Imagine, my car has a CORRECT number!"
21:35
< Finale>
"How's that?"
21:36
< Finale>
"It has 754 in the number (rwxr-xr--). The owner can look at it, fiddle with it, and use it. The family can look at it and use it. Everyone else can only look at it."
22:21 AnnoDomini [~farkoff@Nightstar-29498.neoplus.adsl.tpnet.pl] has quit [Quit: Patience is a virtue.]
22:40
<@Derakon>
I think my spacefilling algorithm has a few bugs... http://derakon.dyndns.org/~chriswei/games/jbrl/spacefill/01.gif
22:47
< Finale>
heh.
22:49 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has quit [Quit: patch tuesday is teh suxxors]
22:58 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has joined #code
22:58 mode/#code [+o C_tiger] by ChanServ
22:58 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
22:59 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
23:00 Syloqs_AFH is now known as Syloqs-AFH
23:03
<@Derakon>
This is more like it! http://derakon.dyndns.org/~chriswei/games/jbrl/spacefill/02.gif
23:04
<@Derakon>
There's a minor issue of sibling branches on the tree merging their terminal rooms...not sure what to do about that. But otherwise it looks pretty snazzy if I do say so myself~
23:16 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Ping Timeout]
23:18 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
23:19 Syloqs_AFH is now known as Syloqs-AFH
23:22
<@Doctor_Nick>
what is the best monospace font
23:22
<@Derakon>
Um, one you like?
23:22
<@Doctor_Nick>
i am partial to deja vu sans mono
23:24
<@Doctor_Nick>
ahhhh what is that branch doing
23:24
<@Doctor_Nick>
aaaaaaaaaaa
23:24
<@Derakon>
?
23:24
<@Doctor_Nick>
19:03 <@Derakon> This is more like it! http://derakon.dyndns.org/~chriswei/games/jbrl/spacefill/02.gif
23:24 mode/#code [+v Doctor_Nick] by Doctor_Nick
23:24 ServerMode/#code [-v Doctor_Nick] by Blargh.CA.US.Nightstar.Net
23:25
<@Doctor_Nick>
wat
23:25
<@Doctor_Nick>
anyway it was that thing you posted
23:25
<@Derakon>
Heh.
23:25
<@Derakon>
I'm working on procedurally-generated platforming game levels.
23:25
<@Doctor_Nick>
like spleunky?
23:25
<@Derakon>
That's an example of the spacefilling algorithm I'm using to make tunnels.
23:26
<@Derakon>
Yes, but Spelunky doesn't have very much structure to its levels.
23:26
<@Doctor_Nick>
no its pretty random
23:26
<@Derakon>
Not only that, but it's pretty easy to run into a situation where you have to use up bombs or rope.
23:27
<@Doctor_Nick>
thats why you kill the store guy with a bomb and take all his bombs
23:27 * Derakon facepalms.
23:27
<@Doctor_Nick>
(and then get killed by him with a shotgun in later levels)
23:27 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Ping Timeout]
23:28 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
23:29 Syloqs_AFH is now known as Syloqs-AFH
23:30
< Finale>
meh.
23:30
< Finale>
if you even so much as let go of a bomb in a store, he shoots you immediately.
23:30
<@Doctor_Nick>
you have to time it perfectly
23:31
< Finale>
I haven't tried throwing one in from outside yet.
23:31
<@Doctor_Nick>
wait half a second after it starts flashing fast, throw, jump and run to the right
23:31
<@Doctor_Nick>
you have to be right next to the sign but not under it
23:31
<@Doctor_Nick>
if you go under the sign he sees you and shoots you immediately
23:32
<@Doctor_Nick>
alternatively, wait until you see a store with either the gun or the shotgun and kill him
23:32
< Finale>
will a pistol work?
23:32
<@Doctor_Nick>
if you use the gun make sure you shoot him over 4 times
23:32
<@Doctor_Nick>
yeah
23:32
< Finale>
haha
23:32
<@Doctor_Nick>
i made the mistake of only shooting him once
23:32
< Finale>
I've only ever done it with a shotgun.
23:32 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Ping Timeout]
23:33
<@Doctor_Nick>
basically, if you can get the jetpack, the climbing gloves, and the shotgun, you're fuckin superman
23:33 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
23:34
< Finale>
amen.
23:34 Syloqs_AFH is now known as Syloqs-AFH
23:34
< Finale>
jetpack, gloves, and spike shoes.
23:35
< Finale>
failing jetpack, jump shoes and the climbing gloves work nicely.
23:35
<@Doctor_Nick>
what do the spike shoes actually do
23:35
< Finale>
they increase the jump damage you do.
23:35
<@Doctor_Nick>
oh
23:35
<@Doctor_Nick>
can you kill the giant spider with them?
23:36
<@Derakon>
You can kill the giant spider with normal jumping, but bombs work better.
23:36
< Finale>
that they do.
23:36
<@Derakon>
More importantly, you can jump on pirahna plants, yetis, and the like with impunity.
23:36
< Finale>
toss a lit one in the web under it.
23:45
<@Derakon>
Now this is a map! http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen16.png
23:46
<@Derakon>
Okay, so there's some holes in it.
23:46
<@Derakon>
But it looks frickin' awesome.
23:47
<@TheWatcher>
Heh, impressive :)
23:54 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Ping Timeout]
23:54
<@Doctor_Nick>
ow my eyes
23:55 Finale [c0cb88fd@Nightstar-14595.mibbit.com] has quit [Quit: mibbit.com: blargh test]
--- Log closed Thu Mar 12 00:00:04 2009
code logs -> 2009 -> Wed, 11 Mar 2009< code.20090310.log - code.20090312.log >