RE: Addons & Dependencies

The section about dependencies in the recent news post worries me a bit. It seems to imply that not only is dependency management a non-goal, but that the notion of addons is also not really being considered.

My understanding is that s&box is meant to be based around more monolithic multiplayer gamemodes instead of individual addons, which is fine, but the end result is that some gamemodes (like sandbox, roleplay, and TTT) will become ubiquitous, and people will want a way of managing addons for them. A lot of developers, myself included, don’t have the time or energy to build an entire game in s&box, but might wish to create a tool or a few models for a sandbox gamemode.

Furthermore, I doubt non-technical users are going to want to manually fiddle with the gamemode in order to play a singleplayer or locally hosted game. I have fond memories of downloading addons off garrysmod.org and throwing them in a folder, but to bring back that sort of thing seems like a couple of evolutionary backward steps.

I can actually agree that handling this stuff at run-time is a mess, especially with C#. If an addon is missing a dependency, then it probably shouldn’t compile. Maybe package management could be more closely integrated with development tooling and act more like a traditional package manager like cargo or npm. Maybe it could be achieved with an existing system like nuget, but I don’t know enough about the .NET ecosystem or s&box’s way of building gamemodes to say whether that’s a stupid idea.

I also understand that dependency management is a difficult problem that you might not want to tackle right now. Version conflicts, deleted dependencies, and the risk micro packages taking over are all valid concerns. I don’t think it’s an unassailable problem though. Recently I’ve been playing modded factorio, and I was astonished at how well the game handles mod versioning, dependencies, and conflicts. In factorio mods are a secondary distraction, but for s&box it would be crazy for this to not be a consideration.

The bottom line is that there needs to be some system for handling addons and dependencies between them. If there isn’t, the same kind of problems are going to present themselves again. People will invent their own ways of solving them, that are hopefully less brain damaged than “throw .cs files in this directory”.

22 Likes

I’m completely with you. Anyways, I think that currently it isn’t as important to have this functionality too. To get started, testing things and implementing core features, the possibility of creating only gamemodes should be enough. Nevertheless, I think add-ons or better said, package management, is definitely needed and necessary to create the best user experience. Not just for TTT, rp, PropHunt,…, but overall skins, objects, etc. otherwise would have to be integrated into the gamemodes itself - which could lead to license issues, outdated versions, etc.

5 Likes

Currently i can say (i think) that garry simply doesnt want to have the issue that the player needs to download something (example would be csgo in the blog post) to play a gamemode

it should just be press & play as instant as possible, that would break when multiple dependencies needs to be downloaded too which may even require more dependencies and then some dependency has an outdated version of something that is already downloaded as dependency but that breaks everything because of it (as the newer version changed something it depends on)

and that issue is recursive to everything it needs to download so i can understand garry that he doesnt want something like that.

the only way currently would be to just include the dependency in the gamemode/addon directly when the license allows that so it will always use a working version on its own and doesnt create conflicts (if done right)

but i would also like to have something to manage that as it may make sense to do that it will also create a lot of bloat and trash in the codebase over time when everything includes everything again and again without reusing existing stuff :d

2 Likes

First of all, things does not break with new updates as long as it supports a consistent versioning. Upgrading / Updating a package could result in incompatibilities, but that - for sure - has to be done manually by the gamemode (or server??) creator. I didn’t thought about a “subscription” model like it’s currently the case in the Steam Workshop, but a possibility for gamemode creators to add packages to their projects and - maybe to keep it simple and instant per click playable - compiling everything together. I don’t know how it’s handled currently, what similar reasons have been to avoid a subscription model like in gmod (maybe to keep auditing / workshop moderation easily), but I guess these are good reasons. Theoretically, previously descriped package management should be already possible with .NET, but there isn’t a store or a browser for such packages yet.

//edit: I understand the problem of downloading tons of stuff, but if code, skins, objects etc. have to be copied into every gamemode, you have to download them multiple times if they are used (and copied) by multiple downloaded games.

5 Likes

I agree, Semantic Versioning exists for a reason.

4 Likes

How does Factorio handle mod dependencies? Maybe S&Box could do it the same way or use their approach as an inspiration?

Sorry if I’m missing something important, the following is my personal opinion

I like the way Nix handles dependencies (of course, that’s quite different levels of complexity and Nix has a local declarative repository of everything which makes thing easier). We can have different versions of the same addon which is just hidden behind naming and hashing.

