Hey, I'm Elias, I'm thirteen and I work with a Dev. team called Crescent Moon (Aniketh, Ethan, Ayden) and this is our first project. We will be making more games, apps, etc.
This is a really REALLY long game. How much time did it take?
A few suggestions:
Add better input detection (
else: print("That is not a valid input. Please try again.")). Here's what happens right now if something gets typed in wrong:
Traceback (most recent call last):
File "main.py", line 231, in <module>
File "main.py", line 8, in main_1
File "main.py", line 44, in athena
if input_3 == "sleep" or input_3 == "Sleep":
UnboundLocalError: local variable 'input_3' referenced before assignment
You could also use the while loop here. like
while inputX not in ["sleep", "Sleep"]: inputX = input("You board the ship and salute to the captain and he returns the favor. As you board the ship you start to feel tired. Do you go to you're cabin to sleep or do you keep the ship safe while looking out at the scenery. Type 'sleep' to go to you're cabin, or type 'look out' to watch over the ship ----> ").
To speed up the process next time, try using the keyword "in". It's much quicker to type and easier to add more values into. Consult the above tip for more.
You can reassign variables that have already been used, instead of making new ones. Right now, your highest input number is 9.
You won't really need this one right now, but if you want faster processing speeds (important later when you start making larger projects) use the elif keyword when there's multiple possible inputs.
This one only works on repl.it, but here, there's a module called replit that has a thing called "clear" as one of it's commands. This might work in your favor after every step. It really reduces clutter during gameplay.
That's it. Just curious, do your dev members have repl.it accounts? I'd like to know.
I want upvotes so I can go cycling.
Hey! I'm 14! Maybe we can work on some projects together? What language do you and your team use?
Well this was my team’s first game so it is insanely buggy. Look up Lost Droid for the new game I made. CMD took about maybe 8 hours to code. I’m the only one with a repl account. Look up lost droid, Thanks!
@Wassu Well, Lost Droid has a few of the same faults. Look at tip 2, 4, and 5. And maybe 1, because while loops are a lot more efficient. And a new tip! I suggest you use this function in the place of input:
def responce(valid): while True: print("Which option? (Use options for options.) ") way = input("") print("\033[A \033[A") print("\033[A \033[A") if way == "options": for op in valid: print(op) elif way not in valid: print("Invalid option. Please try again.") else: return way
It works well for me.
I want upvotes so I can go cycling!