Share your repls and programming experiences

← Back to all posts
CMD, The Game
h
Wassu (19)

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.

Commentshotnewtop
Wassu (19)

I just forgot to ping you

Wassu (19)

Look at the comment i wrote a minute ago

ebest (624)

@Wassu eh?

I hate looking at inefficient code. That's why I do this.

ebest (624)

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>
    main_1()
    File "main.py", line 8, in main_1
    athena()
    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.

-Ebest

OathOfCode (23)

Hey! I'm 14! Maybe we can work on some projects together? What language do you and your team use?

Wassu (19)

@OathOfCode well, I mainly use python and pygame, but I am semi - experienced with c# and java. If you want I could give you my discord to work on some stuff.

Wassu (19)

@OathOfCode Ill be deleting this soon, my discord is Wassu#8922

Wassu (19)

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!

ebest (624)

@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!

-Ebest

ebest (624)

@ebest And what are your dev teams last names? The names look familiar...

Wassu (19)

@ebest Well the other coder's name is Anniketh, and the plot directers are ethan and ayden

ebest (624)

@Wassu I know the names, I don't know the last names.

Wassu (19)

@ebest Oh Lol we kind of work online so im not sure when I find out i guess ill let you know

katyadee (1193)

Hey Elias! I'd love to learn more about this dev team. Could you share a bit more?

Wassu (19)

@katyadee Oh of course! It consists of 4 people. One plot director, one art director, and two devs. I am one of the devs.

katyadee (1193)

@Wassu Hey- had to remove yr contact info there! Stay safe friend.

Wassu (19)

@katyadee Are you a replit admin? How’d you do that. Thanks I forgot. LOL.