I have created a Pygame Replit, and it functions perfectly when I run it. However, if anyone else attempts to run it, it doesn’t work. The game only works for people with a Replit account who have been invited to collaborate on the project. I think it’s a Replit problem rather than an issue with my code. Is there any way to resolve this? If this is a replit issue, does anyone know if they’re working on it? And if not, is there a better website I can use to host my pygame game?
Here’s the link to my game.
Hi @KatieAlessandra !
Can you try moving all the code to a new repl and see if that works?
Or fork this repl and see if the forked version works?
Hi @NateDhaliwal, thank you for your help. I tried the forked version, but I’m still having the same issue. The program won’t work unless I’m logged in. It starts to run, but then it just stops. However, when I’m logged in, it works fine.
I have also tried to make a new pygame replit file and that didn’t work either.
Does your program contain any Secrets that may be essential for the program to run?
@KatieAlessandra Does the game run on main.py or on another file?
I’m not sure I understand your first question. Is “Secrets” a programming term? If so, I’m unfamiliar with it. To answer your second question, yes, the game runs from the main.py file.
Secrets are Replit’s environment variables.
Hmm… I guess you are not using it…
In this case, @ShaneAtReplit could you take a look at this? (Sorry to ping you)
Here’s a video to show you what I mean. https://youtu.be/rVc4fSXYTBI
You have a Hacker plan, which gives you quadruple the memory (RAM) of Free plan.
With only 0.5 GiB memory, it appears the repl runs out of memory when loading the
Animations around line
736 before even starting the game loop.
So you’ll need to find a way to not have all the animations in memory at once.
Hey @NuclearPasta0 ! Thank you for the response. I just downgraded to the hacker plan 2 days ago. I had the pro plan up until two days ago and I was still having the same issues then. So are you saying even at the pro plan I didn’t have enough memory? Also I don’t understand how it would let me run the game if it’s a memory issue?(the game works 100% for me when logged in)
Basically what Nuclear is saying is that you have the Hacker plan so you had plenty of memory. But people running your game probably don’t have the Hacker plan, so they don’t have enough memory to run your game.
Oh I see. I didn’t realize me paying for a plan didn’t extend to people running my game.
AFAIK that only happens if your Repl isn’t a website BTW.
Are you sure this is the way it works? Would someone need to pay for a plan to run my game? For further context, I invited someone to collaborate on the project, and they could run the game without purchasing a plan
Yep, that’s expected.
When you run a (non-website) Repl you don’t have edit permissions to from the cover page, Replit will automatically fork the Repl (this is known as a ghost fork). Person running your program owns that fork. When you own a Repl, obviously you need to have enough memory for it to run.
So, in short, if I want to share this with anyone, I would have to invite them to collaborate or they would have to pay?
Make sure you trust them, though.
Thank you for all the help. If you know of any way to get around these issues please let me know! (I’ve tried to find better websites to host my game but haven’t had much luck.)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.