Uploading renpy game to Github - .zip too large

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
PandaMeng
Newbie
Posts: 13
Joined: Sun Mar 21, 2021 11:46 am
Contact:

Uploading renpy game to Github - .zip too large

#1 Post by PandaMeng »

I finally (as good as) finished my game.

I tried uploading the web-distribution to my github repository and all went well until I tried uploading the .zip-file of my game that is created with the port. I have previously other web ports of games (not renpy-related) like a maze and a puzzle, so that I can publish them on my website. I wanted to do this too for my renpygame so that people can play it directly on my website (hosted on Google Sites).

I tried looking it up, and I found something about using Git LFS but I don't quite understand what I'm supposed to do using this.

Does anyone else know any alternative methods to be able to play the game directly on my website, or a litteral step-by-step guide of using Git LFS?

uncoded
Regular
Posts: 27
Joined: Fri Apr 09, 2021 10:29 am
Contact:

Re: Uploading renpy game to Github - .zip too large

#2 Post by uncoded »

You shouldn't.
The only stuff your git repo should contain is everything that is needed for your application to be built.
This means:
  • source files (.rpy, .py files)
  • resources files (images, sounds, ...)
  • configuration files (.rpy, .py files)
  • build scripts
Your dependencies (heck, even renpy itself) shouldn't be part of your repository. Your build scripts should download them (always the same version, that is, the last version you saw your software working with), and then build your game using them and your own files. This would produce your build artifacts / or your game binaries / your executables, or in other words : what your players really use when they play with your game. Hosting these outputs on your git repo is generally a bad practice imo.

What you should do is:
  1. either build your project using a continuous integration server like TravisCI, then create an empty public directory at the root of your repository, and unpack your .zip file in it. Then, you'd configure your GitHub repository to take this directory as a source for GitHub pages.
  2. or (this is easier if you struggle with the concepts I just wrote) directly commit your .zip, but if I were your I'd commit it in a dedicated git repository, not besides my sources files. Then you'd setup this repository with GitHub pages as explained in 1.
ps. Both 1. and 2. would work if the web port of a Ren'Py application can run in a static site. If a server is required, pages won't be of any help (at least without a more involved solution like Docker/Kubernetes/what have you).
pps. git lfs is what GitHub uses under the hood to manage huge files properly, you don't have to bother with this if you use github.com .
🐾

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]