Any interest in a source code control how to?

AgentWhackjob

Newbie
Aug 30, 2019
32
47
I've been lurking here (on another account) for a while... and haven't seen any discussion of version control, build automation, patching/branching...etc.

I appreciate the work that folks are doing, art of this nature is beyond me. However I've been a software engineer for over 30 years, perhaps I can help devs smooth their development pipeline and manage patches (user submitted, bug fixes, etc) more efficiently.

It's entirely possible that what I'm talking about is old hat, everyone is using version control.. build automation..etc. Thus this post, to see if there is any interest.

If this would be useful, what I'd like to do is start a new thread. I'll kick it off with a high level overview of what I'm talking about, examples..etc.. Then Q&A to refine and delve into areas that are most useful to the work you folks are doing. Eventually maybe it gets bundled up into a nice howto....

What I get out of it? More VN's and faster updates! I also enjoy sharing knowledge in general, and helping communities that I think are doing good things. And no kids, so this is about all the legacy I can hope for ;-)
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,308
Keep in mind most of devs are pure amateur, maybe ~10% or even less do it in semi-pro/pro fashion.
You should write a do a do or don't in an intelligible way :cool:
 

AgentWhackjob

Newbie
Aug 30, 2019
32
47
Keep in mind most of devs are pure amateur, maybe ~10% or even less do it in semi-pro/pro fashion.
You should write a do a do or don't in an intelligible way :cool:
That was kinda the impression I get, which is why I posted this. You don't have to be a pro to get tons of benefit from good version control practices. The 2 most popular system are free open source and can function without having a dedicated server.

Maybe I should start with an example 'story'... not a visual novel though...cause I'd really suck at that ;-)

Our imaginary dev (Devy) decides to write a visual novel.. Devy learns how to use some scripting engine, 'whips up' some graphics and gets started.

Here's version 0.0.0.1:

Code:
show some pretty picture
prompt user for a or b
user responds
  a - output "Hello and tanks for playing my germ"
  b - output "durp"

Pretend for a moment that what we have above is actually useful. Devy packages up, posts it up here and everyone loves version 0.0.0.1...

Devy continues adding features:

Code:
show some pretty picture
super nifty animations
nice bouncy titties <gotta have those right?>
prompt user for a or b
user responds
  a - output "Hello and thank you for playing my germ"
  b - output "durp"
Meanwhile happy helper User fixes the grammar in the 0.0.0.1 script and sends to Devy:

Code:
show some pretty picture
prompt user for a or b
user responds
  a - output "Hello and thanks for playing my game"
  b - output "durp"
Obviously in this simple example you could just make the same updates in the current script. However imagine a 1000 line script with dialog scattered around. Trying to make the same changes manually could take many hours.

Under a version control system you can apply the users update to the 0.0.0.1 version of the script, and merge those changes with your current script where you've added all manner of new things with zero risk of losing your current changes. In the above example the fixes Devy and User both made to "tanks" would conflict and require manually choosing which to keep (or edit as you see fit) however it's easy to deal with.

There is a similar situation when you release 0.0.0.1 and then start on 0.1.0.0 (huge changes, tons of new stuff..etc). You find a critical bug while working on 0.1.0.0 but that version is nowhere near ready for release. You simply make the change to 0.0.0.1, release that as 0.0.0.2 *and* merge your changes into the 0.1.0.0 code so that your fix isn't "rebroken" when you release 0.1.0.0.

Most version control systems can also handle showing differences in images, a bit less useful however can be handy.

All that said it requires learning something new that may not be terribly useful if you're goal is to be an artist vs. programmer (my wife is a full time artist, doesn't use any version control ;-). Maybe dealing with the limitations of manually handling versioning/patching and the like it just fine for 99% of the folks here.

For the more geeky look at version control:

That's just one of "development pipeline" topics that could be covered. Automated builds and continuous integration aren't as useful for single coder shops, however if there was any interest in sharing code snippets with other developers.. third party code management is a topic in itself.

I'll just leave this here..
 

Saki_Sliz

