Python Roguelike: Background Issue

644 Views Asked by At

I'm following a tutorial on making a roguelike in python, and it's actually coming along pretty nice. However, I have come to a small graphical issue: for the player and enemies, they all have a black background on them, which I don't want. I've tried changing the background to none anywhere I can, but I can't seem to figure out how to fix it. I'd really appreciate if anyone could help me out with this. Below is a link to an image showing this problem:

Also, if it helps, I'm using notepad++ and libtcod.

Thanks.

2

There are 2 best solutions below

0
On

[SOLVED]

I found that I overlooked one of the parameters in the object.clear() event, and all I had to do was check if the object was visible, and if it has been explored yet to determine which background color to set it to.

Thanks to everyone who replied and gave their input!

1
On

Hmm, you probably need to set the background flag. Or at least give it the proper color. So try to override it.

When you print a character it needs both foreground and background.

In any case you should probably look into object.draw() player.draw()