Project Organization Question

Hey all,

Question for you. So my company has been using PlayCanvas for a couple years now (fantastic product), and we are trying to create a generic “game” with the logic flow we need.

An example: We have a generic menu system, with designers to come in later and change via parameters. So you can do things like add and remove leaderboards, instructions, link out to external weblinks for different clients, gate these feature with a lead generation component, swap 2D assets, etc etc.

Inside of this generic logic, there will be different minigames. And then inside of those different minigames there is an arbitrary number of different skins of that game.

Here is a visual example:

So, how would you all go about setting this up? In the past I have made a fork between the top and middle layers with branches for the different skins inside a game. But Ideally I would like to be able to make changes at the top layer and have them propagate down into the bottom layers. For example lets say I want the user to have a two second delay when they submit in the leaderboard. I’d like that option to pop up at the bottom layer when a designer is exporting a skin of a game.

Let me know what you think. I know this is all pretty high level, and I honestly may be thinking of this wrong in general. Open to any and all thoughts. Thanks in advance.

If its purely code at the top level, then you can copy and paste assets or folders to other projects quite easily.

I’m assuming in this case it is also scenes, templates assets etc. In which case there’s no great solution.

The only method I can think of so far is explained here: Selective merge of branches · Issue #654 · playcanvas/editor · GitHub

TLDR, a single project workflow, you have the top level as master, games as branches and then skins as branches of the game branches.

This allows you to upstream changes as branch merges.

This is not a great solution as it has all your games in one project hence the recommendation of archiving the game branches on a regular basis in that ticket.

We are actively working on Linking projects · Issue #340 · playcanvas/editor · GitHub which is the proper solution and is effectively a sub repo like behaviour. Unfortunately, this is still ~6 months away.

1 Like

Okay cool thank you so much.

You’re right it is also scenes and templates. I think if the project linking is something you are planning on doing, we can probably get by on a boiler plate system until that feature comes out. If there is ever a beta release, we’d love to give it a shot.

So would the project linking system you’re working on essentially have a project be my top layer, and then different projects that are linked to the parent project with the skins being branches of the child project? Then making a change on the top layer project, would propagate down?

Thanks again.

Pretty much. Each game project would link to the core project and changes to the core project can be upstreamed to the games. For the skins, you can use branches or I think they could also be separate projects that are linked to the game project. Changes to the game project can be upstreamed to the skins.

The ‘linking’ would effective be a cross project merge.

1 Like

Okay great I’ll wait for that then. While I’ve got you on that topic (im sure this is being considered somewhere internally) it would be great to have folders with projects on my account. I think my “Projects” screen is already a bit crowded so I can only imagine how it would be in this scenario.

We have a ticket tracking this area but no plans yet unfortunately Separate projects in folders / Search field for projects · Issue #156 · playcanvas/editor · GitHub

1 Like

@yaustar Have there been any updates on the project linking? I haven’t seen any movement on the github issue. I’ll hold off on asking again after this, but I’m at a fork in the road with a project where I’m trying to decide if I should wait for the feature or go ahead without it.

Thanks in advance!

Hi @Jake_Johnson,

It’s coming, towards the end of the year :innocent:

1 Like

Yep, it is coming towards the end of the year. It’s as complex feature and I’ve been seeing WIP updates internally which look VERY promising

The details I can give now are the following:

You give Project A a checkpoint of Project B (shared resources project) and it will do a two way merge using the same merge workflow as before.

This will create a mapping file of Project B asset ids to Project A asset ids from the merge which will allow for updates/deletion/additions.

It will also attempt to merge scenes and project settings (again in the same way you currently do a merge).

Chances are that we will do a closed beta as soon as possible

2 Likes

@Leonidas @yaustar

Thank yall for the responses. I think I’ll go ahead without it for now but if there is anyway I can help (beta tester etc.) please let me know. Really looking forward to the feature :slight_smile:

1 Like