From 8ad5c550be18a107aa1f50662a318756661ca9d7 Mon Sep 17 00:00:00 2001 From: dragoncoder047 <101021094+dragoncoder047@users.noreply.github.com> Date: Thu, 2 May 2024 17:14:35 +0000 Subject: [PATCH] new post --- .../airdrop-for-non-apple-users/index.html | 2 +- docs/2022/lisp-practice/index.html | 2 +- docs/2022/pyodide-issues/index.html | 2 +- .../a-very-confusing-data-model/index.html | 2 +- docs/2023/in-search-of-a-brain/index.html | 2 +- docs/2023/its-september/index.html | 2 +- .../index.html | 2 +- docs/2023/schemascii-0/index.html | 2 +- docs/2023/schemascii-1/index.html | 2 +- docs/2023/zero-thickness-tree/index.html | 2 +- docs/2024/a-hash-mapped-mess/index.html | 5 + .../perhaps-it-was-too-complicated/index.html | 158 ++++++++++++++++ .../abbreviations-in-context/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- docs/_draft/online-quackery/index.html | 2 +- docs/archives/index.html | 2 + docs/index.html | 24 +-- docs/page2/index.html | 24 +-- docs/page3/index.html | 24 +-- docs/page4/index.html | 26 +-- docs/page5/index.html | 56 ++---- docs/page6/index.html | 168 ++++++++++++++++++ docs/tag/game-design/index.html | 10 ++ docs/tag/programming/index.html | 20 +-- docs/tag/programming/page2/index.html | 20 +-- docs/tag/programming/page3/index.html | 24 ++- docs/tag/programming/page4/index.html | 14 ++ docs/tag/python/index.html | 10 ++ docs/tags/index.html | 6 +- markdown/tree.md | 30 ++++ 31 files changed, 506 insertions(+), 143 deletions(-) create mode 100644 docs/2024/perhaps-it-was-too-complicated/index.html create mode 100644 docs/page6/index.html create mode 100644 markdown/tree.md diff --git a/docs/2022/airdrop-for-non-apple-users/index.html b/docs/2022/airdrop-for-non-apple-users/index.html index 442e522..61cc90c 100644 --- a/docs/2022/airdrop-for-non-apple-users/index.html +++ b/docs/2022/airdrop-for-non-apple-users/index.html @@ -100,11 +100,11 @@

