code logs -> 2012 -> Mon, 30 Jul 2012< code.20120729.log - code.20120731.log >
--- Log opened Mon Jul 30 00:00:15 2012
00:02 You're now known as TheWatcher[T-2]
00:08 You're now known as TheWatcher[zZzZ]
00:11 Netsplit *.net <-> *.split quits: Attilla, ShellNinja, himi-cat, franny, Moltare, @Derakon, froztbyte, @jerith
00:11 Netsplit over, joins: Moltare, &jerith, &Derakon, franny, himi-cat, froztbyte, Attilla, ShellNinja
00:20 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
00:21 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
00:21 mode/#code [+ao Derakon Derakon] by ChanServ
00:24
<&Derakon>
So, design problem.
00:24
<&Derakon>
(In Pyrel)
00:25
<&Derakon>
I want to be able to attach bits of code to game entities that alter how the game logic flows when they're in-context.
00:25
<&Derakon>
Specific example: modifying placement of creatures so that a "unique" (i.e. named) creature cannot be generated twice at the same time, or at all if it was previously killed.
00:26
<&Derakon>
More generic example: prevent placement of more than one Great Wyrm at a time (even though Great Wyrms are non-unique monsters).
00:26
<&Derakon>
Or preventing pack monsters from becoming frightened unless more than half their pack is dead.
00:27
<&Derakon>
In Angband, this kind of thing is handled by attaching flags to the entity, and the game checks for the presence of flags to decide how to behave. This works but limits the system to relatively simple behaviors.
00:27
<&Derakon>
I'd like a more flexible and extensible system.
00:28
<&McMartin>
This sounds like making things happen via chain of responsibility-like architectures might be nice.
00:28
<&Derakon>
I have an existing system of "procs", which are code that attach to entities and fires on a given trigger condition. I could extend this to more general situations as well.
00:28
<&Derakon>
But Procs are only instantiated when the entity they attach to is instantiated. For problems like creature placement, it makes no sense to instantiate the creature, then decide if it can be placed.
00:29
<&Derakon>
(This would require instantiating one of every creature type every time we make a new creature allocator table)
00:29 Nemu [NeophoxProd@Nightstar-cf3aa501.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
00:32
<&McMartin>
You could let the creature-placer have procs.
00:32
<&Derakon>
Well, the description of how this creature differs from the default behavior should be a part of that creature's definition in the data files.
00:33
<&Derakon>
Which means that the procs attach to that creature.
00:34
<&McMartin>
Mmm
00:34
<&McMartin>
OK, so, reflectively created decorators?
00:34
<&McMartin>
It's been a long time since I've used a language where Constructors Are Forever >_>
00:34
<&Derakon>
Uhh...
00:34
<&Derakon>
Lemme back up and give some context here.
00:35
<&Derakon>
When we create a level, we need to populate it with monsters. The monsters available for selection depend on the current dungeon depth, since different monsters are native to different depths (no dragons on level 1, for example).
00:36
<&Derakon>
So we create an "allocator table", which has varying numbers of slots for each monster in the game -- the number of slots depends on how far we are from the monster's native depth, as well as how common the monster normally is.
00:36
<&Derakon>
The specific problem I'm wrestling with is the unique-monster problem; here, we don't want to put the monster into the table if it's already dead...and if we put it into the table and then select it again later on (since the table gets re-used), we need to deny that second selection since the monster already exists.
00:37
<&Derakon>
(Er, if we put it into the table and then select it twice, that is)
00:37
<&McMartin>
"Unique" really feels like something that lives in the logic that builds the allocator table.
00:39 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:39
<&Derakon>
But there's other behaviors that I'm sure people will want to implement that occur before the creature is created.
00:39
<&Derakon>
For example, there's a specific class of monsters that's rather annoying to deal with, so limiting how many of that specific breed can be on the level at a time would be a popular tweak.
00:40
<&McMartin>
Hm
00:40
<&McMartin>
Is the idea that once you hit a threshold you recreate the table, or is the idea that certain values require a reroll?
00:40
<&McMartin>
If the latter, a simple plug-code-in-here-to-verify-result step is all that's needed.
00:41
<&Derakon>
Well, clearly it's possible to make an invalid selection (rolling up a unique monster twice in a row would do it), so that should just force a reroll.
00:41
<&Derakon>
I'd rather exclude clearly-impossible entries from the table altogether, though.
00:42
<&McMartin>
That's doable with the verify method by verifying results before the go into the table at generation time
00:43
<&McMartin>
(You may need to distinguish "no, not now" from "never")
00:43
<&Derakon>
But how do you do that without instantiating an instance of the creature every time you generate an allocation table?
00:43
<&McMartin>
Make "verify" the equivalent of static?
00:43
<&McMartin>
Well, that's 1.
00:44
<&McMartin>
2. is "Maybe you should rethink the idea that 'I am allowed to be spawned here' is a property of the *creature* instead of the *dungeon*.
00:45
<&Derakon>
So...you're suggesting that the dungeon should have a list of all the creatures that are only allowed to be generated once? Instead of it being local to the creature?
00:45
<@Alek>
unless you have game-global unique monsters.
00:45
<&Derakon>
Which I do.
00:45
<&McMartin>
I'm saying the dungeon should have a notion of "verify creature placement"
00:45
<&Derakon>
These guys have names.
00:45
<&Derakon>
There's only one of them.
00:46
<@Alek>
are they only available in 1 dungeon, or can they be theoretically found in more than 1? (but only once per game, of course)
00:46
<&McMartin>
If you insist on claiming "there is only one place creature data goes", then you have to treat the creature *object* or *class* as being a component of tha tone thing.
00:46
<&McMartin>
*that one thing
00:47
<&Derakon>
McM: am I not doing this?
00:47
<&McMartin>
You are not doing this if you can't get access to verify() without creating an actual instance of the monster.
00:48
<&Derakon>
I think your first option is, at this point, the best -- have certain Procs be static (as determined by what their trigger point is).
00:48
<&McMartin>
There is some way the Dungeon gets informed about the total set of monsters, at any rate - either these monster classes somehow register with them or there is a global list somewhere.
00:48
<&Derakon>
There's a global list.
00:48
<&Derakon>
Of potential allocations.
00:49
<&McMartin>
OK.
00:49
<&Derakon>
Then that's used to construct the table of actually allowed allocations.
00:49
<&McMartin>
This proc idea works better if the dungeon has monsters "register" with it.
00:49
<&Derakon>
And then we select from that, and then verify that we actually can do that.
00:49
<&Derakon>
And then the created creature registers with the dungeon.
00:49
<&McMartin>
The thing doing the registering, or being registered, might be MonsterMeta instead of MonsterProper.
00:50
<&Derakon>
Yeah, actual creature creation passes through these layers:
00:50
<&Derakon>
1) Read the data file.
00:50
<&Derakon>
2) Parse JSON structs.
00:51
<&Derakon>
3) Use JSON structs to build CreatureFactory instances, one per "species" of monster (each unique monster is a distinct species, too)
00:51
<&Derakon>
4) CreatureFactories are told to instantiate Creatures (and e.g. at this point roll for HP and so on).
00:51
<&Derakon>
5) Creatures are registered with the game universe.
00:51
<&McMartin>
OK.
00:51
<&Derakon>
So if the Procs are static, then they become attributes of the CreatureFactory instead of the Creature.
00:51
<&McMartin>
Yeah.
00:51
<&McMartin>
That's where they belong.
00:51
<&McMartin>
Though note that if this is all in JSON then you're basically reinventing flags
00:52
<&McMartin>
Albeit flags that can be readily rebound and extended.
00:52
<&Derakon>
Well, for Procs we want to call for creature allocation anyway.
00:52
<&Derakon>
And yes, I'm aware.
00:52
<&Derakon>
The point isn't to do things that flags cannot do, but to do them more flexibly and extensibly.
00:52
<&Derakon>
Someone wants to write a variant, they can pretty much stick to data file edits and creating new Procs and get a lot of new behaviors.
00:53
<&McMartin>
Right.
00:53
<&McMartin>
And if Procs can be externally registered as part of a module init in pyrel, then you're sitting pretty
00:54
<&Derakon>
Each Proc has a "triggerCondition" field which determines when it is called; the main game code checks for valid Procs at appropriate points.
00:55
<&Derakon>
For example, if you attach an "on item use" Proc to an item, then a) the item registers itself as a Usable, thus b) the item shows up when you say "I want to use an item", and c) when it is selected, its use-item Proc is called.
01:06
<&Derakon>
Thanks for the advice, McM.
01:07
<&McMartin>
And yeah, that part seems fine.
01:07
<&McMartin>
np
01:07
<&McMartin>
Do bear in mind that my OO sensibilities are noticably warped, but hey~
01:07
<&Derakon>
OO is not the be-all and end-all of development style. :)
01:07
<&McMartin>
Damn right it's not~
01:07
<&Derakon>
I would describe Pyrel as more data-driven than OO-based at the moment.
01:07
<&Derakon>
Though it does have extensive objects.
01:08
<&McMartin>
For whatever reason I imprinted pretty heavily on functional design styles despite not encountering it until fairly late in my career
01:08
<&McMartin>
Yeah
01:08
<&McMartin>
Data-driven is more often than not OO "turned sideways" but I like it much more.
01:08
<&Derakon>
It certainly makes it easier to tweak how you want things to behave.
01:09
<&Derakon>
Especially when you have large numbers of similar objects.
01:37 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
02:06 * Derakon ponders blowing away his MacPorts installbase and starting over.
02:07
<&Derakon>
I have 147 installed packages right now, but I'm pretty sure most of that is just cruft. And ImageMagick is broken because MacPorts is broken.
02:19
<&Derakon>
Ooooor maybe ImageMagick is just broken period.
02:30 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
02:30 mode/#code [+o himi] by ChanServ
03:05
<&McMartin>
Death to MacPorts, for serious
03:09
<~Vornicus>
Yeah, I found it less painful to build from source.
03:09
<&Derakon>
This conversation feels vaguely familiar, but I can't find it in my logs. Got a recommendation for ways to dodge dependency hell otherwise?
03:09
<&Derakon>
ImageMagick depends on a ridiculous number of things; I'm not gonna try to build them all from source.
03:11
<&McMartin>
Brew is supposed to be A Better MacPorts That Doesn't Recreate The Entire Universe.
03:13
<&Derakon>
Thanks, will give it a shot.
03:14
<&McMartin>
Fair warning: I haven't used it
03:14
<&Derakon>
I wonder if anything other than MacPorts used /opt/local...
03:14
<&Derakon>
Or am I safe in just blowing the entire thing away?
03:14
<&McMartin>
But it's what the Mac guys at work all switched to
03:18
<&Derakon>
"Warning: /Library/Frameworks/Mono.framework detected This can be picked up by CMake's build system and likely cause the build to fail. You may need to move this file out of the way to compile CMake."
03:18
<&Derakon>
...
03:18
<&McMartin>
fut the whuck.
03:19
<&Derakon>
Output from Homebrew's "detect potential problems" mode.
03:19 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
03:20 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
03:20 mode/#code [+o himi] by ChanServ
03:21 Attilla [Obsolete@Nightstar-e1aa90d7.as43234.net] has quit [Ping timeout: 121 seconds]
04:04 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
04:04 mode/#code [+o Vash] by ChanServ
05:30 iospace is now known as iospacedout
05:36
<&McMartin>
Blurgh
05:36
<&McMartin>
Don't want to rewrite this minimax AI in Java
06:24 Kindamoody[zZz] is now known as Kindamoody
06:26 Derakon is now known as Derakon[AFK]
07:09 You're now known as TheWatcher
07:52
< Rhamphoryncus>
WIP: http://i.imgur.com/ifavn.jpg
07:57
<~Vornicus>
Why do your hexagons seem kinda skewed?
07:58
<~Vornicus>
well. stretched?
07:58
< Rhamphoryncus>
I'm not using a proper geodesic way of stretching them
07:58
< Rhamphoryncus>
It's a straight dodecahedron, with the distance from the origin normalized
07:58
<~Vornicus>
oic
07:59
< Rhamphoryncus>
And damnit, my brain just came up with an entirely different approach >.<
08:00
<~Vornicus>
haha
08:00
< Rhamphoryncus>
Take a truncated icosahedron. Normalize the distance from origin. Take your two unique tiles (one hexagon), one pentagon) and generate a random pattern within each
08:00
< Rhamphoryncus>
A tileable random pattern
08:01
<~Vornicus>
Penrose Planet!
08:01
< Rhamphoryncus>
heh
08:01
<~Vornicus>
note: usually you can only fit 12 pents on a sphere
08:02
< Rhamphoryncus>
yes, I don't mean an infinite tiling. I mean a cyclic one, in the truncated icosahedron shape
08:02
< Rhamphoryncus>
Each hex having 3 borders with other hexes and 3 borders with pentagons
08:05
< Rhamphoryncus>
The point, as usual, is to avoid any single heavily distorted point. It'll be a ton of tiny distortions. Actually, it'll be a ton of large distortions, since your tile sizes have to vary to make it work :P
08:06
<~Vornicus>
revenge of the lloyd relaxation algorithm?
08:06
< Rhamphoryncus>
yeah kinda
08:07
< Rhamphoryncus>
But with those tiles to start with I think you'd have better odds of coming up with some procedural looking way to do it that only looks random
08:08
< Rhamphoryncus>
Oh, and unlike an icosahedron there's no tight angles
08:10 You're now known as TheWatcher[afk]
08:10
<~Vornicus>
348 degrees instead of just 300
08:12
< Rhamphoryncus>
Hrm. More that there's two different tiles
08:13
< Rhamphoryncus>
anyway, I think I'll stick to what I have. I'll figure out the proper spacing later
08:14
< Rhamphoryncus>
I wonder, if there a trivial way of doing the spacing?
08:16
< Rhamphoryncus>
maybe.. shifting towards the centroid of the pentagon proportionate to how much you had to shift from the world's origin?
08:19
<~Vornicus>
gnnnn, just do the averaging thing
08:20
< Rhamphoryncus>
hmm?
08:20
<~Vornicus>
When I built mine, I used great circles instead of straight lines to intersect.
08:21
<~Vornicus>
(two points give you a great circle - use the cross product to find the axis of the circle. Then two great circles intersect - use the cross product again to find that point)
08:21
<~Vornicus>
But they don't intersect exactly.
08:22
<~Vornicus>
Or rather, you have three sets of great circles, and each pair of them intersects in a slightly different point.
08:22
<~Vornicus>
So I averaged them. THis is how I got my locations.
08:25
<~Vornicus>
I also made sure that instead of interpolating along the edge of the polyhedron, I interpolated along the great circle between the corners.
08:25
< Rhamphoryncus>
Right now I'm treating each hex as a separate object but eventually I'll stop and densely pack the important bits, generating position on the fly
08:26
< Rhamphoryncus>
So I'll probably just play with ways of shifting the vertices along the surface
09:12 Kindamoody is now known as Kindamoody|breakfast
09:50 Reiver [Reiver@5B433A.3CF6C7.C35802.D79FCD] has joined #code
09:57 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
10:08 Kindamoody|breakfast is now known as Kindamoody
10:09 Attilla [Obsolete@Nightstar-e1aa90d7.as43234.net] has joined #code
10:10 You're now known as TheWatcher
10:22 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:27 You're now known as TheWatcher[d00m]
10:46 Reivdroid [Reiver@5B433A.F67240.463E25.56EF30] has joined #code
10:49 Reiver [Reiver@5B433A.3CF6C7.C35802.D79FCD] has quit [Ping timeout: 121 seconds]
11:13 Nemu [NeophoxProd@Nightstar-cf3aa501.asahi-net.or.jp] has joined #code
11:21 Reivdroid [Reiver@5B433A.F67240.463E25.56EF30] has quit [Operation timed out]
11:21 Reiver [Reiver@5B433A.F67240.463E25.56EF30] has joined #code
11:34 Kindamoody is now known as Kindamoody|Portal2
11:51 You're now known as TheWatcher
11:57 You're now known as TheWatcher[afk]
11:58 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:11 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:11 mode/#code [+o himi] by ChanServ
12:35 You're now known as TheWatcher
12:40 iospacedout is now known as iofficespace
12:51 You're now known as TheWatcher[d00m]
12:58 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
13:19 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
15:12 * iofficespace is going to pull 10 hour days this week so she can take friday off without problem
15:17 Reiver [Reiver@5B433A.F67240.463E25.56EF30] has quit [Ping timeout: 121 seconds]
15:52 You're now known as TheWatcher[afk]
16:48
<&ToxicFrog>
aaaaaaaaaaaaaaaaaaaaa interview in three hours
17:07
<~Vornicus>
aaaaaaaaaaaaaaaaaaaaa
17:10 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Client closed the connection]
17:15
< froztbyte>
google?
17:22 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
17:22 mode/#code [+o Vash] by ChanServ
17:31
<&ToxicFrog>
froztbyte: yep
17:49
< RichyB>
ToxicFrog, good luck.
17:49
< RichyB>
At the moment I find it the proposition that you'll need luck dubious, though.
18:34 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
19:01 Kindamoody|Portal2 is now known as Kindamoody
19:03 jeroid [jerith@687AAB.5E3E50.C294C8.3FFE4A] has joined #code
19:07 Kindamoody is now known as Kindamoody[zZz]
19:26 Attilla_ [Obsolete@Nightstar-eb948e96.as43234.net] has joined #code
19:28 Attilla [Obsolete@Nightstar-e1aa90d7.as43234.net] has quit [Ping timeout: 121 seconds]
19:50
<&ToxicFrog>
aaaaaaa
19:51
<@Tamber>
aaaaaaaaaaaaaaA?
19:53
< jeroid>
bbbbbbbbbbbbb
19:57
< gnolam>
http://www.weebls-stuff.com/toons/aaaaaaaaaaaaahaha/ ?
20:17
< RichyB>
gnolam, perhaps a good ringtone. :)
20:21 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
20:21 mode/#code [+ao Derakon Derakon] by ChanServ
20:24 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
20:31
<&ToxicFrog>
oh god they were meant to call half an hour ago what is happening
20:31 jeroid [jerith@687AAB.5E3E50.C294C8.3FFE4A] has quit [Connection reset by peer]
20:34
<&ToxicFrog>
oh
20:34
<&ToxicFrog>
I am apparently brain-damaged
20:34 * ToxicFrog re-reads the schedule for like the 80th time, notes that the interview is next monday
20:35
<@Tamber>
Too much dancing around, going AAAAAAAA, not enough reading? :p
20:35
< sshine>
ToxicFrog, it's better than figuring out it was *last* monday.
20:35
<&ToxicFrog>
Well, yes
20:41
< sshine>
making sense of webbrowser agent strings may cause confusion. this is chromium on ubuntu: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19
20:42
< sshine>
somehow this reminds me of junk DNA.
20:45
<@TheWatcher[afk]>
Except that there's a good chance bits of junk DNA may have so actual use, wereas useragent strings are nigh useless these days
20:45 You're now known as TheWatcher
20:47
< RichyB>
90% of that cruft is to cope with stupid websites that sniff the user-agent and serve browser-specific content.
20:47
< RichyB>
(In theory.)
20:49
< RichyB>
You'd save about 110 bytes/http request if you set that to something short like "Chromium/18.0.1025.168"
20:49
< RichyB>
I wonder how many websites would actually break?
20:49
< rms>
One too many
20:50
<&ToxicFrog>
^
20:51
<&ToxicFrog>
Sometimes I kind of want to burn the entire web down and replace it with something less terrible.
20:51
<@TheWatcher>
Only sometimes?
20:51
<@TheWatcher>
That's how I am most of the time.
20:51
<&ToxicFrog>
And by "sometimes" I mean "basically all the time"
20:52
< sshine>
I only think of it when I write web pages.
20:52
<@TheWatcher>
Of course, pretty much all my work-related development is web development at the moment, so
20:52
< sshine>
TheWatcher, yes, apparently "an application" nowadays is always a web application.
21:44
<&ToxicFrog>
ok, obnam is a pretty badass backup tool
22:38
<~Vornicus>
how badass is it?
22:45 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
22:45 mode/#code [+o Vash] by ChanServ
22:47 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
23:17 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
23:19 Attilla_ [Obsolete@Nightstar-eb948e96.as43234.net] has quit [Ping timeout: 121 seconds]
23:20 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Client closed the connection]
23:26 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
23:27
<&ToxicFrog>
Vornicus: efficient structure sharing between backup sets rather than storing diffs, client-side encryption and compression, comprehensible UI
23:28
<&ToxicFrog>
,mmmmmmmmmmmmmmmm
23:28
<&ToxicFrog>
Comes with bonus kitten
23:29 Attilla [Obsolete@Nightstar-eb948e96.as43234.net] has joined #code
23:30
<&ToxicFrog>
Vornicus: supports sftp transport for both pull and push, or local backup.
23:31
<&ToxicFrog>
Compared to duplicity, which I was using before, it's a bit faster and a lot more polished and robust.
23:31 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:31 mode/#code [+o himi] by ChanServ
23:32 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
23:32
<&ToxicFrog>
also, I have determined that Dreamhost's backup hosting service is cheaper than using Amazon S3 for storage, which I could swear wasn't the case when I originally looked at it
23:44
<&ToxicFrog>
Also, efficient structure sharing between backups from different clients if they are configured to share a repo.
23:46
<~Vornicus>
Backup tool, plus kitten
23:46
<~Vornicus>
Checkarooni.
23:53 iofficespace is now known as iospace
23:58 Attilla [Obsolete@Nightstar-eb948e96.as43234.net] has quit [Ping timeout: 121 seconds]
--- Log closed Tue Jul 31 00:00:29 2012
code logs -> 2012 -> Mon, 30 Jul 2012< code.20120729.log - code.20120731.log >

[ Latest log file ]