Code on Github/Gitlab/Bitbucket

Game development with Board Game Arena Studio
User avatar
fa81
Posts: 32
Joined: 25 November 2016, 16:35

Code on Github/Gitlab/Bitbucket

Post by fa81 »

Hi (fellow) developers,

just a quick thought: it would be nice to find more of the BGA game implementations publicly on one of the code hosting platforms. Even nicer if it would be actively developed there — vs. just being a one-commit dump of code every once in a while. No offense, but I wonder why not more people do that. Or I just cannot find the projects. I know there are some on Github.

I host my (one and only so far, I have to admit) implementation of P.I. on Gitlab and mentioned this in the overview table in BGA Studio for easy discovery by other developers: https://gitlab.com/fa81/bga-pi (plus a mirror on Github: https://github.com/hellp/bga-pi)

While I currently have no time to work on a game myself, sometimes I'm curious to check out other games, be it just for fun or for looking into fixing a bug I find when playing.
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

Re: Code on Github/Gitlab/Bitbucket

Post by A-dam »

Hi,

I think the best place is to add git link here: http://en.doc.boardgamearena.com/BGA_Code_Sharing

I have just added Penny Press ;)
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Code on Github/Gitlab/Bitbucket

Post by Een »

Hi!

I thought I'd mention that on the studio, you can get readonly access to ongoing development projects from the "studio projects" page (unless the project owner has restricted access).

We also added the possibility to create a project as a copy of another project to facilitate tampering and bug hunting.

Not sure exactly why you would look for BGA studio projects on github rather than on BGA studio itself, but if there are some specific reasons I'd be happy to hear them (and maybe improve the studio on that :D )
User avatar
fa81
Posts: 32
Joined: 25 November 2016, 16:35

Re: Code on Github/Gitlab/Bitbucket

Post by fa81 »

A-dam wrote:I think the best place is to add git link here: http://en.doc.boardgamearena.com/BGA_Code_Sharing
Thanks! I didn't know about that list before.
User avatar
fa81
Posts: 32
Joined: 25 November 2016, 16:35

Re: Code on Github/Gitlab/Bitbucket

Post by fa81 »

Een wrote:I thought I'd mention that on the studio, you can get readonly access to ongoing development projects from the "studio projects" page (unless the project owner has restricted access).

Not sure exactly why you would look for BGA studio projects on github rather than on BGA studio itself, but if there are some specific reasons I'd be happy to hear them (and maybe improve the studio on that :D )
  • I requested read-only access for another game recently; and I can check out the running game in Studio, but when accessing the game page in Control Panel I get a

    Code: Select all

    Access restricted (You only have read only privileges for this game)
    . So I haven't been able to look at the code yet.
Advantages of Git* over BGA:
  • Public code
  • Low barrier of entry. Nobody to ask first. Especially useful if I only want to look at the code/learn without interacting with the author(s).
  • Viewing, even editing, code in the browser.
  • Much better collaboration possibilities: pull-requests, bug/ticket management, code review, code comments etc.
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Code on Github/Gitlab/Bitbucket

Post by Een »

fa81 wrote:I requested read-only access for another game recently; and I can check out the running game in Studio, but when accessing the game page in Control Panel I get a

Code: Select all

Access restricted (You only have read only privileges for this game)
. So I haven't been able to look at the code yet.
As soon as you request readonly access, the code is available to read in your SFTP folder :)
I don't see any need to go to the game page in the control panel (since actions listed there are not applicable for read-only access) but I suppose I could give access to this page in readonly mode too if it's disturbing not to see it.
fa81 wrote:Advantages of Git* over BGA:
  • Public code
  • Low barrier of entry. Nobody to ask first. Especially useful if I only want to look at the code/learn without interacting with the author(s).
  • Viewing, even editing, code in the browser.
  • Much better collaboration possibilities: pull-requests, bug/ticket management, code review, code comments etc.
Thanks for listing this! Here are my thoughts about each point.

- "Public code": well, I don't know what you mean exactly by 'public' but with readonly-access any developer on BGA studio can get access to the code of a project by default, and there is no restriction on the creation of studio accounts (which is a logical first step if you are interested in creating games for BGA), so I'd say that "public code" is already the case.