Well-Known Member
May 3, 2018
1,403
1,011
I find there are two aspects of version when you are talking about game releases here on these forums and in the indie game-making community.

There is the private versioning system, as people make their games, and the numbers are essentially made up, if they are even used.

and then there are the versions that get released, which often are their own milestones and get their own versioning numbers.

I can't say much about the private version since it is fairly irrelevant, no one bothers with logging their edits or using a tool do log it. The only time I see version numbers in private builds is in team projects that use code sharing and merging tools like github, where you have to worry about multiple people making edits at the same time and merge conflicts.

As for public releases, I see 3 models. 1 people just upload a new version on a hosting site, with essentially made up numbers (since version standards are typically made up per company). 2 you can use built in version controls for engines like renpy and unity to help, but I don't know anyone who does this as it is rather cumbersome solution and it generates basically the same results. 3 and something I have explored, is the ability to auto download updates, the only concern with that is server hosting, other than that the custom code to do this is fun to make.
 

lobotomist

Active Member
Sep 4, 2017
907
879
what's with the four zeros in the version control example?? can you explain their use?? I usually see one or two.
 

AgentWhackjob

Newbie
Aug 30, 2019
32
47
what's with the four zeros in the version control example?? can you explain their use?? I usually see one or two.
First to make things clear, version numbers don't have much to do with version control. Version numbering is a human convention use to identify a specific state, version control systems use different numbering scheme (Subversion has single digit revision, GIT used UUID's). Typically it's a good practice to be able to tie your version x.x.x.x to a specific state of the source (revision or UUID)...

x.x.x.x is pretty much the standard version convention. For display to end users the last digit (or sometimes 2) is often hidden.

First digit is major revision, second minor revision, third patch release and fourth build.
  • Major revisions are usually incremented when there are major changes. Think windows 95, 7, 10.. Mac OS 8, 9, 10
  • Minor revision is typically feature enhancements or minor new features.
  • Patch revision normally bug fixes.
  • Build isn't really relevant to scripted languages, it's very important when you have automated builds and working with a team.
When to increment Major and Minor revisions can be vague. Patch revisions should be incremented whenever a patch is released to customers, build versions typically automatically increment every build.

The important thing about versions in relation to version control is that you need to be able to positively tie a specific released version to a specific state of your software in a version control system. This allows you to patch bugs without risking destabilizing ongoing work or needing to release unfinished/tested software.

I hope that helps.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,499
8,035
The version control you have in mind really only works if: A. You work in a team, B. You have a pretty big game in your hands.
When it comes to small scale games (Basically games here), there is no need to do that.
If a game truly needed to edit over 1000 lines, it is very likely that it would get abandoned before or after said report.
In the industry where efficiency matters and multiple people input their thing, it is basically essential but when it comes to these projects, it is not.

It is the whole reason why I do not really use version numbering but simple "Rx" where R stands for release and x is the number of release. People basically use version number only to have a progressive number to tell people that "this version is newer than that one".

Also, no one reports bugs or stuff like that, you are actually lucky if you get any bug report at all.
 
  • Angry
Reactions: Axeleen

AgentWhackjob

Newbie
Aug 30, 2019
32
47
The version control you have in mind really only works if: A. You work in a team, B. You have a pretty big game in your hands.
When it comes to small scale games (Basically games here), there is no need to do that.
I'll have to disagree with that, source code control is useful for small single dev projects as well. People make mistakes, having the ability to view the history of edits to a file is very handy when you oops.

That said it's entirely possible that learning how to make effective use of version control, isn't worth the effort for most devs of these types of games/VN..s..etc. Which is why I asked before investing any significant time into this.

Appreciate the feedback.
 

lobotomist

Active Member
Sep 4, 2017
907
879
Interesting, just for curiosity's sake, since I had never heard about this automated build 0. Can you explain what that is? Don't really need an in depth explanation, since this is mostly irrelevant to me. But I want to know about it.
 

AgentWhackjob

