Another architectural quandary with source control

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Have you tried to create realistic and at the same time casual tank movements? You found the perfect solution!
  • Ashley

    Let's say my teammate has made some changes to his layout called Level 1.json and hasn't committed/pushed yet.

    Meanwhile I make some changes to myObject, like adding or removing a variable.

    Well, Level 1.json has many instances of myObject, so I just indirectly modified Level 1.json which will eventually result in a conflict.

    This is a pretty big problem and I'm not sure what the solution is. I'm curious how other engines handle this, cause in Construct it means I not only can't work on the same layout, but I can't work on any objects that are contained in other layouts either... rendering source control pretty useless at that point.

  • Maybe it shouldn't need to update the level layouts?

    Like if you change an object, it could just store the information in its own object file. Why does it need to instantly modify the layouts when all you've done is change an object?

    So if you rename a variable, the layouts wouldn't care because the events are still referencing the same hidden variable ID.

    And if you removed a variable from an object, then when you open a sheet and C3 notices that a variable is missing - it would then just remove the variable references as needed. So you just wouldn't use that sheet if someone else was working on it.

    Therefore, there's no conflicts with collaboration in the situation you describe.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The situation you described shouldn't normally result in a conflict. Suppose Layout1 has instances of ObjectA and ObjectB. User A modifies the position of some ObjectA instances on Layout 1. Meanwhile you change some properties of ObjectB which change how they are saved to the layout file. These should result in non-overlapping changes (i.e. they affect different lines in the layout JSON file) which all get merged fine.

    Conflicts only occur when two users both modify the same lines with conflicting changes - such as if you both modify the position of ObjectA instance 1. Now the line in the layout JSON file with the position of that instance has two conflicting changes, so the source control tool will ask you to resolve the conflict.

    I'd suggest having some policies about how your team work to reduce the chance of conflicts - for example making regular small incremental commits is better than waiting a month and making a huge commit with tons of changes which has a much higher risk of conflicts. And of course avoid directly working on the same thing at the same time.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)