1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 Catalyst - The dependency management tool you didn't know you need

Discussion in 'Programming' started by DukeSoft, Sep 26, 2019.

  1. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    I've been a GameMaker user since version 4 and I'm starting to use GM more and more professionally - but one thing that I think it really lacks is a proper dependency manager. I'm always copying over files from other projects, importing resources, searching the web for GML snippets. When the Marketplace was introduced my hopes went up, but unfortunately the marketplace just imports all the resources into your project and then you can't manage them anymore.

    Updating packages is horrible, and then there's the resource wasting fact of the included packages being included in my source control.

    Back in the days I wrote a package manager for GMS1, but that was quickly rendered useless as GMS2 came around the corner. I've recently rewritten the package manager for GMS2, and recently refactored it - I think its ready for use now, and I'd love your feedback.

    The project is called "Catalyst" - its a command line tool you can use to recursively import packages / libraries, and manage them. Uninstalling is easy, updating is easy, and the included resources get put nicely in a vendor folder in your project. It manages the .gitignore file to make sure the installed packages are not included in your git repository.

    Alongside the project I've included a package repository - by default its being used by catalyst. You can browse packages online and submit your own to be included in the repository. The roadmap for Catalyst contains a feature where you can use local folders as well, if you want to keep your libraries personal.

    The aim of this project is to improve collaboration, fuel open-source projects, improve reuseability and make GMS2 a bit nicer to use.

    Quick-start guide: gamemakerhub.net/catalyst
    Source-code: github.com/GameMakerHub/Catalyst
    Pacakges and repository browser: gamemakerhub.net/browse-packages

    Please let me know what you think!

    PS: If there's a mod around, can you please move the topic to "Tutorials" ? I think it fits better there ^^,
     
    Last edited: Nov 5, 2019
  2. Tthecreator

    Tthecreator Your Creator!

    Joined:
    Jun 20, 2016
    Posts:
    757
    This is amazing! WOW!
    I am also so fed up with this problem that I thought about making something like this myself. But it seems I don't have to.
    Can I upload my own packages to my self hosted website/repository, and have that work with catalyst?
     
    DukeSoft likes this.
  3. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    Thanks! :D I hope it helps making the GM life a bit easier for everyone.

    The program Catalyst right now contains only 1 repository out of the box - a Catalyst repository type, hosted on GameMakerHub. This repository only allows public repositories that are hosted on Github. GameMakerHub indexes them from Github (after being submitted by someone) and then its available in Catalyst. So, if you have an open source project and you'd like to share - run catalyst init in the project file, commit it, and submit it to the GameMakerHub repo. In short: if its publicly on Github, it can be included in the main repository. You can browse the repository here: https://gamemakerhub.net/browse-packages and you can submit your own here: https://gamemakerhub.net/submit-package

    This does however have some drawbacks (no private repositories for example), so the Catalyst software is built to support multiple types of repositories. Since this is a very early MVP release these features are not available yet, but they will soon:

    - Ability to define custom repositories in the catalyst file so you can host your own repository with your own packages (for example, hidden / private organisation packages)
    - Ability to include direct folders as repositories in the catalyst file, so you can use local projects

    I've kept this in mind as I've developed the tool and these features should be available shortly. I've also been thinking about a "paid package" repository setup, much like the marketplace, but thats a long way down the road.
     
  4. Tthecreator

    Tthecreator Your Creator!

    Joined:
    Jun 20, 2016
    Posts:
    757
    I'm really thankful this is free.
    I have some use cases in mind for this to use for my own (paid) marketplace assets. For this reason, I find it unreasonable to suggest using hidden organisation packages. but well... you said it yourself...
    When the time comes around to actually use it and it's not implemented yet I'd gladly contribute it myself.
     
  5. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    With hidden packages I mean for example a team (organisation) working on a project together - they all use internal packages for the team itself, which are hosted on the company's Github. The repositories there are private, only visible to team members.

    For paid marketplace assets this right now is definately not the tool to use - its focussed around open source packages. The "paid package" setup would require people to register, and buy packages from the website. But thats a whole different ballpark that would require a lot of extra work (setting up payments, accounts, licensing etc.) and thats a pit I don't want to jump in right now.

    Once the "local directory" feature comes around, you could ofcourse still use the marketplace to sell packages, and then users could use Catalyst with a local directory requirement to install the package, instead of through the IDE's marketplace.
     
    Tthecreator likes this.
  6. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,977
    Contact @chance :)
     
    DukeSoft likes this.
  7. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,460
    This is great stuff !!
     
  8. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,646
    Sounds great, will give it a go over the weekend.
     
  9. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    I've just released 0.2.0-alpha which contains support for local directories as repositories.

    You can now use locally brewed packages without having to share them on Github.

    Add this to your projects' catalyst.json, and the underlaying projects of that folder are available to include as well :
    Code:
    "repositories": {   "../private-projects": "directory" },
     
    kraifpatrik likes this.
  10. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    Version 0.2.1-alpha is available for download: https://github.com/GameMakerHub/Cat....2.1-alpha/gmh_catalyst_setup_0.2.1-alpha.exe

    This version includes 2 fixes;
    Issue #21: Files added after the vendor folder in the same directory were marked for deletion
    Issue #22: Exception when trying to install a repository that was freshly cloned

    Happy to see that @kraifpatrik published a lot of valuable packages, and @Katipo007 added a very useful localisation package.

    Browse the available packages here: https://gamemakerhub.net/browse-packages
     
  11. robproctor83

    robproctor83 Member

    Joined:
    Sep 30, 2019
    Posts:
    65
    The folks over at GM should buy this from you (for a nice sum) and then just include this in the baseline GM setup. There is no reason GM shouldn't have a package manager, especially considering how much content there is available for GM.
     
  12. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    Hehehe, I don't think they'd like the codebase (or language) very much :+)

    But thanks! I hope this can help out some people.
     
  13. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    2,070
    I've been following this for awhile, and it is pretty cool. It's certainly getting a lot of code out there that is very helpful. Is there any benefit to this over the built in marketplace?
     
  14. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    783
    Cool! Good to hear.

    Yes :) In contrast to the marketplace (which is basically just an "import assets" tool), Catalyst provides:

    - Version locking (running a specific version of a package)
    - Dependencies and recursive dependency resolving (one package using 2 others, each using two others)
    - Efficient source control support (Catalyst ignores the installed dependency files - they don't need to be included in the sourcecontrol of your project - just a reference to the package and version is needed)
    - Makes updating packages easy - it automatically updates the required files instead of you needing to manually delete all the files and re-installing a marketplace asset
    - Local / private packages - easy to include one local project into other multiple projects without needing to upload it to the marketplace (or any place else)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice