[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] roguelike question



Just a quick look.
In move_test.py, when you check for action 'd' - are you sure the one tiles bottom is really the same as the other's top - not adjacent?
Perhaps try:
new_tile.rect.top-tile.rect.bottom < 1

On Mon, Oct 4, 2010 at 1:05 PM, Michael Schultz <michael@xxxxxxxxxxxxxxxxxxx> wrote:
Hi, new to the list, but not the language. I'm completely at home with Python :) Right now, I'm coding a roguelike game, and am having trouble getting the map to update changes. I've got movement and collision detection, but for whatever reason, the changes to the map are not being updated.

When the player is up against a "d" tile, and presses the key "d", the "d" should be replaced with a "." tile, but nothing's happening.

Here's the files:

===move_test.py
http://pastebin.com/fmz491K9

===Actions.py
http://pastebin.com/TUm3mv3b

===Terrain.py
http://pastebin.com/SXR8LqyL

===Common.py
http://pastebin.com/YhN2Cszu

===Imp.py
http://pastebin.com/2g4Yz469


I'm pretty sure the problem is in the first two, but I didn't want to miss something.
I know I'm slightly crazy for trying this, but what am I doing wrong?? (Thanks for the help, too!)

~Mike