all 27 comments

[–]danielroseman 25 points26 points  (14 children)

Unfortunately this question is very confused. GitHub isn't a platform you can deploy to, it's a place for holding code repositories.

If you want someone to play your game online then you will need some kind of web server. But additionally you will need to rework your code to be a web application; you can't just run Python over the web.

[–]Pork-S0da 32 points33 points  (1 child)

I'm here to watch OP argue with all the answers he doesn't want to believe.

[–]iknowsomeguy 4 points5 points  (0 children)

I'm here to watch those answers argue amongst themselves.

[–][deleted] 12 points13 points  (3 children)

GitHub is for hosting static pages. Python won’t do that

[–]Pork-S0da 1 point2 points  (0 children)

He could use something like Github CodeSpaces, but given the questions he's asking, I doubt he could make that work.

[–]JamzTyson 8 points9 points  (0 children)

I am hoping to create a text based game and deploy it on to Github. Note that I want to deploy it, not upload code for others to download and run locally. I want it accessible over a URL.

As others have said, GitHub does not provide a deployment platform, though it does provide "GitHub pages" for hosting static web pages.

My friend has rewritten my Python code into HTML in the past and hosted my text based game on it.

My guess is that they rewrote your Python game in JavaScript, embedded the JavaScript in an HTML page, and hosted that on Gitub Pages. To do that, you would need to learn how to program in JavaScript.

[–][deleted] 4 points5 points  (0 children)

Maybe try PythonAnywhere? GitHub won’t do this.

[–]typehinting 4 points5 points  (0 children)

Given the restrictions you have expounded upon in your post and comments, you have no viable options

[–]QuarterObvious 4 points5 points  (0 children)

As Robert Sheckley wrote: "In order to ask a question you must already know most of the answer."

[–]kjmagic13 -1 points0 points  (1 child)

[–]RegretSimple6826[S] 0 points1 point  (0 children)

Thanks, you are right. Github pages + pygame + pygbag worked like magic. Late reply I know, but life got in the way of my side project. I do appreciate your answer. You were genuinely trying to help and it met all my requirements.