code logs -> 2009 -> Tue, 31 Mar 2009< code.20090330.log - code.20090401.log >
--- Log opened Tue Mar 31 00:00:49 2009
00:07 PinkFreud is now known as Fridge
00:07 Fridge is now known as PinkFreud
00:24
< PinkFreud>
gnolam: you know, that might not be a good sign
00:24
< PinkFreud>
:
00:24
< PinkFreud>
:P too
00:27
<@gnolam>
I think it's strangely appropriate.
00:41 Orthia [~Orthianz@Nightstar-14240.xdsl.xnet.co.nz] has quit [Connection reset by peer]
00:41 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
00:41 mode/#code [+o GeekSoldier] by ChanServ
00:43 Orthia [~Orthianz@Nightstar-23677.xdsl.xnet.co.nz] has joined #Code
00:45 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
00:45 mode/#code [+o Vornicus] by ChanServ
00:47 * Derakon finally gets around to making more useful intermediary images for mapgen.
00:48
<@Derakon>
Very lazily, mind you, but yay less wasted time finding the bit I actually care about in a multi-megapixel debugging image.
01:21
<@Derakon>
Okay, fixed a bug preventing more loops from being created. This is tweaked to really increase the loop frequency, too: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen26a.png
01:21
<@Vornicus>
I really like the northeast.
01:22
<@McMartin>
Center-right maze would suck to leave.
01:22
<@Derakon>
The big room with all the platforms?
01:23
<@Vornicus>
Also, pinch point, bottom left.
01:23
<@Derakon>
Yeah, I just noticed that. >.<
01:23 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
01:23 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
01:24
<@McMartin>
Derakon: No; the only way out is two platforms right on top of each other and then a maze above it.
01:24
<@Derakon>
I think, to fix that, I'll need to look for islands of open space. Which'll be a pain.
01:25
<@Derakon>
McM: remember the player is 2.5 blocks tall.
01:25
<@Derakon>
You can jump high enough to grab the ledge to get out of there.
01:25
<@Vornicus>
Also double-printed node just above that maze.
01:25
<@Derakon>
Hm, though that's an animation I hadn't realized I'd need yet...
01:26
<@Derakon>
The double-printing is a side-effect of the way I'm making loops.
01:26
<@Vornicus>
grip-into-small-pinch?
01:26
<@Derakon>
Grab-to-crawl-to-stand.
01:27
<@Derakon>
Blast. I'd assumed I wouldn't need those kinds of one-block-offset animations (of which there are a ton) because the maze is aligned on a grid of threes. But the open spaces at the ends of mazes break that assumption.
01:27
<@McMartin>
Ahahahahaha, I'd forgotten about this bug report
01:28
<@McMartin>
"The code in section 4 compiles but reports at runtime that longcat is not long - a clearly erroneous deduction."
01:28
<@Derakon>
(And even if I ditched the open spaces inside mazes, I'd still get that kind of "noise" at the ends because mazes aren't allowed to touch blocks in other sectors, which can approach right up to the edge of the maze...I guess I could try to only start making the maze a bit away from the sector edge, but that's hard. :\ )
01:28 * Derakon snerks at McM.
01:32 * McMartin just got an "Acknowledged report, useful, fix will be in next build" email from Graham Nelson regarding it.
01:32
<@Derakon>
Once again, a map that hangs after spending two and a half minutes making things. >.<
01:37 somnolence [~somnolenc@203.160.1.ns-3171] has joined #code
01:37 Orthia [~Orthianz@Nightstar-23677.xdsl.xnet.co.nz] has quit [Ping Timeout]
01:37 Orthia [~Orthianz@Nightstar-23037.xdsl.xnet.co.nz] has joined #Code
01:44
<@Derakon>
Well this is a problem. http://derakon.dyndns.org/~chriswei/games/jbrl/maze/11.png
01:55
<@Vornicus>
What am I looking at?
01:56
<@Derakon>
Colored dots indicate sectors. The purple line / green dots are for a maze; blue line / purple dots for an irregular tunnel, green line / green dots for a straight tunnel.
01:57
<@Derakon>
The problem is that the maze sector's all over the other sectors and there's a bunch of islands, which are interfering with the accessibility checking wallwalker.
01:58
<@Derakon>
I think I need to contract the area used for the maze within the sector somehow. :\
02:00
<@Vornicus>
THis maze placement technique does not seem to be working very well.
02:04
<@Derakon>
Most of the time, it works fine...
02:04
<@Derakon>
But it's failed catastrophically here.
02:07
<@Vornicus>
I keep wanting to suggest a different mathod for creating path segments to fill with particular things, but I can't figure out how to describe it.
02:08
<@Derakon>
I believe the problem is simply that I'm considering squares to be valid parts of the maze even when they're not surrounded on all sides by the maze's sector.
02:09
<@Vornicus>
Gner. Okay, I think I figured out what I'd do.
02:10
<@Vornicus>
Trick is to, instead of working along corridors of all one style, create pieces that go between midpoints.
02:11
<@Derakon>
That sounds like the overall tree structure in microcosm.
02:11
<@Vornicus>
And then fill each piece with just one type of stuff, with entrances/exits at the midpoints
02:11
<@Derakon>
I don't follow.
02:12 * Vornicus tries to describe better.
02:14
<@Vornicus>
Instead of using a "corridor" metaphor, use a "room" metaphor - the midpoints of graph edges are transitions between rooms.
02:14
<@Derakon>
Oh, you're talking about the map as a whole?
02:14
<@Vornicus>
RIght.
02:14
<@Vornicus>
And then you'll have different types of rooms.
02:16
<@Derakon>
That would be easier to manage, but it'd also make less interesting maps, I think.
02:16
<@McMartin>
Nethack does fine
02:17
<@Derakon>
Nethack is not about exploration.
02:17
<@McMartin>
... Like Hell it's not.
02:17
<@McMartin>
Unless you mean something very different by "exploration"
02:17
<@Derakon>
Exploration is a portion of the gameplay, but it's mostly about managing risk.
02:17
<@Derakon>
And combat.
02:18
<@Derakon>
The maps themselves have comparatively little detail unless they're part of set pieces.
02:23
<@Derakon>
I guess my point is that NetHack maps (and Angband maps, for that matter) don't feel like places. They feel like a scattering of nodes in a great void.
02:26
<@Vornicus>
I'm not sure you're going to solve that using a corridor metaphor as opposed to a room one.
02:27
<@Derakon>
It seems to me that using a room metaphor presupposes that rooms are more interesting than corridors.
02:27
<@Vornicus>
That's because in a large sense they /are/.
02:28
<@Vornicus>
And these rooms don't have to /look/ like rooms. You can use corridor-like room algorithms.
02:29
<@Derakon>
I disagree that rooms are inherently superior to corridors. The vast majority of most maps are composed of corridors. If they aren't interesting, then something is seriously wrong.
02:30
<@Vornicus>
And look at games with rooms and corridors. Take MP2. Which is more interesting, the dark version of the federation landing site, or the phazon pit that you have to cross to get there?
02:30
<@Derakon>
MP2 is a bad choice of comparison games for me since I've only played it once, and that several years ago.
02:31
<@Derakon>
However, comparing 3D and 2D is also not really fair.
02:32
<@Vornicus>
A true point. One moment.
02:34
<@Vornicus>
http://vgmaps.com/Atlas/NES/BlasterMaster-Area2.png <--- look at the tall area at the middle-right, and compare it to the two areas connected to the bottom of that one.
02:34
<@Derakon>
Well, yeah, if you're just going to make your corridors be straight shots from point A to point B, then they'll be boring.
02:35
<@Derakon>
Which is why I have four different varieties of corridors at the moment and intend to add more.
02:35
<@Vornicus>
Anyway most 2d games don't feel like places.
02:36
<@Derakon>
SM, MF, and MZM do a pretty decent job.
02:36
<@Derakon>
MF's a bit schitzophrenic, mind.
02:37
<@Vornicus>
And you think that random generation is going to be able to give locations the kind of soul that they do in SM? That's a human artist behind that, and one who is very, very good at his job.
02:37
<@Derakon>
Of course not.
02:37
<@Derakon>
But I can do better than just giving up on them.
02:37
<@Derakon>
(Which wasn't what you were suggesting, but it sounds like it)
02:38
<@Vornicus>
No, don't give up on them.
02:38 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
02:39
<@Vornicus>
But what I'm saying is that your map generator will be a lot more sensible if you go from a corridor metaphor to a room one. You'll probably want to make it so branches are less common if you do that, though, to get "straight shot" corridors a bit more often.
02:39
<@Derakon>
So what do you see as the major gains from such an approach?
02:40
<@Vornicus>
1. you don't have to worry about the fight between corridorness and roomness that you see rather a lot of in your current incarnation, as exemplified by the mazes and Big Rooms and the difficulty in making them interact sensibly with the corridors.
02:42
<@Vornicus>
2. because junctions are Just Rooms, you can have more interesting intersections, because you're not having to work in three corridors at once to get a navigable junction.
02:42
<@Derakon>
(Let me know when you're done listing points)
02:43
<@Vornicus>
I think that's it for now.
02:43
<@Vornicus>
There was something I wanted to say about setpieces but I'm not sure how to express it.
02:45
<@Derakon>
The "fight between corridorness and roomness" will still be an issue so long as I'm using the spacefilling algorithm. That's the root cause of that issue. And I don't see that going away unless I do give up on making interesting corridors.
02:45 Orthia [~Orthianz@Nightstar-23037.xdsl.xnet.co.nz] has quit [Connection reset by peer]
02:45
<@Derakon>
And I have junctions with only two corridors. They're called "turns". :)
02:45
<@Vornicus>
But corridors are something you can make into a room algorithm.
02:46
<@Vornicus>
My point is, really, that you're concentrating a lot on the Places Between and not on the Places Themselves.
02:46 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
02:46
<@Derakon>
The places will get attention as soon as I figure out what my first room style will be.
02:46
<@Derakon>
It's easy to think of styles of corridors. Rooms rather less so.
02:47
<@Vornicus>
What I am saying, too, is that a corridor is easily turned into a room. A room is not so easily turned into a corridor or junction.
02:49
<@Derakon>
It may well be that I'll want rooms to actually be something like a zero-length corridor on the map (right now they're basically corridors with large open spaces in the middle that overwhelm all actual corridor-like aspects of them).
02:49
<@Vornicus>
You can use your existing corridor styles and turn them into a room style. It will look little different from how it does now; the difference will be that styles will change in the middle instead of at the end.
02:50
<@Derakon>
My main issue, though, is that I'm simply not convinced that I can make an organic-looking map using a room-centric design.
02:51
<@Derakon>
Don't take this as me rejecting what you're saying, by the way.
02:51
<@Derakon>
You've raised some good points, but you have to realize that I'm not simply going to say "Okay, clearly I need to completely change the fundamentals of my map generation"...at least not without giving it a lot of thought. :)
02:52
<@Vornicus>
I expect rather a lot of inertia, actually. :)
02:55
<@Derakon>
So if I understand your suggestion, you're basically saying "Go ahead and use the spacefiller algorithm to make rooms, but connect those rooms using corridors that you carve straight out using something simpler."
02:55
<@Vornicus>
Approximately, yes.
02:57
<@Vornicus>
Personally I'd take the existing graph, triangulate it using Delaunay, get the dual graph, and use the cells of the dual and the edges of the original, untriangulated graph as rooms and doors/halls.
02:58
<@Derakon>
...an interesting approach.
02:59
<@Derakon>
I can't help but think you'd end up with something that looks a bit like this: http://upload.wikimedia.org/wikipedia/commons/5/52/Blender3D_VoronoiF2-F1.jpg
02:59
<@Derakon>
Though of course your rooms needn't fill all the available space.
02:59
<@Vornicus>
You don't have to fill the cell, of course, but that is the area available to the room.
03:00
<@Vornicus>
Removes actual contention between rooms, you can use Painter's Algorithm to determine your room's maximum extents and edges, and you know exactly where your mazes exits and entrances have to be.
03:05
<@Derakon>
Here, a simple experiment: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27.png
03:05
<@Derakon>
I just removed the ability for siblings, parents, and connections to merge at the junctions.
03:06
<@Vornicus>
That's not too bad.
03:07
<@Derakon>
If I then simply replaced every juncture in the tree with an open circle of a fixed radius, that should fix connectivity problems.
03:07
<@Vornicus>
Hm, indeed.
03:08
<@Derakon>
Reduce the wall thickening effect a bit, too, I think.
03:08
<@Derakon>
There's some rather thin corridors SW of center.
03:08
<@Vornicus>
I was confused for a minute by the bit /just/ sw of center, there seems to be a stray room in there.
03:09
<@Derakon>
Hm. Curious, yes.
03:09
<@Vornicus>
But apparently there's a second sw-going edge.
03:09
<@Derakon>
...hunh, there is.
03:09
<@Derakon>
Same map, thinner walls: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27b.png
03:10
<@Derakon>
Yeah, so that bit SW of center is because I still have the generator configured to make as many loops as possible.
03:10
<@Derakon>
If I cut down on the maximum length of a loop passageway that extra branch wouldn't be there.
03:10
<@Derakon>
s/branch/edge
03:11
<@Derakon>
Case in point: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27c.png
03:13 * Vornicus nods.
03:16
<@Derakon>
Well, ripping out the "Let's let sectors peacefully coexist side-by-side" logic does seem like it'd make things easier to handle.
03:17
<@Derakon>
There's probably some logic I'll break somewhere that depends on all "interesting" squares on the map (i.e. not part of the great unmined void) being claimed by a sector, but that'll be easy enough to track down.
03:20
<@Vornicus>
i hope you're using source control. I don't want you to lose your existing work on a potential dead end.
03:20
<@Derakon>
Heh. I make regular backups.
03:20
<@Derakon>
I really, really should set up SVN or git or something, though.
03:21
<@Derakon>
To make those maps, though, I just commented out three lines of code and reverted some configuration changes (go go vim's unlimited undo stack~)
03:21
<@ToxicFrog>
git.
03:21
<@ToxicFrog>
For the love of god, git.
03:22
<@Derakon>
That'd give me experience with four different kinds of source control (CVS used in college, Perforce used at Amazon, SVN used at TripIt)
03:23
<@Derakon>
Does git require a database or any other external dependencies? Or just a daemon?
03:23
<@Derakon>
(I assume it has to be listening on a port somewhere, hence the daemon)
03:23
<@Vornicus>
I couldn't get git going because of an apparently misconfigured perl.
03:27
<@Derakon>
Oh hey, they have an OSX binary.
03:27
<@Derakon>
I hope it works on 10.4 despite the "Leopard" label.
03:30
<@Derakon>
Bah. It does not.
03:38
<@ToxicFrog>
It doesn't require a database, any external dependencies other than Perl, or a daemon.
03:39
<@ToxicFrog>
It's a distributed system, so every working copy is also a complete repo, with no need for a central server.
03:39
<@ToxicFrog>
This is one of the reasons I like it so much; there's no overhead to set up a repo.
03:39
<@Derakon>
So instead of syncing with the server, you sync with someone else's repo?
03:39
<@ToxicFrog>
Yep.
03:40
<@ToxicFrog>
(it supports a bunch of protocols for that - local, ssh, http, its own daemon...)
03:40
<@ToxicFrog>
You can use it centralized if you like, by setting up a "bare" repo (a repo you can push to and pull from, but has no working copy associated with it).
03:42
<@ToxicFrog>
If all you've used before are p4, svn and cvs, it may feel kind of weird - no central repo, and tags/branches work very differently (they are true branches, not tree-copies in the same line of history)
03:43
<@Derakon>
I never really worried too much about branches.
03:43
<@Derakon>
We didn't use them a whole lot (except for keeping release and development in separate branches, with hotfixes going into release and then backported into dev) at Amazon, and not at all at TripIt.
03:46
<@ToxicFrog>
Branches are lovely in git and I use them constantly because they are so easy to use.
03:47
<@ToxicFrog>
Each branch is a distinct line of development; checking out a branch replaces your working copy with it.
03:47
<@ToxicFrog>
So a very common workflow is something like: create a seperate branch for each major feature you're working on; make bugfixes and whatnot in master; when you're done a feature, merge that branch into master and delete the old branch.
03:47 * Derakon nods.
03:48
<@ToxicFrog>
Similarly, tags are just named commits, so "checkout v1.1" or "diff v1.1..HEAD" become meaningful commands.
03:48
<@Derakon>
If we had code that wasn't ready to go live at Amazon, typically we just did the equivalent of #ifdef 0ing it out.
03:48
<@ToxicFrog>
;.;
03:48
<@Derakon>
Reason being that branch merges were a pain.
03:48
<@Derakon>
But that's because of the codebase, not the CMS.
03:49
<@ToxicFrog>
(git commit history is actually a digraph; each commit points to its parent, or parents in the case of merge commits. Tags are just aliases for vertices, and branches are just tags that auto-advance when committed on top of.)
03:49 * ToxicFrog nods
03:50
<@ToxicFrog>
Git has really convenient merging features, but it's still limited by what the merge strategy can do.
03:50
<@ToxicFrog>
(it's way easier than, say, p4 though: git checkout target-branch; git merge source-branch)
04:10 Orthia [~Orthianz@Nightstar-23753.xdsl.xnet.co.nz] has joined #Code
04:11
<@Derakon>
Bah.
04:11
<@Derakon>
Python really should let you delete nonexistent keys in dictionaries.
04:12
<@Derakon>
Anyway, the "just reconnect unconnected tunnels after running the spacefiller algorithm" approach is running into a couple of problems: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27d.png
04:13
<@Derakon>
The first is exposure of the grey area. That should be easy to fix but is being a bit annoying at the moment.
04:13
<@Derakon>
The second, though -- look at the lower-left area.
04:13
<@Derakon>
Where the room is connected to corridors that it shouldn't be connected to.
04:13
<@Derakon>
I think I'll need a more directed approach than the circles I'm using right now.
04:28 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
04:29 Syloqs_AFH is now known as Syloqs-AFH
05:06 Vornotron [Vornicus@Admin.Nightstar.Net] has joined #code
05:06 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Ping Timeout]
05:19 AnnoDomini [~farkoff@Nightstar-29644.neoplus.adsl.tpnet.pl] has joined #Code
05:19 mode/#code [+o AnnoDomini] by ChanServ
05:25 Vornotron is now known as Vornicus
05:44 * ToxicFrog cracks code generation!
05:44
<@ToxicFrog>
Mostly.
05:44
<@ToxicFrog>
There's a few pathological cases that cause it to run out of registers~
05:44
<@ToxicFrog>
(1-(1-(1-(1-(1-(1-1)))))) is one of them.
05:44
<@ToxicFrog>
(I think I can deal with this by generating the deeper subtree first)
05:45
<@Derakon>
This is for your compiler?
05:47 * Derakon fixes that junction bug he was talking about, creates this: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27e.png
05:47
<@Derakon>
Minor accessibility issues; I may need to increase the junction size and put a platform in the middle.
05:47
<@Derakon>
Which'll look kinda weird; every single junction would be marked by a platform.
05:48
<@Derakon>
Hm. Don't need to manually carve out space at the beginnings and ends of maps now.
05:48
<@Derakon>
http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27f.png
05:52
<@Derakon>
...that maze in the southwest dead-ends. >.<
05:53
< Vornicus>
ooops. :(
05:53
<@Derakon>
Okay, I still need to add open space at the ends of mazes...but it can be a lot less than it was before.
05:53
< Vornicus>
Is your maze generation doing better in general now though?
05:54
<@Derakon>
Well, the main issue was the tangled sector borders I was getting when allowing sectors to grow into each other without forming walls (which was to allow for the junctions to exist).
05:54
<@Derakon>
This approach, which creates the walls and then selectively removes them afterwards, gives much cleaner borders.
05:54
<@Derakon>
So yes, it's a definite improvement, but it's not just limited to mazes. It just happened to manifest there.
05:57
<@Derakon>
http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27g.png
05:59
< Vornicus>
Much nicer.
06:00
<@Derakon>
I really need to move all the map configuration values into a separate file...there's 150 lines' worth (counting whitespace and comments).
06:01
< Vornicus>
Whee.
06:02 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
06:02
<@Derakon>
This includes things like dicts for which tunnel styles can progress into which other tunnel styles (with weighted probabilities, so that e.g. maze tunnels are very rare, sinusoid tunnels somewhat rare, and bumpy/straight tunnels common), a few config values for almost every tunnel type (room size, sinusoid magnitude, etc.), lengths and distances for making the tree...
06:07 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
06:13 * Derakon sighs, realizes he forgot to do the "counter += 1" part of putting a maximum number of attempts on part of the mapgen.
06:14
<@ToxicFrog>
Derakon: yes, for the compiler
06:15
<@ToxicFrog>
In C-, out TM assembler.
06:16
<@ToxicFrog>
It's now correctly generating code for function calls, numeric constants and (if it doesn't run out of registers) mathematic expressions.
06:16
<@McMartin>
TM?
06:16
<@ToxicFrog>
TinyMachine.
06:16
<@Derakon>
How many registers do you have?
06:16
<@ToxicFrog>
Eight registers, two address spaces (code and data), 17 opcodes.
06:17
<@ToxicFrog>
One register is reserved for use as IP, and another I'm using as SP, so that gives me 6 to play with.
06:17
<@Derakon>
...ho-ly crap.
06:18
<@ToxicFrog>
Yeah, not many.
06:18
<@Derakon>
No, I was reacting to http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen27h.png
06:18
<@ToxicFrog>
But I've used worse.
06:18
<@ToxicFrog>
It's better than the x86~
06:18
<@Derakon>
But yeah, 6 registers is not many.
06:18
<@Derakon>
Doesn't x86 have 8?
06:18
<@McMartin>
And all of them are special-purpose.
06:18
<@McMartin>
Two index, two dictated result registers, one base, and one count.
06:19
<@McMartin>
Several different segment pointers.
06:19
<@Derakon>
I don't remember them all being special-purpose.
06:19
<@McMartin>
Protected mode generalizes them some
06:19
<@Derakon>
Granted it's been a while since my systems course.
06:19
<@McMartin>
16-bit mode is obscene, though.
06:19
<@Derakon>
Hm. When's the last time I programmed a 16-bit program? Oh, yeah. Never. >.>
06:19
<@McMartin>
Like, all addresses have to BX + 1/2/4 * IX/IY + Constant.
06:20
<@McMartin>
With an optional segment.
06:20 * McMartin tsks. McMartin remembers back when this was what ".com" meant.
06:20
<@ToxicFrog>
And not only are they all special-purpose, there are pages and pages of constraints on, frex, which registers MOV can transfer between.
06:20
<@ToxicFrog>
>.<
06:20
< Alek>
heh.
06:20
< Alek>
yeah, when I first got on the web, the .com duality REALLY threw me.
06:21
< Alek>
I kept looking for .exe websites. <_<
06:21
<@McMartin>
Clearly we now need a .exe TLD.
06:21
< Alek>
:P
06:21
< Alek>
a .bat too
06:21
<@Derakon>
For a while there ICANN was thinking of letting anyone have their own TLD.
06:21
< Alek>
.bat - the next tinyurl.
06:26
<@ToxicFrog>
So, yeah, TM, way less painful to generate code for~
06:26
<@ToxicFrog>
Although 6 GP registers is still damn cramped.
06:26 * Vornicus gives TF MMIX, and its 256 GP registers.
06:26
<@ToxicFrog>
YAY!
06:27
< Vornicus>
(it's also 64-bit RISC, and all the instructions are the same size.)
06:27 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
06:28
<@ToxicFrog>
<3
06:31
< Vornicus>
THough I'm still trying to figure out why it needs 32 special registers.
06:32
<@ToxicFrog>
What do they do?
06:32
< Vornicus>
One moment, I will find it.
06:33
< Vornicus>
Hm, I do not know where it went.
06:35 mode/#code [+oooooo Alek Orthia PinkFreud Reiv somnolence Vornicus] by Vornicus
06:35
<@Vornicus>
ah. It's on the wiki page. http://en.wikipedia.org/wiki/MMIX
06:35
<@ToxicFrog>
It has a sliding register window!
06:35
<@ToxicFrog>
My favorite!
06:36
<@Reiv>
You like sliding registers?
06:36
<@Vornicus>
Is that serious or not?
06:36
<@ToxicFrog>
Serious.
06:37
<@Reiv>
Die to their Awesome, some form of Glorious Elegance or somethin'?
06:37
<@ToxicFrog>
If the window is wide enough, all your arguments are in registers and you don't need to deal with stacking/unstacking everything every time you call.
06:38
<@Vornicus>
And with 256 registers, I imagine the window is pretty wide.
06:38
<@ToxicFrog>
On MMIX the window is configurable
06:39
<@Vornicus>
...via... rL?
06:39
<@ToxicFrog>
Yes.
06:40
<@ToxicFrog>
Basically, the lower rL registers are your local window (out of the 512-register local stack)
06:40
<@ToxicFrog>
And the upper rG registers are global.
06:40
<@ToxicFrog>
It doesn't say what happens if rL > rG, or rL << rG.
06:41
<@Vornicus>
Reiv: so what's the question?
06:41
<@Reiv>
It wants me to calculate the area of a polygon using trapezoids, instead of the given result that uses calculus and triangles.
06:41
<@ToxicFrog>
(ANAICT it has 224 globals, 512 locals, and 32 special purpose)
06:42
<@Reiv>
The... thing doesn't make sense.
06:42 * Reiv attempts to dig it up
06:42
<@ToxicFrog>
(of which a maximum of 256 globals+locals and the 32 specials are accessible at one time)
06:45
<@Reiv>
Area of a shape: compute by adding up the trapezoidal areas formed by pair of vertices with the x-axis. This can (correctly) be negative when x2 > x1.
06:47
<@Vornicus>
should be sum(k = 0, N - 1, (y_k + y_{k+1}) * (x_{k+1} - x_k) / 2
06:48
<@Reiv>
I don't actually understand what that means.
06:48
<@Vornicus>
How about I write it in Python.
06:49
<@Reiv>
OK.
06:49
<@Reiv>
'cuz this is a lil baffling.
06:49
<@Derakon>
Reiver: basically, you take adjacent pairs of vertices and their projections onto the X-axis.
06:49
<@Derakon>
This makes a trapezoid.
06:49
<@Reiv>
What's a trapezoid again?
06:49
<@Reiv>
>_>
06:50
<@Derakon>
A four-sided polygon in which two of the sides are parallel.
06:50
<@Reiv>
Oh.
06:50
<@Vornicus>
sum([(points[k].y + points[k + 1].y) * (points[k + 1].x - points[k].x) / 2 for k in range(len(points) - 1)])
06:50
<@Reiv>
...ah. so it's taking the vertical value as the parallel sides?
06:50
<@Vornicus>
Yes.
06:50
<@Derakon>
Right.
06:51
<@Vornicus>
Should probably make sure your points are in sorted order though. I don't have any idea what will happen if they're not.
06:51
<@Reiv>
And then it's doing a... something... to work out the area of that?
06:51
<@Reiv>
Which should be two triangles and a rectangle?
06:51
<@Vornicus>
It's using the trapezoid area formula.
06:52 * Reiv looks it up.
06:52
<@Vornicus>
Which is h * (b + B) / 2. Except they're on their side; the x distance is h and the two bs are y values.
06:53
<@Vornicus>
h is the height of the trapezoid, measured between the two parallel sides; b and B are the lengths of the two sides.
06:57 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
06:57
<@Derakon>
'Eyo, Rhamph.
06:58
< Rhamphoryncus>
yo
06:58 * Vornicus greens Rhamphoryncus
06:58
< Rhamphoryncus>
moo?
06:58
<@Vornicus>
greets*
06:59
< Rhamphoryncus>
ahhh
06:59
<@Vornicus>
That type would have made more keyboard sense if I were using Dvorak.
07:00
<@Vornicus>
typo.
07:00
<@Vornicus>
What the shit, fingers.
07:00
<@Derakon>
You're tired.
07:01
<@Reiv>
Oh, a trapezoid is a trapezium. Okay.
07:06
<@Vornicus>
heh
07:07
<@Vornicus>
I once did a project for high school where I discovered the three-dimensional analogue of the trapezoid, the prismatoid.
07:07
<@Vornicus>
I then used said critter to derive the formulas for the volume of the five platonic solids and the pentagonal gyrodipyramid (d10)
07:12
<@Vornicus>
on indie game maker "Cactus": "Well, prolific is too tame a word."
07:13
<@Derakon>
What games has he/she made?
07:15
<@Vornicus>
http://h1.ripway.com/cactussoft/newsite/games.htm <--- well, these.
07:15
<@Derakon>
...my word.
07:16
<@Vornicus>
http://cactusquid.blogspot.com/ <--- and, apparently, these.
07:18
<@Reiv>
... are they /good/, though?
07:19
<@Vornicus>
Not the ones I've seen; he's a highly experimental developer, he throws everything at the wall to see whether it sticks or not.
07:23
<@Vornicus>
Most of it doesn't.
07:24 Derakon is now known as Derakon[AFK]
07:33
<@ToxicFrog>
Fixed the out-of-registers problem!
07:34
<@ToxicFrog>
(evaluate deepest subtree first when generating code for expressions)
07:34
<@Vornicus>
Yay!
07:35
<@ToxicFrog>
(so, expressions like (1-(1-(1-(1-(1-1))))) will generate interleaved LDC and SUB instructions, rather than trying to register all of the 1s first)
07:36
<@Alek>
...
07:36
<@Alek>
http://members.tranquility.net/~scimusic/lyrics.html#Y2K
07:38 * ToxicFrog ponders comparison operators
07:38
<@ToxicFrog>
These may be a bit ugly.
07:41 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (EOF)]
07:41
<@ToxicFrog>
I think it'll have to emit code like:
07:44
<@ToxicFrog>
sub r1,r1,r2
07:44
<@ToxicFrog>
ldc r2,1
07:44
<@ToxicFrog>
jXX r1,1(r7) # test result
07:44
<@ToxicFrog>
ldc r2,0 # failed - r1 <- 0
07:45
<@ToxicFrog>
...and then unlock r1 and return the result in r2.
07:48 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
07:51
<@ToxicFrog>
Done!
07:52
<@ToxicFrog>
Looks pretty much just like that except with r1 and r2 swapped.
07:52
<@ToxicFrog>
That leaves...variable access (including array subscript), return, and a shitload of testing.
08:11
<@Orthia>
my braaaain
08:11 * Orthia dies.
08:11
<@Orthia>
* Reiver dies, too. >_>
08:16 Orthianz [~Orthianz@Nightstar-23577.xdsl.xnet.co.nz] has joined #Code
08:17 Orthia [~Orthianz@Nightstar-23753.xdsl.xnet.co.nz] has quit [Ping Timeout]
09:59 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
09:59 mode/#code [+o Attilla] by ChanServ
10:27 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
10:43 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
11:27 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has joined #code
13:49 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
13:49 mode/#code [+o gnolam] by ChanServ
16:16 KBot [AnnoDomini@Nightstar-29105.neoplus.adsl.tpnet.pl] has joined #Code
16:16 AnnoDomini [~farkoff@Nightstar-29644.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
16:17 AnnoDomini [~farkoff@Nightstar-29105.neoplus.adsl.tpnet.pl] has joined #Code
16:17 mode/#code [+o AnnoDomini] by ChanServ
16:17 KarmaBot [AnnoDomini@Nightstar-29644.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
16:19 KBot is now known as KarmaBot
16:23 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
16:23 mode/#code [+o Vornicus] by ChanServ
16:31 Orthianz [~Orthianz@Nightstar-23577.xdsl.xnet.co.nz] has quit [Ping Timeout]
16:39 Derakon[AFK] is now known as Derakon
16:58 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has quit [Ping Timeout]
17:33 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
17:33 mode/#code [+o Attilla] by ChanServ
18:13 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has joined #code
18:23 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
18:24 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
18:24 mode/#code [+o Attilla] by ChanServ
18:27 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
18:31 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
18:32 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
18:32 mode/#code [+o Attilla] by ChanServ
18:49 * Derakon fixes a bug where creating loops would make edges in the tree too close to adjacent edges (angle-wise), causing problems in the spacefiller algorithm.
19:56 Tarinaky [~Tarinaky@Nightstar-16638.plus.com] has quit [Client exited]
20:02 * Derakon ponders how to handle locks.
20:02
<@Derakon>
I see two main types of locks: ones that require unusual jumping ability, and ones that require unusual destructive ability.
20:03
<@Derakon>
The latter should be straightforward: plop a wall down the middle of a corridor that can be destroyed by the appropriate powerup.
20:03
<@Derakon>
The former are trickier.
20:07
<@Derakon>
Hm. 25% reduction in tunnel length causes a 12% increase in map occupancy.
20:08
<@Derakon>
(from 58% to 70%)
20:12 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
20:13 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
20:13 mode/#code [+o Attilla] by ChanServ
21:28
<@gnolam>
Svm^2Bq^-1h^-1, d0 1 m
21:28
<@gnolam>
Mmm, unit overload...
21:52 * AnnoDomini ponders if there's a third-party proxy-using client for last.fm already.
21:57 * AnnoDomini tries to learn JSP.
22:05
<@gnolam>
AnnoDomini: I believe it's called Spotify. ;-)
22:07 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Patch time]
22:07
<@AnnoDomini>
gnolam: "Not available in your country yet" <- That's the exact problem with MOTHERFUCKER.
22:19 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
22:19 mode/#code [+o gnolam] by ChanServ
23:00 * Derakon facepalms as Pandora ends up on the same thread as mapgen and gets a horrible case of stuttering.
23:09
<@Derakon>
Er. s/thread/core/
23:10
<@Derakon>
New blocks at the scale they'll be used at in-game: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen28a.png
23:10
<@Derakon>
And a 1/5th scale of the entire map: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen28b.png
23:12
<@AnnoDomini>
Damn it, TNO, learn your THAC0s faster. :E
23:25 Alek [~omegaboot@Nightstar-3659.dsl.emhril.sbcglobal.net] has quit [Connection reset by peer]
23:34 Alek [~omegaboot@Nightstar-24672.dsl.emhril.sbcglobal.net] has joined #code
23:45 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Connection reset by peer]
23:45 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
23:45 mode/#code [+o GeekSoldier] by ChanServ
23:51
<@ToxicFrog>
Shit.
23:52
<@ToxicFrog>
I have just had demonstrated to me an input to my compiler that causes it to run out of registers, and furthermore can be constructed for any arbitrary number of free registers.
23:53
<@McMartin>
... yes, if you have a complex enough expression you can eventually run out of memory with which to store the necessary temporary values.
23:54
<@McMartin>
For example, a function with 1 billion 32-bit arguments.
23:54
<@ToxicFrog>
Well, I'm not using memory at all for temporaries at the moment
23:55
<@ToxicFrog>
Turns out it's fairly trivial to construct a binary expression tree that causes it to run out of free registers.
23:55 * Derakon fixes some map scaling issues and improves performance of drawing the final map. Whee! http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen28c.png
23:56
<@Derakon>
TF: something like (((1+1)+(1+1))+((1+1)+(1+1)))+(((1+1)+(1+1))+((1+1)+(1+1)))?
--- Log closed Wed Apr 01 00:00:01 2009
code logs -> 2009 -> Tue, 31 Mar 2009< code.20090330.log - code.20090401.log >