Python Forum

Full Version: Action rpg written in standard library.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just in case if anyone is interested I'll leave my code and video here..

https://github.com/Ninedeadeyes/7-Dungeons-Deep


https://www.youtube.com/watch?v=Jmmdnoz2X-w
Just a little constructive criticism, I think you should only have the images in one place. Let's say you wanted to change what the player looked like while facing right. That's ".\\art\\heroright.gif", and there's 4 different places that string would need to change.

Instead, what about using a dict:
images = {
    "hero-right": ".\\art\\heroright.gif"
}
Then everywhere you'd use it, it'd be images["hero-right"]. Which is much more descriptive, so it's self-documenting, without needing to just know what an Image2.gif is.