Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Oogue: Object Oriented Rogue (dead end prototype)  (Read 701 times)

schlake

  • Bay Watcher
    • View Profile
Oogue: Object Oriented Rogue (dead end prototype)
« on: December 01, 2014, 03:41:30 pm »

Back in the mid 1980s I sent a SASE to a man in California for a copy of UMORIA source on the small 5.25 inch floppies so I could play the game on my Tandy PC compatible.  Soon I'd acquired other games: ROGUE, LARN, OMEGA, HACK, NETHACK, and eventually even ANGBAND.  Those were some glorious games.  But even before that, I'd cut my teeth on ADVEN, at the age of 4, on a DEC-10.  TELENGARD holds a dear space in my heart.  I could probably still find my away around the dungeon today if I was suddenly forced into it.  And then the other games.  Games like ASYLUM and ASYLUM II, crushingly hard graphical dungeon crawls set in an asylum filled the puzzles.  And then the text adventures, from INFOCOM and others.  One puzzle in one of the ZORKs stumped me.  It stumped me hard.  Then, in college, taking a junior level abstract math class we called Funny Math, because it bore no resemblance to math or reality, that failed puzzle came back.  I had to take the class twice, but I passed the second time, and so in theory I'm good enough at partitioning to solve that puzzle now.

Before I'd even heard of Dwarf Fortress I started work on a tiny little example adventure game.  Something that reminded me of the good old days.  The modern complexity of games like Nethack and some of the more bizarre Angband varients is deeply inspiring.  My intent was to make something object oriented that was easily extensible and played a roguelike game.  Originally it was played via a browser with the code running on the server passing data through form attachments.  It worked for quite a while on the simple stuff.  Once the map got big, and the game more complex, it started to bog down too much.  So I migrated the game to a python wx widget.  I never really understood wx, so it doesn't work well.  And as I tried to flesh out my prototype I realized I'd made some terrible decisions in the long ago time when I had started writing it.  So I mostly abandoned it and end never moved on to anything new.

In general, this game is about ten years old from first code until now.  I hadn't touched it in a couple of years, but playing Dwarf Fortress made me miss it.  It made me think I need to work on it again.  I wrote a quick text-based ui that uses the "clear" command to update the screen.  It works about as well as the wx panel.  The ui was only something I made to test ideas in the code.

As for implementation, there is a map.  Multi-level.  Everything in the dungeon was put in as part of testing a concept.  There were some hilarious bugs along the way.  When I first implemented the hookers a simple mistake in their ai() method had them attempting to purchase themselves, but the failure messages were incorrectly being sent to the player object instead of to themselves.  I was quite baffled at what was going on when it first happened.

As it stands, the most interesting thing you can do is hire one of the expensive prostitutes.  You will probably never find enough money laying around to collect it by simple chance, which means you need to rob the bank.  Robbing the bank requires skills in acrobatics, which are easy to come by if you practice them.  The harder part is gaining access to the sewer shaft behind the vault that lets you bypass the looked door.  That might require a very long trudge down a very long pointless corridor unless you can find clues that might lead you to a simpler route.  Also, they are very honorable prostitutes.  If they do leave you unconsious in a sewer, they won't have taken any of your money.  If you don't figure the bank out, and want to try and just get by with finding copper coins, there is a really cheap prostitute.  Also, just so you know, some prostitutes are shy, and some are exhibitionists.  They adjust their prices based on how private things are.

I'm posting this here because, looking at other posts, I suspect you people might really enjoy taking a five or ten minute break to give it a try.  It's all in python, so you can cheat if you read the code.  But cheating is wrong, so you won't do that, right?

The zipfile is at : https://infohost.nmt.edu/~schlake/games/oogue/oogue.zip

To run it you need python, and possibly wx.  The file text.py assumes you have a very tell terminal window and spits out a very primitive display.

If you have wx, and want to use the gui, then use panel.py.  It's a little flakey, so be careful not to try and click too fast.  If you want to use the z++ and z-- look-around feature in the wx gui you might need to change the parameters of mapClass().getMap1() in game.py.

The main problem that made me stop work was deciding I had done too many special cases for things near other things, and I hadn't planned in any way of limiting things looking for other things.  As it stands, every npc has their ai() called every turn, even though none of them really need to.  One two npcs actually move, and if no one is there to watch them move, then what's the point of them moving?

Anyway, I think I've rambled long enough.  Let me know if you tried it, and liked it.

Also, if you're paranoid and don't want to download a strange zip, just chop that off the URL and you will see the bare directory with all the individual .py files in it.  You will need game.py and either panel.py or text.py to play.
Logged