This is my second risk game, even though it doesn't look like one. I first got to idea from @Name12 's Fight the gods. I then added some risk to it and added some colours
If you don't want to see the demo, read the paragraph below.
- Kronos talks to you in your sleep and tells you that if you defeat all the Olympians, he will make you the second most powerful person in the world (him being the first person).
- You agree to what he says and set on a quest to defeat all the Olympians.
- Thanks to @BobTheTomatoPie for the help with the colours. It really helped me.
- Thanks to @SpaceFire for helping me with the code.
- Thanks to @CoolJames1610 for fixing the error.
- Thanks to @Name12 for the idea of this game.
If you find an error, please tell me. If you want me to collab with me, want me to make a game for you, or have any ideas for the next risk game, text me on discord: VulcanWM#5256
It's best to play in full screen
Such a cool program! Can you break down how the slowprint function works?
from time import sleep def slowprint(text): for x in text: print(x, end='') sys.stdout.flush() sleep(0.07)
How is your function implementing the sleep period exactly? sorry, total beginner.
@VulcanWM ... after importing sys and time
When you defined the function slowprint, which uses the time.slow() function, and sys, which uses the sys.dout.flush() function to make it look animated (and nice).
You called it in each line when you were displaying something (print)
Why? Is it becuz there isn’t any way to call it one, and it’ll apply for the whole program
Amazing! How do the colors on the console work? Do you need OS or sys to do it? And also, is slowprint from os, or sys? I know, lots os and sys...
Thanks, the colours on the console's code:
Green = "\033[0;32m" Orange = "\033[0;33m" Blue = "\033[0;34m" Purple = "\033[0;35m" Cyan = "\033[0;36m" White = "\033[0;37m" black = "\033[0;30m" red = "\033[0;91m" green = "\033[0;92m" yellow = "\033[0;93m" blue = "\033[0;94m" magenta = "\033[0;95m" cyan = "\033[0;96m" white = "\033[0;97m" cyan_back = "\033[0;46m" pink_back = "\033[0;45m" white_back = "\033[0;47m" blue_back = "\033[0;44m" orange_back = "\033[0;43m" green_back = "\033[0;42m" red_back = "\033[0;41m" grey_back = "\033[0;40m" bold = "\033[1m" underline = "\033[4m" italic = "\033[3m" darken = "\033[2m" invisible='\033[08m' reverse='\033[07m' reset='\033[0m'
The code for the slowprint:
import sys from time import sleep def slowprint(text): for x in text: print(x, end='') sys.stdout.flush() sleep(0.07)
Great work, but what’s with the ending? It repeats, do you think you can try to defeat Kronos himself?
The game is superb. But, when the god attacks and player chooses to boost the score of player should not increase , but in the game it is increasing.(a small glitch probably) By the way, thumbs up for the effort.