Share your repls and programming experiences

← Back to all posts
Adventure Game!
Jacksontrex (67)

have you ever wanted to kill a dragon, well you can now... kind of... I guess

Comments
hotnewtop
FloCal35 (366)

Nice game, I have a few suggestions though.

  • Use .lower() at the end out your word input statements. That way, it doesn't matter if the user "yes","YES","YeS",or "yEs"
  • Using line spacing to make it clearer (either using \n in your print statements or adding print("")
SamuelSliffe (1)

Pee Pee Poo Poo Check ?

qwertyuiop1111 (10)

I'm making a game similar, can you help me on my game? I'm new at Python.

brendanryba1 (1)

im a co creator of this he asked me to ask you to invite him to your game as he can not talk :)@qwertyuiop1111

qwertyuiop1111 (10)

@brendanryba1 Thank you kind sir. Tell thanks to the main creator.

brendanryba1 (1)

and if you need extra set of hands im here :)@qwertyuiop1111

qwertyuiop1111 (10)

@brendanryba1
Please don't forget to tell Jackson my discord. Its qwertyuiop#8145, and you can friend me too :)

brendanryba1 (1)

i don't know if he has discord but i could ask and [email protected]

TheRealJarTroll (0)

@brendanryba1
I love this. It's great and I need to use some of your code. I'm a noob and I have a massive project from my learning institute which if I don't do, there will be no more proof that I've been in any school for the past 9 years. So I need to take some of your code and reshape to mine. By that, I mean I'm going to leave your defs and your clear()s but change virtually everything else. I'd like to know if that's okay. He'll get his due credit. Is that okay?

TheRealJarTroll (0)

@brendanryba1 Thanks a lot! I can't describe how relieved I feel seeing that.

PyCoder01 (80)

Terminal games are a waste of time. Try using pygame

HYPR (8)

@PyCoder01 No need to be such a downer >:(

2plus2is4hoi (85)

@HYPR if you wanna clear the terminal, import replit as repl
then use repl.clear()

SqueezyS (35)

@2plus2is4hoi there are also some vanilla ways of doing that, such as making a function

from os import system, name 
  
# import sleep to show output for some time period 
from time import sleep 
  
# define our clear function 
def clear(): 
  
    # for windows 
    if name == 'nt': 
        _ = system('cls') 
  
    # for mac and linux(here, os.name is 'posix') 
    else: 
        _ = system('clear') 
  
# print out some text 
print('hello geeks\n'*10) 
  
# sleep for 2 seconds after printing output 
sleep(2) 
  
# now call function we defined above 
clear() 
PyCoder01 (80)

@HYPR I'm not a downer. I'm suggesting something LOL.

PyCoder01 (80)

@SqueezyS The most basic way to clear is-
from os import system
#Command to clear screen
system('clear')

SqueezyS (35)

@PyCoder01

Right, the one i showed you was meant to be for both windows and other platforms

SqueezyS (35)

@PyCoder01

yes, i know that. I was saying that the example was for all operating systems that use a command prompt or a form of bash

PyCoder01 (80)

@SqueezyS like windows, linux, macos

mesquite2234 (258)

@PyCoder01 ACTUALLY the most basic way is:

print('\n' * 1000)
PyCoder01 (80)

@TommyVictory lol no dum dum. If you do that your thing will print at the bottom.

PyCoder01 (80)

@TommyVictory and replit runs not linux not windows LOL.

CodingRedpanda (167)

@TommyVictory

ACTUALLY the most basic way is:
print('\n' * 1000)

haha, (no os) (still not so basic tho):

import sys
import time

def clear():

    sys.stdout.write('\x1b[1A')

    sys.stdout.write('\x1b[2K')


########## FOR DEMO ################
if __name__ == "__main__":
    print("this line will be cleared after 2 seconds")
    time.sleep(2)
    clear()
CodingRedpanda (167)

@PyCoder01
i personally think this is the most basic way to clear the console:
@TommyVictory

import time
print("hi")
time.sleep(1)
print('\033c')
Whippingdot (419)

I used to have a way to clear the screen but I forgot what it was... Maybe

import os
os.clear()

?? Also if you print 100 lines on slow systems that could crash the system...I think @ridark

Whippingdot (419)

I remember what it was, you can just type exit() and that works... at least for me. @ridark

CodingRedpanda (167)

@Whippingdot

Also if you print 100 lines on slow systems that could crash the system...I think

wdym?
but yes that is true

ReyesP (23)

@Whippingdot For me, its os.system("clear").

ReyesP (23)

@ReyesP For stopping I just import sys and sys.exit().

figglediggle (123)

@PyCoder01 Oh ffs name one person who follows that rule

gjirtngisnt (13)

@PyCoder01 stop hate commenting
its a waste of time

eidhernan (38)

@PyCoder01 Pygame is impossible to use in repl.it

Whippingdot (419)

It worked bruh... You blind?? It is supposed to say that, if it was an error it would give an error. exit() worked in the pic. @ridark

gjirtngisnt (13)

@PyCoder01 hate comments are a waste of time.

gjirtngisnt (13)

@PyCoder01 but that doesnt stop you!

qwertyuiop1111 (10)

@PyCoder01 Only early 80's kids remember when terminal games were pretty much the only game.

qwertyuiop1111 (10)

@PyCoder01 honestly what is with you?

JULIODIAZ1 (17)

im having touble understanding most of your code

TheRealJarTroll (0)

Aight, I love this. It's great and I need to use some of your code. I'm a noob and I have a massive project from my learning institute which if I don't do, there will be no more proof that I've been in any school for the past 9 years. So I need to take some of your code and reshape to mine. By that, I mean I'm going to leave your defs and your clear()s but change virtually everything else. I'd like to know if that's okay. You'll get credit for this.

SudhanshuMishra (66)

what would happen if i fight the zombie ? or dodge ?

LingWu1 (68)

Can I get a R.I.P?
I failed BABY mode...

alienloverA9 (9)

I WON HARD MODE :) nice game

