On Tue, Sep 12, 2017 at 7:03 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Mon, Sep 11, 2017 at 10:36 AM, ROGER GRAYDON CHRISTMAN <d...@psu.edu> > wrote: >> I would echo the recommendation of teaching something you are already >> familiar with doing. Perhaps you can find a different class hierarchy to >> work >> with. >> >> I remember that the first time I really began to grok OOP was in a >> text-based MUD environment. In the application area, clearly >> everything was an object (sword, bag, apple, etc.) Some objects >> were living (like player charaters and NPCs). Many objects also >> served as containers (bags had contents, rooms had contents, >> players had an inventory). And the polymorphism that came with >> OOP allowed me to even simulate a ship, which was one object >> whose inventory included several rooms, so as the ship moved, >> so did everything on board. >> >> And there was no GUI required for it -- so no issues there. >> >> It's been a couple decades or so, but that interpreted object-oriented >> language LPC might still be out there somewhere. > > There are still plenty of MUDs that use LPC. There is also a > general-purpose language Pike that is descended from LPC.
Yep. I play an LPC MUD that's been running (and commercially viable) for two decades, and I run a few servers built in Pike. And I love that you did the ship as "object with rooms as inventory" - I once did the same kind of thing with a bicycle, making it simultaneously a room and an object. OOP is beautiful. ChrisA -- https://mail.python.org/mailman/listinfo/python-list