S&box like used to reference addons through GitHub repos (?) and adding locking to a specific revision could solve the problem of version matching. Actually, addons are to be big in future IMO (and therefore no Press&Play), so including every asset in every addon would be no better than having several possibly already downloaded earlier versions of the source addon. Don’t know about code and how it could be reused this way except NuGet

1 Like

The idea is that S&Box is built around a “one click instant play” matchmaking system in which you choose the gamemode you want to play, and then you are thrown into a session that only gives you the game, and nothing else. No 150 anime player models, no pointshop, no meme weapons, no extra bullshit that nobody asked for. Not unless it’s a part of the gamemode itself. The game no longer revolves around the dedicated servers with their own addons, you only have the gamemodes themselves. I don’t know if this is already set in stone, but I’ve seen developer opinions that this is the better way.

Because of this, an addon system would be pointless. The only way you would use addons is to include them in your gamemode, which would affect everyone who chooses to play your gamemode. In this case, you indeed create problems with cross-dependencies and it would make your gamemode prone to becoming unplayable once an addon breaks.

The whole criticism lies in whether it’s a good idea to scrap moddable dedicated servers in favor of matchmaking, but for now this is just an assumption, so I won’t go into detail here. However, it’s true that some simple gamemodes, like the classic sandbox and TTT, would lose their individuality and diversity if we were forced to only play them the intended way, with no way of customizing them however we want for a fun change.

Regarding addons themselves, people also did addon-addon dependencies in GMod, but when was that ever a problem? I’ve never seen people create an addon for someone else’s addon (except for WAC Aircraft I guess), all I’ve seen is someone creating a base for their own addons. This has the one good purpose that you only have to push out an update for your important base stuff once that breaks, so you don’t have to go around and update every single one of your mods one by one.

4 Likes

I really hope that this is not a final decision. There’s a reason why games like TTT are still thriving - it’s the fact that user generate content is still being created. You shouldn’t have to fork the gamemode just to add a custom traitor weapon or similar, an addon would suffice for that. Also, the servers that exist are the reason for TTT being a thriving mode - there’s a reason why they have been able to stay open for many years. Just hopping in for a round here or there is fine, but people need some form of progression, or they’re going to lose interest in a gamemode. I think there’s room for both systems and I could see the appeal of matchmaking, but a dedicated route is also crucial for players wanting more than just a mundane experience.

9 Likes

Nothing is stopping devs from adding progression even if there’s matchmaking across multiple servers. How do you think games like CSGO do it?

1 Like

I heard that for now gamemodes are downloaded via github, git has a “submodule” feature which practically allows you to include external repositories, how does that work with S&box?

3 Likes

Some gamemodes—like RP (or has it become irrelevant so far?)—require continuous gameplay which scarcely can be projected to an instant matchmaking system. And a sufficient part of community is interested especially in these gamemodes so that’s quite a thing to consider.

3 Likes

One thing that might be misunderstood is, that this is not just gmod 2. So it doesnt need to support the gmod community in all their wishes. They try a complete new direction for Sandbox and it also seems like they are going for a more versatile Engine that seems Core-like and probably will produce completely new gamemodes.
It doesnt have to support the old way that RPs, TTT or Prophunt worked with. It seems to be a more gamemode-complete approach which will produce new games you’ve never seen before.

It really feels like everyone just wants a better gmod remake, but what about evolution in a complete different way?

1 Like

Unfortunately many do see S&box as a direct successor to GMod.

Even ignoring this, the current direction feels (personally to me) like a limitation, some just-a-party game. Sorry If I’m wrong. As already said here, possibly the best solution is to consider both matchmaked and more usual sessions (not that the developers should make it right now.)

2 Likes

Just made a thread about this I am interested on your thoughts

Evolution from Garry’s Mod to Roblox :+1:

2 Likes

Modular/addon system isn’t a special feature of Garry’s Mod - it’s a programing concept made for a reason to allow simple code reuse without childish copy/paste shit. Rejecting it seems to me like a pretty big step backwards.

So the official recommendation right now is to copy and paste code into your addon to re-use it between projects.

I can see this statement only as a temporary measure until devs will find the best way to handle dependencies. But that’s said - copy-pasting is never a good option to handle code especially for advanced projects.

8 Likes

Rip addons.

I wanted to make sure nobody made this point before I made it myself. Submodules are perfect for this in my opinion, though that only helps if the modes and dependencies in question are hosted using Git. Once the game drops I’ll probably be making a bunch of utility libraries meant to be included like this.

I don’t think the problem is dependencies, I think it’s the lack of a good system to handle dependencies that makes them so taxing.