Newbie
Aug 30, 2019
32
47
Interesting, just for curiosity's sake, since I had never heard about this automated build 0. Can you explain what that is? Don't really need an in depth explanation, since this is mostly irrelevant to me. But I want to know about it.
Software projects need to be deployed, what that entails depends on the project however at some point you must 'package' it up and distribute. Typically that process is automated and will increment the last digit of the version. On larger projects where you have QA involved, when QA signs off they sign off on version x.x.x.x everyone knows exactly what that refers... there's a tag in the source code control system so you can always get the exact sources that make up that version.

For more (if interested)
 

caLTD

Member
Game Developer
Feb 4, 2018
202
180
Then what ? switch to using Agile :)

Most of those projects are single coder (even single person for everything), Source control is not that important when you are single person. Just make backups at least for weekly basis.

Source management tools are hard to use, using them effectively is another talent and we don't have to time for that.

Don't waste your time...
 

AgentWhackjob

Newbie
Aug 30, 2019
32
47
Thank for the feedback. Figured it was a way I could contribute. If anyone is interested in learning more feel free to PM me.
 

dspeed

Active Member
Oct 15, 2016
861
1,358
The version control you have in mind really only works if: A. You work in a team, B. You have a pretty big game in your hands.
When it comes to small scale games (Basically games here), there is no need to do that.
If a game truly needed to edit over 1000 lines, it is very likely that it would get abandoned before or after said report.
In the industry where efficiency matters and multiple people input their thing, it is basically essential but when it comes to these projects, it is not.

It is the whole reason why I do not really use version numbering but simple "Rx" where R stands for release and x is the number of release. People basically use version number only to have a progressive number to tell people that "this version is newer than that one".

Also, no one reports bugs or stuff like that, you are actually lucky if you get any bug report at all.
Plenty of people on here use version control on their projects. I know that Xorgroth uses Git for a translation project of a Russian game.
 

AgentWhackjob

Newbie
Aug 30, 2019
32
47
do you know aout patches in unity??
Nope, no specific knowledge of Unity..
Plenty of people on here use version control on their projects. I know that Xorgroth uses Git for a translation project of a Russian game.
I have no doubt that some devs here are using source control tools. Those who don't probably can't see why they should and attempting to convince them that it's worthwhile is likely difficult. Most devs are forced to by a project/work *or* have an epiphany.
 

Marzepain

Newbie
May 4, 2019
62
49
Sorry for the late and somewhat long response, but I think source control is kind of important.

I've been a lurker too and I too wrestle with the level of professionalism this community has attained. I'm also an ancient dev and amazes me how some people are making life difficult for themselves.

Being a solo developer has nothing to do with source control. Having Undo (ctrl-z) in your application is also handy for a solo developer, so having an undo option on specific files is useful and faster then creating a backup. Source control is something to make your live easier as you can see your changes (diff) when you last edited your files and you never lose anything anymore. The later being important if somebody else wants to finish the work or do a gamemaker to renpy rebuild.
Alternatively this might convince non coders.


I pity the talent being wasted here for lack of knowledge and fear of complexity. The 3D tools are far more complex too handle than a simple source control system. Sometimes the level of low self esteem on display here is perplexing. Why some people who have proven themselves smart, simply don't have the courage to try something that makes difficult tasks easier is beyond me.

I might even be inclined to fix a few bugs or type a bug report if the project was on Github or Gitlab, but less so if it was private.
Another case is that I've got quite a hefty development machine and I might be able to help out with rendering. The main customers of heavy duty machines seem developers, researchers, gamers and artists. Most of them get what they need, unfortunately lots of starving artists don't.
By the way, normally things that can be build from other sources in source control like executable don't get checked in, as they hog space and are easily recreate. In the case of rendered images that took hours, I'll make an exception.

Maybe the simplest way to get people here to start using source control is to start using an Integrated Development Enviroment (IDE) like Visual Studio Code. In there it's just a few setting and away you go. Code does Python and C# so your set for renpy, Unreal and Unity.





By the way, if you use an IDE you'll probably get a build number added to your exe when you build and install/deploy packages for get them probably too. IDE's are intended to take care of this sort of drudge work.

