Lifewrath
@AnshAgarwal1
So, I have 2 repls; one for hosting the server, and one for acting as a client. Click to go to the client repl. When I run the client, it says:
Traceb
Pygame
RYANTADIPARTHI You are using different servers. Try http servers. You are not connecting to the right server.2 years ago
Coder100 Connect to the actual socket:
wss://replname.username.repl.co
You probably were taking a tutorial on devving locally xd2 years ago
I want to create a game in python, so that it can save cilent's progress, and if you reload the page, you get your progress. How do I do this?
ThisUserTaken you can also use save files. so for example, I created a post (I'll drop the link in a sec) which creates a file and saves the number of coins. Maybe, you can do something like dat!2 years ago
heyitsmarcus The one slight problem you'll run into doing this strictly in Python is that your Python storage is going to be for all users who return to the page, never for one specific user, including yourself. Stored items, whether they are in text files or database files, will be the same regardless of who loads the page.
But, all you need to do is to do a little bit of programming to see whether they are a new user or returning user. Since you don't need authentication or anything, you can have them pi2 years ago
realTronsi Simple answer: you can't
Long answer: you can provide the client with a save code, which they can use to earn back their progress
Very long answer: use a backend2 years ago
So, in the above repl.it, when you save your progress and reload the page, your save file disappears. How do I fix this issue?
Python
Coder100 Were you doing it on repl.run? The thing is, if you aren't the owner and you are running the program, the files won't save because of a security issue.2 years ago
In the code, there are no errors, and if you stop the program, and run it again, it saves as expected, but if I reload the page, it goes back to what
Python