How do you effectively work with multiple people in a team?


#1

Hey folks!

I’ve worked with PlayCanvas a year ago on a one-man project and while it was a great experience, the always-online-collaborative nature of the editor felt like it would be a bad choice for any game that has a team of multiple people. Now, a year later, I realize that I still haven’t found any HTML5 engine with an editor as great as the PlayCanvas one - and that I never actually talked about my concerns here. Maybe I misunderstand something or there is a workflow that I don’t know of, so here goes.

My primary concern is on the coding side. Am I correct in assuming that any code file saved is automatically used on any other machine running an editor with the same project? As a programmer, my code seldomly works correctly the first time I save it. What if I’m working on something and saving a file that breaks behaviour while an artist or level designer wants to change something in the game and check how the current version works ingame? In my experience, multiple people usually work concurrently on the game and they don’t want to “push” in-progress versions of what they are doing in realtime, but in a controlled manner once it is complete - which could take hours or days. I think the collaborative nature of the editor might be a blessing if multiple people want to work on the same scene, but forcing the code to be collaborative and automatically make everyone deal with the broken in-between stages of what a programmer is working on is a pretty big dealbreaker.

Secondly I’m concerned with version control (or the lack thereof). Using versioning is a given even when working solo, but in a team the chances of something breaking are even bigger. As far as I understand, there is no proper version control for any current version using the PlayCanvas editor?

Thirdly, and that is less of a team thing: Tooling. I’ve not seen any bigger serious JS project that didn’t use Babel in some form. Being able to use ES6 without any repercussions, Sass, React JSX and much more produces more readable code in most cases. And don’t get me started on npm/yarn.

Sorry that this post is such a downer. Just to make this clear: I really like PlayCanvas, and I want to use it. The PlayCanvas editor is absolutely wonderful and I’m grateful for all the work you put into it, and for that reason it makes me even sadder than I don’t feel like I can use it in the companies I work for. Every time I have to build a scene by hand or integrate (or, god forbid, build) an external editor for another engine I wish that I could use PlayCanvas instead because I know it would save me the effort, but I know there is no way I can persuade any other programmer to work in a real-time collaborative environment without source control and tooling.


#2

Versioning was added this year (yay!). https://blog.playcanvas.com/version-control-in-playcanvas/ and https://developer.playcanvas.com/en/user-manual/version-control/

That should hopefully help with your first two issues as it allows merging of scenes too.

I make a ticket about that page you have linked as that shouldn’t be there anymore.

I’m afraid I can’t help you much here as I came from game dev into using PlayCanvas. There is an API available for ORG that allows pushing/updating of scripts. I don’t know the exact workflow but I think some developers have been using it to work outside the web browser. Perhaps you could use as a post build step after the standard JS build tools?

https://developer.playcanvas.com/en/user-manual/api/asset-update/


#3

Oh my, that is wonderful. I’d obviously have to try it to be sure, but from what I see regarding branching, this is nearly exactly what I’d want! Of course people can still accidentally change things on the main branch, but at least it seems that there is a safe workflow now. That’s huge!

Thank you very much! It didn’t help that it was the first page in the google results for “playcanvas source control”.

Thanks for the link! I thought this might need some time to figure out, but now I’ve played around with TEMPLATE: ES6 | Version Control | NPM | PlayCanvas in the meantime, and it seems to do the job!

There was some trouble on the way, but solvable:

  • I had to add import “babel-polyfill” because the other way described there didn’t work for me.
  • Both methods for " Local serving your development build" described here don’t work anymore. (Probably due to pc.Asset.prototype.getFileUrl not being used anymore? It never got called after being replaced by the loading screen solution or excerpt.js.)
    Luckily using Redirector as described here worked well. I don’t like that it means that I always have to have a local server running, but I guess I can change the pattern so I that it only activates when I add some parameter to the URL.
  • playcanvas-delay was broken for some reason, but easily replaced with const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)) (found here).

And now it seems that I’ve got a buildchain with Babel, Webpack, automatic uploads and local serving (using code running on localhost without having to upload it) working! I’d still need to update the components (the template is over 2 years old) and clean it up a little, but this is promising.


#4

Quite a few members are actually having trouble using that template so it’s great that you got it working!

If you can update the template/share your working template, that would be great!


#5

Good point. Done!

This would still need to be updated to the current to the state of Babel, Webpack etc. and there are some things that I’d love to clean up (e.g. all the duplication in the Webpack files), but it runs.