Programmierkurse für Kinder, Jugendliche und Erwachsene

User Tools

Site Tools


Translations of this page:

contact, imprint
Informationspflicht gemäß Wirtschaftskammer Wien
spielend-programmieren Start Seite

License: CC-By-SA:
Creative Commons Attribution Share Alike Lizenz



On my work for an python rogue-like game pycrawl ( part of my ThePythonGameBook project ) i managed to create another workable demo:

see it on githup: pycrawl-monsterdemo.py

The monsterdemo, while improving the code for the level class, focus on animating Monsters (M). The monsters have a little state machine (moods) and loose energy when moving around too much. If the energy level of each individual monster is too low, it goes to sleep (Z) for a while, until it runs around again. In the animatied gif above, you can see ho the Z is changing into M and vice versa.

On my research for this project, i made a google seach for “python” and “rogue like game” and found this excellent tutorial. The tutorial gave me already valuable insight into room and level creation ( i will have to make a new mapmakingdemo ) and i look forward to play around with the libtcod module. As far as i understand from the tutorial, libtcod does not only provide colored text output for rogue-like games but also many other important features like line-of-sight and field-of-view calculation.

I also feel that it would be a good idea to seperate stackable items ( that can be moved around, like loot, keys, gems, swords etc. ) from Monsters ( who move around self-propelled ) and walls ( non-moving). I have to make an itemdemo next and a levelgeneratordemo.


en/blog/2012/0814_pycrawl_monsterdemo.txt · Last modified: 2017/10/26 20:37 by horst