Python Forum
Action rpg written in standard library.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Action rpg written in standard library.
#2
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.
Reply


Messages In This Thread
RE: Action rpg written in standard library. - by nilamo - Feb-20-2020, 08:30 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020