- "Low barrier of entry. Nobody to ask first. Especially useful if I only want to look at the code/learn without interacting with the author(s)": same thing on BGA studio, unless the developer changed the default (only a handful of games) you don't need to ask to get readonly-access, or to create a copy of a project that you can fiddle with.

- "Viewing, even editing, code in the browser": yes, that would be nice. Lots of developer prefer to use their choice IDE, but still, it would be nice, even for us admins when we need to make a quick fix to a studio project. I'd like to add this when time allows and if I find a good open source in-browser editor.

- "Much better collaboration possibilities: pull-requests, bug/ticket management, code review, code comments etc": quite true, but most studio game projects are actually one-man projects and BGA already has its own bug/ticket management system once the game is released. Still, for projects with multiple developers wanting this, it's a good solution as it would clearly be a lot of work to add all this to BGA studio (even if an online editing tool could maybe come with simultaneous editing, that would be pretty cool).
User avatar
eoc
Posts: 105
Joined: 11 January 2017, 20:10

Re: Code on Github/Gitlab/Bitbucket

Post by eoc »

SFTP is a terribly inconvenient protocol to work with even on single-developer projects, and it is probably the number one reason I don't invest more of my time into tinkering with BGA studio.

I'd also like to emphasize the points made by fa81 concerning visibility / semi-public access and the possibility of easy collaboration. After all, most projects probably are only developed by one person (and maintained by at most one afterwards) because there's so much of an obstacle course preventing others from helping with tasks of increasing complexity, during development or at any point after the initial release... Would be a shame to dismiss that chance with a chicken/egg statement like the above!
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Code on Github/Gitlab/Bitbucket

Post by Een »

eoc wrote:SFTP is a terribly inconvenient protocol to work with even on single-developer projects, and it is probably the number one reason I don't invest more of my time into tinkering with BGA studio.
That's a strange claim to make. Is that a personal opinion? In my opinion it's pretty convenient. I use it all the time and find it pretty slick.
eoc wrote:I'd also like to emphasize the points made by fa81 concerning visibility / semi-public access and the possibility of easy collaboration. After all, most projects probably are only developed by one person (and maintained by at most one afterwards) because there's so much of an obstacle course preventing others from helping with tasks of increasing complexity, during development or at any point after the initial release... Would be a shame to dismiss that chance with a chicken/egg statement like the above!
What chance? What chicken/egg statement? I'm confused about your post. It's currently completely possible to use github/gitlab like the op did or with a team and we were not speaking about changing anything about that (I even wrote that it was a good solution for people wanting to teamwork). Nothing was being dismissed here I think.
User avatar
fa81
Posts: 32
Joined: 25 November 2016, 16:35

Re: Code on Github/Gitlab/Bitbucket

Post by fa81 »

I wouldn't call SFTP terrible, but I admit that it's rather uncommon these days to use (S)FTP for deployments.

As the BGA framework itself is not freely available (which is fine) you need access to BGA Studio anyway during development. So it's not as if a GitHub repo with the game code could be used "self-contained" to tinker around with.

I agree that there may be a hen-egg situation with single person projects because of lack of (or integration with) good tools. Maybe as a mid-term goal it would be feasible to support deployment via GitHub hooks or something like that. Or even manual pull from a third-party repository directly onto the BGA server, so we can get rid of the inconvenient SFTP'ing.
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Code on Github/Gitlab/Bitbucket

Post by vincentt »

Hi,

About SFTP, to ease the development process, I use Komodo which has the possibility to directly connect to the SFTP folder. therefore when I make an update of my file and I save it, it directly goes to BGA servers. It has this advantage :)

About versionning, I agree that SVN/GitHub or other things could be good. Maybe having access to your CVS through a CVS client directly (where today I think we can commit only through the control panel). When I developped, I archived in the "old school" way. I downloaded the sources in separate folders.
With Docthib, we developped Dice Forge in a team, but we split the responsibility => one for the php side and one for the JS. At some points we worked on both file, but we talked about it together beforehand.

Vincent
Post Reply

Return to “Developers”