Share your repls and programming experiences

← Back to all posts
An unfinished game
pieninja (4)

This is a game that I’ve been working on for a few months, and I like it. It’s an incremental game about sharks and fish. I can’t think of anything to add. It would be nice if you could give me some ideas(or tips, or criticism, or anything else helpful.)

Commentshotnewtop
AlexanderTarn (231)

You should give it a name
Also you should put your inputs in a while loop so that if an incorrect response is entered it will rerun the input until a good input is entered

pr0p3rno0b10 (18)

You should add all of your imports at the top

Grify (165)

This is really fun for a text based game! You should adapt a web version!

Also saving your progress somehow would be nice so you don't have to restart constantly XD

pieninja (4)

@Grify Thank you! I’ve been wanting to add saving. If you can, will you help me?

Grify (165)

@pieninja How I would do it is put it on a Node server and log IPs with a sting representing each bit of data in a text file, or for just python add a save (s) load (l) option which generates/eats that string to load or save the game data from a string. Then players can store that however they like or send it to friends to resume!

pieninja (4)

@Grify I have an idea of how to do that (have it print out the variables for copying), but how could I get it to change the variables when the users input the pasted text?

Grify (165)

@pieninja string parsing. Use barriers, like # or something to distinguish sections

pieninja (4)

@Grify Thank you! I’ll try to figure this out.

Grify (165)

@pieninja Good luck! Post it when you're done and I'll always be here to help with bugs and such!

sugarfi (485)

@pieninja you should look into the pickle and sqlite3 modules.

pieninja (4)

@Grify ok I have invented saving. It’s really rudimentary (old input code days). Essentially, you select save or load. Save prints out a text that you will type the values of in load. If you go out of the game then go back in, you can load your save by inputting the value of each line one at a time when it asks you. There is also a value that must be inputted the same to prevent cheating.