If you use Github you get the possibility to download a tarbal (.tar.gz) or zipbal (.zip) to download the project as a whole. This might be more stable than dropping it on certain file sharing sites. There is also the possibility to get an older version if you like. Check out this discussion on Stack Overflow.

A pro tip is having multiple repositories. One, possibly private repository, with your development stuff like models, scenes and code you wont publish. Another one with the the thing that can be installed by a user like rendered images and build exe.
Then a user doesn't have to download things they don't need. You could even make that 2 users on Github 1 with the name of your "publishing house" having the download repository of the official versions of the game and the other one for your personal, possibly private, development repository.
There are 2 tiny improvement for me that would be great as I don't have to dowload the whole backup every new version, but can simply do update on the repo and only get the stuff that changed. Secondly the repo's are neatly put in folders as my download dir is currently a huge mess.
There may be a better way to do it. If anyone has any better idea I would love to hear it.
There is however a caveat and that are quota's. (LFS stands for large file structures)
Github support repositories up to 100Gb, but pommises to whine when you go over 1Gb.
Gitlab supports 10Gb and may do something similar.



That is per repository, so if you have multiple repositories your fine.
You can have sub repositories in your repository. These subrepositories have there own quota, but do get downloaded when you update the repository that uses them



It is commonly used on Unreal projects even with large assets.

And also on Unity



For Godot

For Gamemaker

It may be telling that there is no Renpy video for github, but renpy itself is on Github.

If you know the project gets large, planning ahead and having a repo per instalment/DLC/Plugin or any other way a massive asset folder can be divided, may help.

In conclusion, working professionally is not extra work, it is having different habits and less trouble.

One thing that is some extra work is adding some descriptive text to your check in's. I as seasoned programmer know that my brain can't hold all the stuff I've done. Things just fall out of it at the most inappropriate times. It's very helpful if you can look back in your history and recognize what you have been working on. It's also quite motivating if you see progress.
Another thing that a little work is setting tags (in git or labels in other source control systems) for versions. That way you know what changes where done since the last version. Handy for making a change log.


I personally used to the Microsoft way of Mayor.Minor.Patch.Build system for exe's and Dll's, but make it just Mayor and Minor for the tag so specific patches can go on a minor version branch.

Python seems to do it's own thing in this case. Quite unusual.


On thing that is bothering me is that I can't seem to find any statement about erotica by Github or Gitlab. There seems to be some text adventure porn and some ero programmer humor, but not much more. There is the internet rule 34

so they must have thought about it.
Does anybody know if they allow it?
 
Last edited:

Elvishious

Afterglow Developer
Game Developer
Mar 9, 2018
149
419
For those of you who use/want to use Git. I can recommend GitKraken, it's a very visual client so you don't have to type any git command.
 
  • Like
Reactions: Marzepain

AgentWhackjob

Newbie
Aug 30, 2019
32
47
For those of you who use/want to use Git. I can recommend GitKraken, it's a very visual client so you don't have to type any git command.
A lot of devs here used to use GitKraken, most have moved on. It requires an account tie in to their services, which can cause all manner of issues for zero benefit. Also can't do auth using local git creds which is a huge hassle IMO.

GitAhead or TortoiseGit both of which do everything GitKraken does using normal git cred storage and functionality.

I'd strongly recommend installing the official git client as well because a lot of advanced functionality is not available in GUI's (manipulating cache, renormalizing files for a couple of examples).
 
  • Like
Reactions: Marzepain

Marzepain

Newbie
May 4, 2019
62
49
Found it.

Quora: Does github allow uploading a porn image?


The gist of the story is that GitHub claims no responsibility for any of your content, you’re free to upload whatever you like.

Looking in detail at what github provides now:
GitHub Terms of Service



GitHub has the right to suspend or terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. GitHub reserves the right to refuse service to anyone for any reason at any time.

GitHub Acceptable Use Policies


  • is or contains sexually obscene content;
  • gratuitously depicts or glorifies violence, including violent images;

