Author Topic: 7DRL Failure... 14DRL success! (KleinRL)  (Read 12555 times)

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
7DRL Failure... 14DRL success! (KleinRL)
« on: October 18, 2010, 11:56:41 PM »
Hi everyone,
Two weeks ago I started a 7DRL project. After a week I'd made more progress than ever before on a roguelike (I hadn't completed a roguelike before), but not made a playable game. I decided to try making the project as a 14DRL instead, and the result is KleinRL!

Reasons you should play KleinRL:

* Chainsaws.
* Thievery.
* Knitting.
* Bizarre geometry.
* Dropping pieces of wall in the way of your pursuers.

Download link
The game requires python and curses bindings. The file to run is kleinrl.py, but have a glance at rtfm.txt first. Actually, I'll reproduce it here:
Code: [Select]
To run the game, cd into the kleinrl folder and do:

python kleinrl.py

or:

./run.sh

if you have python and curses working properly, that should work.

kleinRL is set on the surface of a klein bottle,
which is rather different from a torus.
kleinRL requires python and a python curses module.

'd'iggers like to move the walls around; they can cause inconvenience.
'z'ombies just walk around randomly; they're annoying.
'h' is supposed to be running away from you, but can be vicious when cornered.
'B' and 'D' want to kill you!
all of these might have picked up nice equipment from the floor.
equipment is green, consumables are blue.
better equipment will generally have a cooler name.

you can walk with vi keys or number keys. you can only rest with 5.

press 'p<dir>' to 'p'ick up a piece of the wall and do the same again to drop it in an empty space.
press 'w[-](0-9)' to 'w'ear/'w'ield a piece of equipment from inventory or floor (no rings on toes or other silliness)
press 'g(0-9)' to 'g'et an item from the floor (identifier required if there's more than one item)
press 'd[-](0-9)' to 'd'rop an item from inventory or equipment (free action)
press 'e' to list current 'e'quipment
press 'i[-](0-9)' to 'i'nspect items in inventory/equipment. Only really useful in debug.
press 't(0-9)' to 't'ake off equipment
press 'q[-][(0-1)' to 'q'uaff a potion from inventory or floor
press 'r[-][(0-1)' to 'r'ead a scroll from inventory or floor
press 'x<dir>*' to e'x'amine tiles
press '{[-](0-9)' to inscribe an item (overwriting previous inscription)
press '}[-](0-9)' to uninscribe an item from inventory or equipment
press 'P' to pray for potentially useful effects (or a smiting)
press 'Qy' to quit


Advice, comments, criticism, berations welcome (but be gentle, this is my first completed RL)

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #1 on: October 25, 2010, 06:55:29 AM »
Bug reports are also very welcome.

kipar

  • Rogueliker
  • ***
  • Posts: 105
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #2 on: October 26, 2010, 07:09:34 AM »
It is sad that there is no windows port of curses. :(

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #3 on: October 26, 2010, 09:21:49 AM »
wcurses, for instance? I don't have a windows box at the moment, but according to their curses_demos.zip you don't even need to rename curses to wcurses in the source. :)

kipar

  • Rogueliker
  • ***
  • Posts: 105
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #4 on: October 27, 2010, 02:33:03 PM »
Your link seems broken, but I managed to get zip-file using internet archive.
Sadly, the game crashes after run (it displays initialization messages, then open curses box, then dosplay access violation error).

I've found another link with wcurses: http://github.com/adamv/wcurses, but there is only source code. I've also tried unicurses (and renamed curses to unicurses in source code) - but it display strange errors and don't compile.

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #5 on: October 27, 2010, 03:06:49 PM »
so far it seems I and sir_lewk are the only people to have had success running this (it works perfectly on my macbook and the CS department's linux distro). It's a pity my windoze box isn't operational...
Have you tried the downloads at http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses? They're .exe, so presumably they install the module somewhere sensible.

All of the download links I've posted (including the one ending .tar.gz) work fine for me. Is it a 404 error you're getting?

kipar

  • Rogueliker
  • ***
  • Posts: 105
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #6 on: October 28, 2010, 07:06:10 AM »
Your downloads links are ok, the link to wcurses (http://adamv.com/dev/python/curses/) is broken.

I've tried http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses with two versions of python (3.1.2 and 2.7)
3.1 shows syntax error in source file.
2.7 shows runtime error in curses module.
I can post exact errors but i don't think it will help. Someone familiar with python should try to run the game in windows  :)

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #7 on: October 28, 2010, 06:47:40 PM »
I get the following error and cannot run (under Linux):

Code: [Select]
Traceback (most recent call last):
  File "./kleinrl.py", line 1713, in <module>
    curses.wrapper(main)
  File "/usr/lib/python2.6/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "./kleinrl.py", line 1710, in main
    game.main()
  File "./kleinrl.py", line 1703, in main
    while self.game_turn():
  File "./kleinrl.py", line 1595, in game_turn
    interval = self.population[actorID].do_turn(actorID)
  File "./kleinrl.py", line 891, in player_turn
    self.draw_colour(self.population[1].location)
  File "./kleinrl.py", line 1616, in draw_colour
    self.draw_status()
  File "./kleinrl.py", line 1633, in draw_status
    k.mget(self.grid,self.population[1].location).items)+'floor')
_curses.error: addstr() returned ERR

BTW the current version of Hydra Slayer also uses Klein bottle for some of the deep levels (but you were first).

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #8 on: October 28, 2010, 08:17:44 PM »
Thanks for the feedback, Z. You should be able to prevent that error if you make the window at least 27 rows high. If necessary, I can cut two blank lines out of the status display, so that it runs with in an x*25 terminal (x is a bit less than 80). I might have a look at the terminal-resizing function and see how well it behaves.

I just compiled Hydra successfully, I'll try that now :)

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #9 on: October 28, 2010, 09:22:19 PM »
Works now (in one game it crashed, but I have not idea what could cause that). The concept seems interesting, but the game seems extremely hard (the monsters get next to me quickly and I see no method to block them) and I had no chance to explore it well. Maybe selecting a level of difficulty would be a good idea (0 monsters just to learn what the game is about, 1 monster for an easier game)?

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #10 on: October 28, 2010, 09:45:44 PM »
Sounds like a good (and easily implemented) idea, I'll put that on the list of things to change.

I'm winning the game about 30% - 50% of times I play. Unless the baddies find an overpowered weapon or boots, there are a lot of options for escape - speed potions, speed-boosting equipment (which I ought to tone down in the next release) two types of teleport scroll, blocking corridors with wall tiles (using the 'p'ick up /'p'ut down command), and a 'P'ray command that can solve a lot of sticky situations (or make things worse).

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: 7DRL Failure... 14DRL success! (KleinRL)
« Reply #11 on: October 31, 2010, 02:01:00 AM »
KleinRL has just been updated; I've addressed people's issues with difficulty, confusion about corpses, wrong-sized terminals, and changed a few other things. If you were successfully importing curses and then getting a _curses.error, your problem might be fixed.

I am currently running from 20 angry villain tropes in my decaying steel toe capped boots of stomping, wielding a chainsaw of disruption and fearing for my life.
Version 0.2:
kleinrl.zip
kleinrl.tar.gz

Changes since KleinRL-0.1.14DRL:

removed empty lines in status, added complaint about terminal size
changed % to &, made it transparent
added weapon used to attack messages
added an account of things used during the game
changed the puppetmaster's name
randomised the enemies and allowed the player to face 0 - 20 of them
French messages when La Femme Fatale attacks or is attacked :P

EDIT: just fixed the new villains so they have the right number of HP. Redownload if you're one-shotting them.