r/roguelikedev • u/MetalMonkey91 • Jul 28 '25
libtcod (Python 3) *recommended Tutorial code is broken?
See title - I'm at the beginning of part 11 as a newbie. I have SOME coding experience, but not enough to help me solve the issues I'm encountering.
To make certain I didn't screw something up, I even (reluctantly) copied and pasted the files given in the github page linked at the end of part 10 to be certain it was absolutely exact.
When I try to run main py it opens the game but it just hangs until I have to force close.
Looking at the code, my editor is throwing 14 errors, seemingly mostly to do with mouse_location in the input_handlers (which was already a problem starting around part 7 or so, if I mouse over the game window it just crashes outright and has since that point.)
Another issue in the code is parent: Actor evidently overrides 'symbol of the same name in class "BaseComponent"'.
I'm not entirely sure where to go from here, as being a newbie I have virtually no clue how to correct what my editor is telling me is wrong, but there is no updated material to correct where the code went wrong.
I've tried googling the error codes, tried to find solutions but to no avail.
Any help would be suuuuuuper appreciated.
View all comments
Show parent comment
1
u/MetalMonkey91 Jul 28 '25
Here is the error it is showing me for parent: Actor:
"Parent overrides symbol of same name in class "BaseComponent"
Variable is mutable so its type is invariant
Override type "Actor" is not the same as base type "Entity"