GitHub Community Guidelines


  • Sexually obscene content - Don’t post content that is pornographic. This does not mean that all nudity, or all code and content related to sexuality, is prohibited. We recognize that sexuality is a part of life and non-pornographic sexual content may be a part of your project, or may be presented for educational or artistic purposes. We do not allow obscene sexual content or content that may involve the exploitation or sexualization of minors.
  • Gratuitously violent content - Don’t post violent images, text, or other content without reasonable context or warnings. While it's often okay to include violent content in video games, news reports, and descriptions of historical events, we do not allow violent content that is posted indiscriminately, or that is posted in a way that makes it difficult for other users to avoid (such as a profile avatar or an issue comment). A clear warning or disclaimer in other contexts helps users make an educated decision as to whether or not they want to engage with such content.

  • Content Removal
  • Content Blocking
  • Account Suspension
  • Account Termination
What this means in theory
Basically Github can take-down whatever they like, like most sites.

What the Community Guidlines mean is that you can use Github to develop a sexual or violent game.
The stuff that is not directly recognizable like 3d model files, drawing files specific to an application like photoshop or krita, and programming code should be absolutely fine.
If your render those models into sexual images, like png's, then they disapprove, officially.

The statement "We recognize that sexuality is a part of life" probably implies that sex itself is not a problem, especially if it's packaged as a form of art (or romance or seduction etc). Silicon Valley is part of the liberal hippy San Francisco area, so if you make it classy they are ok with it.

For those who like to create hard core images and video, have a publishing account and repository separate from your development account and repository. This would be damage control when a repository gets deleted because of smut. The publishing stuff may be deleted but your development stuff will always be fine. You can include the published stuff as a subrepository in your development repository as I explained in a previous post.


Special note for a game that aimed at the LGTB community: As San Francisco, where Silicon Valley is located and where some very large users and Github itself are located, presents itself as the gay capitol of the world, taking down a LGTB game would be risking a media shit storm for Github. If they have any business savvy, then they should stay away with a ten foot pole.
Although people in IT can be fairly autistic, thus may be completely oblivious to this and take it down anyway. It's not unthinkable that after the special interested groups get done with them, they will adjust their rules or create a special area of the site where "things that are part of life" can be hosted. It does take some LGTB artist who want to be vocal/martyr for the cause and shout "discrimination" real hard.
By the way, I would love to help out, but my fetish is super huge boobs and that does not count as a discriminated minority, although it probably is. I can not change that I'm this way, but I'm labeled a pervert anyway. What even worse is that women with macromastia have to wear a sweater even in summer lest they be labeled a slut. It seems your sexual orientation is fine, as long as you're not sexual. I don't think much of the outrage about discrimination is about being who you want to be and more about wielding power. If you wield that power to improve the world a little for us all, I'm all for it.


What this means in practice
Github does seem to be used for an erotic game for some time:

Trials in Tainted Space


I had trouble getting into the asset folder, so I thought it was blocked, but it's fine now.
The asset folder does contain drawn images of furry animals in explicit scenes.
The zip I downloaded was around 2.2Gb (more exact 2.245.376Kb) so a repository can be bigger then 1Gb.

According to the code frequency they are active since 2014, going strong for more than 6 years.


Github is either not searching or not finding or not minding sexual content.
Without complaints, there is probably no way of knowing what a user repository is representing.
Detection software may have evolved, but I doubt it.
As of January 2020, GitHub reports having over 40 million users and more than 100 million (including at least 28 million public repositories), making it the largest host of in the world. Probably not easy to police even if they wanted to.

Copywrite trolls do scour Github, as they do the rest of the internet, so your game may be harassed. Note that was reported in 2015 and indiscriminate harassing is not a long term strategy.
Porn Companies Are Going After GitHub
Jan 7 2015, 10:54pm


Github is quite open over it's DMCA take-down and notifies the holder first instead of taking it down immediately.
Repository with text of DMCA take-down notices as received by GitHub sorted by year and month


By the way, US law prohibits copywrite of titles, but does apply copyright to scripts etc if so noted.
Probably because a title, in itself, is not specific enough.
At least that is what I heard on an interview on FilmCourage (sorry can't seem to find the specific interview anymore)
 
Last edited: