Git Product home page Git Product logo

Comments (1)

Scony avatar Scony commented on June 3, 2024

Well, the main idea behind FeatureFlags.tscn and FeatureFlags.gd is to have maximum flexibility and simplicity. The fact that FeatureFlags is a simple, single-noded, and autoloaded scene makes it usable from the editor thus giving flexibility while being a simple solution.

However, I agree that it's fairly easy to commit the temporary changes done to that scene by mistake.

I've been thinking a bit about this, and the only solution I came up with so far is to make FeatureFlags a @tool that would use a resource stored in the user://. The usability would be as good as now, and the solution itself would be just slightly more complex. However, the problem I see is that in this case, it will be fairly easy for the developer to forget about the flag that was changed as there will be nothing indicating the flag X was changed (currently in the editor we will see the indicators allowing one to bring back the default value, while in the repo the changes will be seen on the git level).

There's also one more aspect to the above - security. FeatureFlags in the current form serves as a flexible way to define "build-time options". Having such settings stored in the user:// makes it easier to alter flags - especially on the web platforms. I can imagine scenario where someone crates closed-sourced fork of the project and releases a game. If the FeatureFlags part would use user:// and would be same as in godot-open-rts, it would be trivial to take some customized config file and use with such a closed-source game thus giving the users flexibility that maintainers of the fork would not like to have.

So, unless we have solution to above problems, I think we have no other way than to stick to the current flow where we need to manually git add <file/dir> certain things before git commit -m <msg> to not include changes to FeatureFlags.

from godot-open-rts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.