Improve the User Experience
00:00 The final stretch goal is to use emojis or string formatting syntax to make the game output more enjoyable. I’ve been thinking about that quite a bit because this waterfall of yellow text is kind of hard to keep track of.
That looks good for a critical hit. Then here we’ve got the health stats. Let’s put a heart there. What else do we have? Do you want to attack? That sounds good here. So, the
KeyboardInterrupt, I’m kind of giving the user a message of something’s not working out, so I’m just going to put a red X there and then maybe I’ll set info if you really want to leave, and then here we are. So you attack, let’s put a little smiley face here, representing the player. And then when the monster attacks, we put in a—no, not a clap.
01:18 Let’s put in a dragon. That explains why it has so much health. What else do we have? Another invalid action, I’m going to put a red X, and then running away, a little—that sounds good, a little wave. What else do we have?
01:53 What I did is I just added emojis at the beginning of each of those lines to kind of visually help a little bit more in understanding what’s going on. And maybe that’s not enough, but I want to ahead and give it a try.
Restart. Your health. Okay, so that’s already easier for me to understand. Here’s the health stats. That’s good. I attack.
You attacked the monster for 10. Monster attacked for
16. And then we’re back to the health stats.
How does healing look like?
You healed for 30 health! Nice. Attack again. Oh, there you go. The monster’s again just scoring critical hits. This is pretty nice. This is easier for me to read, but what I’m still missing is a space between the different moves, because right now it’s still all mushed together.
I’m going do this at the beginning, after the health stats, I’m going to use the
end keyword of the
print() function, where I can change what a line ends after it prints out, and I’m going to do two newline characters.
This is the first critical hit I think that I scored, but this is much more readable than before. I’m pretty happy with that, actually. Let’s see what happens when I run. Okay,
You ran away. That’s understandable. Start another round. Oh, I accidentally pressed an invalid action. That’s also understandable. Heal.
What else can we try out? Winning or losing? Okay, let’s lose in this round. I’m just going to keep attacking and probably lose. There you go.
You were defeated by the monster! and skull. That looks okay.
Okay, I think I got it. Ka-ching!
You defeated the monster! and I got my prize. Great. So, I didn’t actually change much. All I did was introduce these little emojis at the beginning of each print line, but it really helps in orienting the user on what’s happening, what type of turn is currently happening. Is it your turn?
05:31 Is this is something that the user did? Is it something that the monster did? Is this just some stats at the end of the round? And then also, what’s an invalid action? What’s a win condition? What’s a lose condition?
Become a Member to join the conversation.