• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Is github an option for posting code.

glitchgod

Member
So since I know gml alot more then any other language I made a program for myself but want to share it with others. However the rule is to use github so the code can be looked at before actually downloading.
Is this something that is possible? My understanding is github is for major languages.
Is their a guide
 

kburkhart84

Firehammer Games
I have my projects on github(more for source control than for sharing though). If you drill down into the scripts folder of the project folder, you can find all your scripts, and the code itself is in .gml files. Github's web viewer is perfectly able to see them and show the code. It in fact even recognizes the fact that it IS gml and so you can filter it(it also things that all the .yy files are whatever the YACC language is). The viewer even has code letter coloring based on what it is(keyword, function, etc...). In fact, you can ALSO see code in object events, etc... as those are also stored in separate gml files. The only catch to those are that like named events will have numbers, like Step_2.gml being the End Step event for an object.

So yes, the code is certainly viewable on github. The catch is that there are plenty of other files that are not gml code so you have to either filter it or drill down into the directories to find what you need.
 

rIKmAN

Member
Yes code can be viewed on GitHub without downloading.
You can just browse the repo (which is usually a GMS2 project folder) and then open the .gml source files by clicking on them which will open them in the browser for you to read with formatting and syntax highlighting etc.
 

Yal

šŸ§ *penguin noises*
GMC Elder
It's not only possible, it's trivial.
Code:
cd "<YOUR_PROJECT_DIRECTORY>"
git init
git add .
git commit -m "Initial Commit"
git remote add origin <GITHUB_SSH_CLONE_URL>
git push --set-upstream origin master
Side note @glitchgod, a prerequisite for these steps is to download Git, and make sure that the "install Bash as your command line environment" and "add Git Bash Here to right-click context menu" checkboxes are ticked (so you have access to the Bash command line easily).
 

Rayek

Member
Might I suggest GitLab instead of GitHub? I prefer GitLab myself. It is somewhat a matter of preference, but also preferred workflow.
 

glitchgod

Member
Honestly i just created an account, copy pasted the script and object folder, and then published the zip. Hopefully i didn't break the rules or something.
Posted the link to reddit and seems like some people have downloaded it so no complaints.

Thank you everyone for your help
 
Top