RhinoRunner (641)

lol i deid and

Traceback (most recent call last):
  File "main.py", line 414, in <module>
    beg1c()
  File "main.py", line 275, in beg1c
    sys.eixt("game over")
AttributeError: module 'sys' has no attribute 'eixt'
gjirtngisnt (13)

I think there is a better way to generate this game- not saying Its bad, I love it. But you could've made a list of events, randomly select something from the list, and design functions for the events. make a bunch of if statements and fut the functions in there, then:
Put it all in a for loop.

gjirtngisnt (13)

@gjirtngisnt again, love the game, just a suggestion :)

FionnBuchanan (0)

this is awesome! thanks!

eidhernan (38)

It is tedious to lay out the path of the game as a long chain of if statements. It is better to store them in a file like I did in my most recent repl. It's very crude, I will admit, but I am just starting to figure things out.

This is a great program though.

razorshnegax (8)

All this hate circling around the repl.it community is the number one reason why I'm not active

ReyesP (23)

That's a LOT of lines of code, more than I have coded.

brendanryba1 (1)

thank you for the positivity from the creator and delivered by co creator @Lenora

NoahSeiffert (0)

but i do like the game

NoahSeiffert (0)

it stops at
1. fight him
2. try to sneak and attack him
3. try to bargain with the dragon

does that mean that I'm dead because I put 1 in and then it does the weird orange arrow and then I don enter again and it says Keybordinterrupt pls help
its rally anoying

brendanryba1 (1)

thank you for letting us know sincerely jackson and brendan @NoahSeiffert

CodingRedpanda (167)

nIcE!

cant you run instead of treking when the guy lets u out of the prison?

@Jacksontrex

Centsicles (2)

for me it's not working .-.

brendanryba1 (1)

could you tell me the what does it say the problem [email protected]

Centsicles (2)

@brendanryba1 yup, ya know when it says what difficulty do you want? i typed it in and then it does nothing.

brendanryba1 (1)

i will fix the problem thanks for the feed [email protected]

TheCheeseCoder (61)

its sys.exit("game over"), not sys.eixt

brendanryba1 (1)

thanks for the pointer and we fixed it thanks to you:)@TheCheeseCoder

PyCoder01 (80)

@Jacksontrex Sorry you're not old enough to use replit. You will be banned off repl talk. So you won't be able to post or comment until you're 13. In replit TOS you have to be over 13 to use replit.

RowanFromBJC (34)

@PyCoder01 He doesn't state his age, how can you tell?

brendanryba1 (1)

it was a typo and we didn't notice it until you got him [email protected]

RowanFromBJC (34)

@PyCoder01

#Thank you so much for 30 upvotes! This is my first big coding project and im glad so many people like it! also i hate you pycoder1 all i wanted to do was code but now youve banned me and I can't reply to any of my comments for three years because of you.
CodingCactus (4108)

@brendanryba1 @RowanFromBJC he can easily be unbanned by simply emailing [email protected] to appeal as it says. I assume you know them as you are speaking on their behalf so would you please tell them that.

brendanryba1 (1)

ok thxs :)@CodingCactus

RowanFromBJC (34)

@CodingCactus I don't really know anyone on repl.it irl