Perhaps It Was Too Complicated
  • Zero-Thickness Tree
  • PICKLE Has Regular Expressions, Apparently
  • A Very Confusing Data Model
  • Schemascii ± 0
  • -
  • Schemascii ± 1
  • + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Patrick the purple dragon

    dragoncoder047’s blog

    random thoughts about nonrandom things

    + +
    +
    +

    Perhaps It Was Too Complicated

    + +
    + ← Previous: + + A Hash-Mapped Mess + + +
    + +

    I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make sense to put the apple as a child object of the refrigerator, the actual implementation would just store three objects in a flat list: the apple, the fridge, and a relation object specifying the apple is inside the fridge.

    +

    It turns out, that was a little difficult to implement. I may go back to it, but for now, my implementation does actually place the objects in a tree structure, with the fridge pointing directly to the apple as a contained object. Except in the current implementation, the apple also holds a pointer to the fridge as its parent object – when the player takes the apple from the fridge, this enables the apple to be easily made a child object of the player only, and not both the player and the fridge at the same time (which wouldn’t make much sense). Since the apple has a non-None parent, before the apple’s parent is set to the player, the apple’s parent (i.e. the fridge) has the apple removed from its child object lists, ensuring the apple is only child of one thing at once.

    +

    I sorted this out, then started follwing Inform 7’s Standard Rules to implement the typical physics of interactive fiction. After looking at how Inform has the runtime system organized, I figured out that there was some duplication of things. For example, Inform separates different things being done into two basic categores – “activities” and “actions”. I’m not entirely sure what the difference is, even after reading the documentation. But here’s a good example I came up with that demonstrates one of each:

    +
    [This is a rule for the "printing-the-name-of activity"]
    +Before printing the name of an edible thing:
    +    say "[one of]yummy[or]scrumptious[or]delicious[or]tasty[or]delectable[at random] "
    +
    +[This is a rule for the "opening action"]
    +Before opening an interdimensional chest (called C):
    +    repeat with D running through all interdimensional chests in the world:
    +        if D is not C, now every thing in D is in C.
    +

    The headers of the rules, which specify when the rule runs, look very similar. They both filter for a specific type of object. They both filter for a specific thing happening in the turn cycle. They both happen before the rest of the rule runs. Why should one be an “action” and the other an “activity”? I really don’t know.

    +

    I simplified both “actions” and “activities” into one construct: “events”. Every object can have event handlers attached to it, which function as the rules. When the action or activity happens, all the event handlers for the relevant objects are invoked, in order, until either one of the handlers cancels the whole action, or all handlers have been run.

    +

    The next thing I revised – from both my previous two posts on this, as well as Inform’s Standard Rules – is that not every object has every possible attribute, such as having a capacity, or a luminosity, or anything else that differentiates a particular “type” of object from another. These are added by giving the game objects “traits”.

    +

    As of right now, 202 out of the 373 lines in thing.py deal with managing traits on game objects. Most of those lines implement two key characteristics of traits: there can only be one of each trait on a particular object, and some traits can imply other traits – so I have to do dependency analysis to figure out what has been added and what needs to be added. Then, since the “core” functionality is implemented by traits, there are a lot of aliases and attribute interception going on to automatically translate properties into trait lookup. It’s a bit of a mess right now, and at any rate it’s useless until I actually implement the rest of the library!

    +

    I suppose the lesson to be learned here is that of Occam’s razor: that is, if it looks to be too complicated for what it’s doing, it probably is.

    +
    +

    Related Posts

    + + +
    +
    + +
    + +
    +
    + + + \ No newline at end of file diff --git a/docs/_draft/abbreviations-in-context/index.html b/docs/_draft/abbreviations-in-context/index.html index 31461a2..cc2484e 100644 --- a/docs/_draft/abbreviations-in-context/index.html +++ b/docs/_draft/abbreviations-in-context/index.html @@ -137,11 +137,11 @@

    Perhaps It Was Too Complicated
  • Zero-Thickness Tree
  • PICKLE Has Regular Expressions, Apparently
  • A Very Confusing Data Model
  • Schemascii ± 0
  • -
  • Schemascii ± 1
  • diff --git a/docs/_draft/babys-first-regular-expression-engine/index.html b/docs/_draft/babys-first-regular-expression-engine/index.html index a6dc6f5..ff67acc 100644 --- a/docs/_draft/babys-first-regular-expression-engine/index.html +++ b/docs/_draft/babys-first-regular-expression-engine/index.html @@ -181,9 +181,9 @@

    Manual Memory Management Madness
  • Lisp Practice
  • +
  • Perhaps It Was Too Complicated
  • A Hash-Mapped Mess
  • The Lesser of Two Evils
  • -
  • Order Up
  • diff --git a/docs/_draft/generalized-wire-cellular-automata/index.html b/docs/_draft/generalized-wire-cellular-automata/index.html index 72cf782..41351b1 100644 --- a/docs/_draft/generalized-wire-cellular-automata/index.html +++ b/docs/_draft/generalized-wire-cellular-automata/index.html @@ -137,9 +137,9 @@

    Langton's Ant Music
  • Wireworld++
  • +
  • Perhaps It Was Too Complicated
  • A Hash-Mapped Mess
  • The Lesser of Two Evils
  • -
  • Order Up
  • diff --git a/docs/_draft/online-quackery/index.html b/docs/_draft/online-quackery/index.html index f314413..5af5a8c 100644 --- a/docs/_draft/online-quackery/index.html +++ b/docs/_draft/online-quackery/index.html @@ -91,11 +91,11 @@

    Perhaps It Was Too Complicated
  • Zero-Thickness Tree
  • PICKLE Has Regular Expressions, Apparently
  • A Very Confusing Data Model
  • Schemascii ± 0
  • -
  • Schemascii ± 1
  • diff --git a/docs/archives/index.html b/docs/archives/index.html index ca9947b..0c9fc5a 100644 --- a/docs/archives/index.html +++ b/docs/archives/index.html @@ -53,6 +53,8 @@

    Archives for dragoncoder047’s blog

    +
    Wed 01 May 2024
    +
    Perhaps It Was Too Complicated
    Fri 05 April 2024
    A Hash-Mapped Mess
    Tue 12 March 2024
    diff --git a/docs/index.html b/docs/index.html index b911eb0..01740fd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -96,6 +96,16 @@

    Recent articles...

    +

    Perhaps It Was Too Complicated

    +
    + +
    By + dragoncoder047 +
    +
    +

    I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make …

    +
    +

    A Hash-Mapped Mess

    @@ -185,20 +195,10 @@

    PICKLE Has Regular Expressions, Apparently

    -
    - -
    By - dragoncoder047 -
    -
    -

    I worked for a while last week on the PICKLE implementation in Python. As I no longer have to work on the garbage collector, after I wrote a little “glue code” I immediately dove into the core functionality of PICKLE: the pattern-matching engine. Once I get the algorithm down, I …

    -

    - Page 1 of 5 + Page 1 of 6 Next> - Last>> + Last>>

    diff --git a/docs/page2/index.html b/docs/page2/index.html index 5041d0f..3e1f0da 100644 --- a/docs/page2/index.html +++ b/docs/page2/index.html @@ -96,6 +96,16 @@

    Recent articles...

    +

    PICKLE Has Regular Expressions, Apparently

    +
    + +
    By + dragoncoder047 +
    +
    +

    I worked for a while last week on the PICKLE implementation in Python. As I no longer have to work on the garbage collector, after I wrote a little “glue code” I immediately dove into the core functionality of PICKLE: the pattern-matching engine. Once I get the algorithm down, I …

    +
    +

    Error: out of memory

    @@ -188,21 +198,11 @@

    Pickles!

    -
    - -
    By - dragoncoder047 -
    -
    -

    I’ve been playing around a little bit with LIL on my ESP32 arduino. It works, but there are a few things I don’t like. LIL isn’t object-oriented by default, so I can’t do a lot of what I am used to writing code in Javascript and …

    -

    <<First - Page 2 of 5 + Page 2 of 6 Next> - Last>> + Last>>

    diff --git a/docs/page3/index.html b/docs/page3/index.html index cb57da2..1b122cf 100644 --- a/docs/page3/index.html +++ b/docs/page3/index.html @@ -96,6 +96,16 @@

    Recent articles...

    +

    Pickles!

    +
    + +
    By + dragoncoder047 +
    +
    +

    I’ve been playing around a little bit with LIL on my ESP32 arduino. It works, but there are a few things I don’t like. LIL isn’t object-oriented by default, so I can’t do a lot of what I am used to writing code in Javascript and …

    +
    +

    Schemascii ± 0

    @@ -194,22 +204,12 @@

    TEHSSL

    -
    - -
    By - dragoncoder047 -
    -
    -

    I started writing a new programming language, TEHSSL, a few days ago. Starting from scratch (again!) wasn’t easy, and I’m nowhere near done yet. I have got two things working so far: the garbage collector, and the tokenizer. I have no idea how to handle the glue in …

    -

    <<First <Previous - Page 3 of 5 + Page 3 of 6 Next> - Last>> + Last>>

    diff --git a/docs/page4/index.html b/docs/page4/index.html index dc97fe5..9cd2f4e 100644 --- a/docs/page4/index.html +++ b/docs/page4/index.html @@ -96,6 +96,16 @@

    Recent articles...

    +

    TEHSSL

    +
    + +
    By + dragoncoder047 +
    +
    +

    I started writing a new programming language, TEHSSL, a few days ago. Starting from scratch (again!) wasn’t easy, and I’m nowhere near done yet. I have got two things working so far: the garbage collector, and the tokenizer. I have no idea how to handle the glue in …

    +
    +

    Some Unrelated Ideas

    @@ -194,22 +204,12 @@

    conwaylife.com forums because I am interested in cellular automata. I find watching the mechanisms mesmerizing, and building them exciting.

    I also have an interest in music, and so a year or two ago I tried to generate music from cellular automata. I used …

    -
    -

    Gah... I broke it!

    -
    - -
    By - dragoncoder047 -
    -
    -

    Last time I had just announced that Phoo was finished. Well, it’s still finished — except for the fact that the online console no longer works. I tried porting the shell code to Phoo, but that ended up breaking the shell!

    -

    It was pretty much a line-for-line translation, so I …

    -

    <<First <Previous - Page 4 of 5 - Last>> + Page 4 of 6 + Next> + Last>>

    diff --git a/docs/page5/index.html b/docs/page5/index.html index af10c8e..b8ccb46 100644 --- a/docs/page5/index.html +++ b/docs/page5/index.html @@ -96,6 +96,17 @@

    Recent articles...

    +

    Gah... I broke it!

    +
    + +
    By + dragoncoder047 +
    +
    +

    Last time I had just announced that Phoo was finished. Well, it’s still finished — except for the fact that the online console no longer works. I tried porting the shell code to Phoo, but that ended up breaking the shell!

    +

    It was pretty much a line-for-line translation, so I …

    +
    +

    Phoo is (mostly) finished

    @@ -194,52 +205,11 @@

    Terminal Troubles

    -
    - -
    By - dragoncoder047 -
    -
    -

    I have finally gotten to the point in Phoo’s development that I am ready to set up the web interface.

    -

    I chose xterm.js for the terminal interface because I intend for Phoo to be able to be run in Nodejs as well as in the browser, but I …

    -
    -
    -

    How I came up with Phoo

    -
    - -
    By - dragoncoder047 -
    -
    -

    Several moths ago I stumbled upon Gordon Charlton’s Quackery language while paroosing Github for something. Usually I don’t pay much attention to obviously irrelevant search results, but this one seemed worth a look. I found Quackery to be a simple stack-based semi-compiled language that makes infrequent use of …

    -
    -
    -
    -

    Updating Python

    -
    - -
    By - dragoncoder047 -
    -
    -

    After I bought myself my Raspberry Pi, I soon figured out that the only version of Python available on the Debian package repositories was 3.7.2, but as of when I wrote this it is already on 3.9.7. So, I was forced to compile from source.

    -

    The …

    -

    <<First <Previous - Page 5 of 5 + Page 5 of 6 + Last>>

    diff --git a/docs/page6/index.html b/docs/page6/index.html new file mode 100644 index 0000000..66182a0 --- /dev/null +++ b/docs/page6/index.html @@ -0,0 +1,168 @@ + + + + + dragoncoder047’s blog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Patrick the purple dragon

    dragoncoder047’s blog

    random thoughts about nonrandom things

    + +
    +
    +

    Recent articles...

    + +
    +

    Terminal Troubles

    +
    + +
    By + dragoncoder047 +
    +
    +

    I have finally gotten to the point in Phoo’s development that I am ready to set up the web interface.

    +

    I chose xterm.js for the terminal interface because I intend for Phoo to be able to be run in Nodejs as well as in the browser, but I …

    +
    +
    +

    How I came up with Phoo

    +
    + +
    By + dragoncoder047 +
    +
    +

    Several moths ago I stumbled upon Gordon Charlton’s Quackery language while paroosing Github for something. Usually I don’t pay much attention to obviously irrelevant search results, but this one seemed worth a look. I found Quackery to be a simple stack-based semi-compiled language that makes infrequent use of …

    +
    +
    +
    +

    Updating Python

    +
    + +
    By + dragoncoder047 +
    +
    +

    After I bought myself my Raspberry Pi, I soon figured out that the only version of Python available on the Debian package repositories was 3.7.2, but as of when I wrote this it is already on 3.9.7. So, I was forced to compile from source.

    +

    The …

    +
    +

    + <<First + <Previous + Page 6 of 6 +

    +
    +
    + +
    + +
    +
    + + + \ No newline at end of file diff --git a/docs/tag/game-design/index.html b/docs/tag/game-design/index.html index 015dfb9..ca990b2 100644 --- a/docs/tag/game-design/index.html +++ b/docs/tag/game-design/index.html @@ -96,6 +96,16 @@

    Articles tagged with game-design

    +

    Perhaps It Was Too Complicated

    +
    + +
    By + dragoncoder047 +
    +
    +

    I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make …

    +
    +

    Zero-Thickness Tree

    diff --git a/docs/tag/programming/index.html b/docs/tag/programming/index.html index 6140422..f211e1a 100644 --- a/docs/tag/programming/index.html +++ b/docs/tag/programming/index.html @@ -96,6 +96,16 @@

    Articles tagged with programming

    +

    Perhaps It Was Too Complicated

    +
    + +
    By + dragoncoder047 +
    +
    +

    I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make …

    +
    +

    A Hash-Mapped Mess

    @@ -185,16 +195,6 @@

    Error: out of memory

    -
    - -
    By - dragoncoder047 -
    -
    -

    I’ve been doing a little bit of everything lately. I’ve done a little work on PICKLE, trying to implement it first in Python so I don’t have to worry about the garbage collector. (The pattern-matching code is extremely complicated and screwed with my brain until I realized …

    -

    Page 1 of 4 Next> diff --git a/docs/tag/programming/page2/index.html b/docs/tag/programming/page2/index.html index ee14527..f22c86e 100644 --- a/docs/tag/programming/page2/index.html +++ b/docs/tag/programming/page2/index.html @@ -96,6 +96,16 @@

    Articles tagged with programming

    +

    Error: out of memory

    +
    + +
    By + dragoncoder047 +
    +
    +

    I’ve been doing a little bit of everything lately. I’ve done a little work on PICKLE, trying to implement it first in Python so I don’t have to worry about the garbage collector. (The pattern-matching code is extremely complicated and screwed with my brain until I realized …

    +
    +

    Powerful PICKLE Pattern Matching

    @@ -188,16 +198,6 @@

    LIL, written by Kostas Michalopoulos. It’s a lot like Tcl (but not quite), and it has a simple to use C API so I can add custom …

    -
    -

    Systems Tested

    -
    - -
    By - dragoncoder047 -
    -
    -

    Over winter break I was able to get some more progress done building circuits to get closer to an upgrade of my old, broken Roboraptor. There are a zillion different components to this project, and I wanted to test each separately to make sure they work before I make a …

    -

    <<First Page 2 of 4 diff --git a/docs/tag/programming/page3/index.html b/docs/tag/programming/page3/index.html index 1b94b39..8436d8a 100644 --- a/docs/tag/programming/page3/index.html +++ b/docs/tag/programming/page3/index.html @@ -96,6 +96,16 @@

    Articles tagged with programming

    +

    Systems Tested

    +
    + +
    By + dragoncoder047 +
    +
    +

    Over winter break I was able to get some more progress done building circuits to get closer to an upgrade of my old, broken Roboraptor. There are a zillion different components to this project, and I wanted to test each separately to make sure they work before I make a …

    +
    +

    Debugger, Almost

    @@ -193,20 +203,6 @@

    Two Down, A Zillion More To Go

    -
    - -
    By - dragoncoder047 -
    -
    -

    I have finally written code that actually compiled and ran on the little ESP32 board I bought, and I hate the blasted thing already.

    -

    For starters, the process is slow, annoying, and tedious:

    -
      -
    1. I click UPLOAD, and the Arduino IDE begins compiling by … dumping preferences.
    2. -
    3. It then has to shuffle …
    -

    <<First <Previous diff --git a/docs/tag/programming/page4/index.html b/docs/tag/programming/page4/index.html index e1b1d5b..872e103 100644 --- a/docs/tag/programming/page4/index.html +++ b/docs/tag/programming/page4/index.html @@ -96,6 +96,20 @@

    Articles tagged with programming

    +

    Two Down, A Zillion More To Go

    +
    + +
    By + dragoncoder047 +
    +
    +

    I have finally written code that actually compiled and ran on the little ESP32 board I bought, and I hate the blasted thing already.

    +

    For starters, the process is slow, annoying, and tedious:

    +
      +
    1. I click UPLOAD, and the Arduino IDE begins compiling by … dumping preferences.
    2. +
    3. It then has to shuffle …
    +
    +

    Langton's Ant Music

    diff --git a/docs/tag/python/index.html b/docs/tag/python/index.html index a52272f..36e27cc 100644 --- a/docs/tag/python/index.html +++ b/docs/tag/python/index.html @@ -96,6 +96,16 @@

    Articles tagged with python

    +

    Perhaps It Was Too Complicated

    +
    + +
    By + dragoncoder047 +
    +
    +

    I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make …

    +
    +

    Zero-Thickness Tree

    diff --git a/docs/tags/index.html b/docs/tags/index.html index 273bfdb..79acb90 100644 --- a/docs/tags/index.html +++ b/docs/tags/index.html @@ -58,15 +58,15 @@

    Tags for dragoncoder047’s blog

  • cellular-automata (2)
  • css (1)
  • electronics (11)
  • -
  • game-design (4)
  • +
  • game-design (5)
  • garbage-collector (3)
  • javascript (10)
  • language-design (14)
  • lisp (2)
  • machine-learning (1)
  • phoo (9)
  • -
  • programming (39)
  • -
  • python (8)
  • +
  • programming (40)
  • +
  • python (9)
  • reverse-engineering (5)
  • robotics (1)
  • youtube (2)
  • diff --git a/markdown/tree.md b/markdown/tree.md new file mode 100644 index 0000000..d60c51e --- /dev/null +++ b/markdown/tree.md @@ -0,0 +1,30 @@ +Title: Perhaps It Was Too Complicated +Date: 2024-05-01 +Tags: programming, python, game-design + +I guess I lied. About five months ago, I posted some thoughts about an upcoming Python interactive fiction engine, where the world model is not actually a tree, but simulated as such by relations. For example, there could be an apple inside of a refrigerator, and while it would make sense to put the apple as a child object of the refrigerator, the actual implementation would just store three objects in a flat list: the apple, the fridge, and a relation object specifying the apple is inside the fridge. + +It turns out, that was a little difficult to implement. I may go back to it, but for now, my implementation does actually place the objects in a tree structure, with the fridge pointing directly to the apple as a contained object. Except in the current implementation, the apple also holds a pointer to the fridge as its parent object -- when the player takes the apple from the fridge, this enables the apple to be easily made a child object of the player only, and not both the player and the fridge at the same time (which wouldn't make much sense). Since the apple has a non-`:::py3 None` parent, before the apple's parent is set to the player, the apple's parent (i.e. the fridge) has the apple removed from its child object lists, ensuring the apple is only child of one thing at once. + +I sorted this out, then started follwing [Inform 7's Standard Rules](https://zedlopez.github.io/standard_rules/) to implement the typical physics of interactive fiction. After looking at how Inform has the runtime system organized, I figured out that there was some duplication of things. For example, Inform separates different things being done into two basic categores -- "activities" and "actions". I'm not entirely sure what the difference is, even after reading the documentation. But here's a good example I came up with that demonstrates one of each: + +```inform7 +[This is a rule for the "printing-the-name-of activity"] +Before printing the name of an edible thing: + say "[one of]yummy[or]scrumptious[or]delicious[or]tasty[or]delectable[at random] " + +[This is a rule for the "opening action"] +Before opening an interdimensional chest (called C): + repeat with D running through all interdimensional chests in the world: + if D is not C, now every thing in D is in C. +``` + +The headers of the rules, which specify when the rule runs, look very similar. They both filter for a specific type of object. They both filter for a specific thing happening in the turn cycle. They both happen before the rest of the rule runs. Why should one be an "action" and the other an "activity"? I really don't know. + +I simplified both "actions" and "activities" into one construct: "events". Every object can have event handlers attached to it, which function as the rules. When the action or activity happens, all the event handlers for the relevant objects are invoked, in order, until either one of the handlers cancels the whole action, or all handlers have been run. + +The next thing I revised -- from both my previous two posts on this, as well as Inform's Standard Rules -- is that not every object has every possible attribute, such as having a capacity, or a luminosity, or anything else that differentiates a particular "type" of object from another. These are added by giving the game objects "traits". + +As of right now, 202 out of the 373 lines in `thing.py` deal with managing traits on game objects. Most of those lines implement two key characteristics of traits: there can only be one of each trait on a particular object, and some traits can imply other traits -- so I have to do dependency analysis to figure out what has been added and what needs to be added. Then, since the "core" functionality is implemented by traits, there are a lot of aliases and attribute interception going on to automatically translate properties into trait lookup. It's a bit of a mess right now, and at any rate it's useless until I actually implement the rest of the library! + +I suppose the lesson to be learned here is that of Occam's razor: that is, if it looks to be too complicated for what it's doing, it probably is.