Share your repls and programming experiences

← Back to all posts
🧨 YOUR LIFE: A MINING GAME🧨
aguy11

Are you annoyed by useless HTML games that crash your computer for no reason? Do you want to not burn your house down? Well, lucky you, you can now play a fun game all in the console!

Welcome to LIFE OF ___ <- You name here.

You are a professional miner looking to dominate the mining industry


I've been working on this game for the past week because I am slow speed and consider it done. The game is quite self explanatory, but there is one thing that I should explain.

  • To load the game you have to enter the name you saved under when you are asked for your name, and then press load.

Things coming up:

  • Powerups

Update: I have changed the code so you don’t have to press enter when you move.


Happy playing!

Voters
iocoder
VulcanWM
mylifeiscrap
kellyk1175
21004295Aidan
WithoutIdeias
ChezTacoz
TannerTK8976
ninja2k11
OwainThomas
Comments
hotnewtop
russellfontana

how do i start

SomeBoyPlayz

@russellfontana after you press A , use WASD keys to mine

AndyZhuang

@SomeBoyPlayz I agree :)

Arabica

The game gets pretty bland after you get a good enough pickaxe, and when you mine there should be some danger. A more technical issue is when you mine, it flickers; this is because you wipe the whole screen. I'd suggest using something like a double buffer or only getting rid of parts that have been newly mined. This is an impressive game, overall good job.

JonathanLin16

how to mine?

aguy11

@JonathanLin16 When you enter your name select A and press enter to mine. (it says it right there)

JonathanLin16

@aguy11 as in moving to get stuff, but i found out

CHLOEmcgg
CHLOEmcgg
hassanlambart

@JonathanLin16 w to go up, a to go left, s to go down, d to go right

Leroy01010

THIS IS AWSOME!!

Yoplayer1py

Error:

Gem: 2 Gold: 9 Iron: 18 Overall Items: 29/30 Pickaxe Health: 25/80
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 # 0 0 0 0 0

Marc-020513
Yoplayer1py

@Marc-020513 ? too long error I didn't bother too read :/

BenjaminOBrien

@Yoplayer1py You've mined too many times, the game uses functions to do everything, therefor, if you mine too many times you'll hit a recursion error.

Chiroyce

@Yoplayer1py I think this game uses recursion for the game loop - and when you got too good at the game, it reached the Recursion limit and threw a RecursionError.

Yoplayer1py

@BenjaminOBrien ok tysm idk that there's a thing like recursion error.

Yoplayer1py

@Chiroyce tysm idk that there's a error like this.

ASTROIDE

@Yoplayer1py That's the longest stack trace I've ever seen

Yoplayer1py

@ASTROIDE Ya me too ... soo long

CodingElf66

Bruh I'm he, and I either surpassed deo in categories or I passed him, and I saved the game, and WHAT? I'm still not #1

vinedarbunit
OlauPla

It seems like a nice game. But no offense but code is a disaster. It might be your first project so this is what you should change:

1) Don't use GLOBALS! It is a very bad practice and it has a very easy solution
2) Don't use while True it is also a very bad practice and i am tired and filled with despair of seeing people use it often.
3) Maybe for better organization you could use multiple files where you could define your functions and called them in main

Overall very nice game and I encourage you to keep learning and to fix this stuff! Hava a nice day

Dunce

@OlauPla Why is while True considered bad practice? How else are you supposed to create a main loop?

OlauPla

@Dunce You use a boolean variable. It is like a while True but with a bool var you don't use break. Using break is the bad practice

Dunce

@OlauPla So you're saying

is fine, but

is bad? If so I agree.

peterK99t

i DON'T

eli-2688

trying not to be rude but this game is kinda confusing how do you go left & right in mining and why is stuff so expensive (I hate expensive stuff)

SomeBoyPlayz

@eli-2688 WASD keys and idk why its expensive

CodingElf66

Heyyy... You're Profile Pic is Keefe from Keeper Of The Lost Cities! I read the series too!

FlaminHotValdez

@CodingElf66 its fitz

or...

catch my drift? ;)

CodingElf66

@FlaminHotValdez Ahh... Yes. Keefe has white blond hair.

its fitz

I hadn't read that series for 2 years now, so no wonder I'm dry on the characters, lol.

;)

SilentFoxy78

@CodingElf66 You guys read keeper of the lost cities :))))))))))?

SilentFoxy78

@CodingElf66 bruhhhh i don't think you've ever read it...

SilentFoxy78

@FlaminHotValdez Fitz is a golden boi

CodingElf66

@SilentFoxy78 If you catch my drift ;)

Yes.

Wink wink wink ;)

SilentFoxy78

@CodingElf66 wink ;)

FlaminHotValdez

@SilentFoxy78 Fitz is a *censored*

GhostKing007

@FlaminHotValdez I cannot agree more. Fitz is indeed a censored

FlaminHotValdez

@GhostKing007 if you wanna cancel markdown do \*censored\*

QuickV

\*censored\*
JavaScript :D

CodingElf66

@QuickV /censored/

FlaminHotValdez

@CodingElf66 Other slash.

CodingElf66

@FlaminHotValdez Lol (I don't know Javascript), but the syntax is pretty similar.

GhostKing007

@FlaminHotValdez cool thanks

sobakarooted

bro y r u everywhere @CodingElf66

QuickV

*ya did it wrong*

@CodingElf66

Whippingdot

cause he is everywhere @sobakarooted

CodingElf66

@sobakarooted Actually, I am, because I comment on every post I see

wink wink wink

CodingElf66

@Whippingdot wink wink wink ;;)

I comment on everything I see wink

iocoder

@aguy11 once again, a great game!
i cant believe it this thing has more than 400 upvotes!

mylifeiscrap

Ha 401th upvote from me

ch1ck3n

@mylifeiscrap no you got 400th

VulcanWM

No I got 401st @ch1ck3n

VulcanWM

this guy didn’t even upvote lmao @ch1ck3n

Hrmmmmmm

CTRL+ALT+DELETE
Your Code as been DELETED

8080313113

blob:https://web.whatsapp.com/db75365e-ee2c-4f1f-86ca-e2b7cf61fc3e Please click this link the one who made this game.Im begging you please click!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

abdelrahmanzah1

Damn man

animetoto

Hai

NoahCraig4

impressive, i have never seen a text based game. I know that was what gamers played in the 60's but this is pretty cool

Mochishake

This is so much fun!!! :D

AbdulelahZghlou

mmm....

Elli-JoBarnett

Sorry that lat post I had my caps lock on

Elli-JoBarnett

IT WON'T WORK WHY NOT WHAT IS IT SUPPOSED TO DO LOOKS SO MUCH FUN EVEN THOUGH I CAN'T DO IT

hazelpy

whoah. what intense graphics. i'm intrigued.

World-SpryzenSp

I tried to remake it there is an error with the second line

AdrianBoldt

i broke it

Rkpeace7

Niceee...😊

DarylShyju

amazing

20marianajjar

Cool!

tnt1234567890

Wither storm

bee-leave-meeeeeeeee

didnt save :(

R14Z

this is crazy!!!