PlaceholderGames / 2016-VnD_Game

2nd year computer games development group project
2 stars 0 forks source link

Solving merge conflicts #40

Closed BojanStankovic closed 3 years ago

BojanStankovic commented 7 years ago

@DoctorMikeReddy

This issue's main purpose is just to point on how solving merge conflicts for blueprints is done at the moment and how it could be done more efficiently. Especially with larger teams and bigger projects.

Current scenario: At least two people are working on the same blueprint. At the beginning of the projects this doesn't happen but it will happen later down the development process and the further the project goes, more frequently it happens. This will result in a merge conflict for that blueprint. The conflict will have to be solved manually by recreating the changes in an existing version of the blueprint. It is up to the person doing the merge to decide which version to keep and which to recreate. I found that instead of recreating the whole blueprint block by block it is better to have both versions of the game opened, each in its individual UE editor. This enables the copy/paste of the whole set of blocks. What remains is only to connect the pasted blocks correctly.

How it should be: Instead of adding a new functionality for an UE object by creating a logical set of blocks inside the object's blueprint a separate blueprint should be created that contains this logic. This blueprint should than be exported as a custom block that can be than used in a object's blueprint. This way most of the work done by an individual is not affected by other people's work at the time. The only conflict will be the single block added to the object's blueprint which is easily recreated after the merge. Not only that, but the new block created can be reused very easily in other blueprints as well.

Apparently this capability does not exist in the UE4 at the time of writing this issue. I will do additional research on it and if that is the true I will make a feature request the UE4 dev team. An additional plus to this feature would be the possibility to create an instance of the block which could be slightly modified while the original block keeps the functionality.

BojanStankovic commented 7 years ago

I have done some research and it looks like the only way to create custom nodes at the moment is by using C++, which is cool but not very useful to us. I have made a feature request that can be found here:

https://answers.unrealengine.com/questions/560943/feature-request-custom-blueprint-nodes.html

BojanStankovic commented 7 years ago

Apparently we can use Macros to solve this issue. I'm looking into it.

BojanStankovic commented 7 years ago

Great news! Macros seem to be doing what I originally wanted. The process of creating a macro is not difficult and I will write a short tutorial soon. Following screenshots show an implementation of a macro for switching the animations done by @napiorek in #30

Original Third Person Character blueprint: macros_03

Third Person Character blueprint after macro implementation: macros_01

The implemented macro: macros_02

The best thing is that the macros are stored in a separate file and that will improve our merge conflict solving tremendously. I'll clean up the blueprints we have at the moment an use macros on them.

DoctorMikeReddy commented 7 years ago

That's brilliant news. You've taught me something new!

-- WiMii?

On 11 Feb 2017, at 17:07, Bojan Stankovic notifications@github.com wrote:

Great news! Macros seem to be doing what I originally wanted. The process of creating a macro is not difficult and I will write a short tutorial soon. Following screenshots show an implementation of a macro for switching the animations done by @napiorek in #30

Original Third Person Character blueprint:

Third Person Character blueprint after macro implementation:

The implemented macro:

The best thing is that the macros are stored in a separate file and that will improve our merge conflict solving tremendously. I'll clean up the blueprints we have at the moment an use macros on them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

DoctorMikeReddy commented 7 years ago

There is a diff tool for Blueprints built into UE4. This will help in manual merges.

-- WiMii?

On 9 Feb 2017, at 16:24, Bojan Stankovic notifications@github.com wrote:

@DoctorMikeReddy

This issue's main purpose is just to point on how solving merge conflicts for blueprints is done at the moment and how it could be done more efficiently. Especially with larger teams and bigger projects.

Current scenario: At least two people are working on the same blueprint. At the beginning of the projects this doesn't happen but it will happen later down the development process and the further the project goes, more frequently it happens. This will result in a merge conflict for that blueprint. The conflict will have to be solved manually by recreating the changes in an existing version of the blueprint. It is up to the person doing the merge to decide which version to keep and which to recreate. I found that instead of recreating the whole blueprint block by block it is better to have both versions of the game opened, each in its individual UE editor. This enables the copy/paste of the whole set of blocks. What remains is only to connect the pasted blocks correctly.

How it should be: Instead of adding a new functionality for an UE object by creating a logical set of blocks inside the object's blueprint a separate blueprint should be created that contains this logic. This blueprint should than be exported as a custom block that can be than used in a object's blueprint. This way most of the work done by an individual is not affected by other people's work at the time. The only conflict will be the single block added to the object's blueprint which is easily recreated after the merge. Not only that, but the new block created can be reused very easily in other blueprints as well.

Apparently this capability does not exist in the UE4 at the time of writing this issue. I will do additional research on it and if that is the true I will make a feature request the UE4 dev team. An additional plus to this feature would be the possibility to create an instance of the block which could be slightly modified while the original block keeps the functionality.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

BojanStankovic commented 7 years ago

Thanks Mike! I'll take a look on how the diff tool works

BojanStankovic commented 7 years ago

This branch won't be merged since it was used in testing purposes only. Issue #42 deals with implementation of Macros into the project. Closing

DoctorMikeReddy commented 7 years ago

Assigned to me and Reopened so I can make notes on this for future years.