Development workflow

Hi there!

Okay so that’s been several days I’m browsing this forum, talking to some of you, seeing some wonderful ideas (and creations), …

Now, more precisely for the coding section, I saw several threads like what is our favorite editor (mines are VSCode and Vim :upside_down_face:), using containers for deploying servers (I prefer LCX over Docker :sweat_smile:) or even posts like this one (pipelines are life :heart:).

Anyway, I have some experience with video game scripting (Lua, C#), but not that much (and never on Gmod/any source game, please don’t hit me). So the only workflow I know is:

  1. create a folder
  2. git init; echo "Awesome useless addon" > ./; git commit -am "Initial commit"; git push (don’t mind if I don’t set the remote server in this joke)


  1. use VSCode, Notepad, or whatever you want to let your creative code flow into your files
  2. copy the addon in your server (if you don’t already edit it from your server folder)
  3. restart your server, reload/reconnect to it
  4. going through the 5 stages of debugging
  5. jmp start_developing_like_god

Now, as @interstate said in his/her post, maybe it would be easy to use DevOps techniques within the S&Box content development if we are really able to use Github (or every remote public Git/versioning provider, that would be even better). This feature seems to be more than possible if look at S&Box developer portal preview.

Knowing all this, we would be able to use continuous integration and pipelines to set code quality checks (for instance with linters), code coverage with unit tests, auto-deployment by deploying the addon and starting a server, and so on.

Personal opinion on a touchy discussion here, don't open if you don't want to hear someone trash talking current addon monetization

Also, I really hope that featuring git repositories will encourage the community to abandon this very monetized side of developers (creating competition and not helping newcomers by keeping everything secret to make even more profit is a bad side of game scripting communities IMO). There are many ways to monetize your “code” (I don’t like to use that word, but I want to focus on the development side, I have a different opinion of maps and model monetization) and your efforts without wanting the fame, money and all that goes with it.

Finally, all that text for just asking what is your current workflow for your current projects? :grinning_face_with_smiling_eyes:
Do you think deploying a professional workflow would fit your needs?
Do you have any ideas on what can we put in place to make development easier in S&Box context?


I understand your viewpoint, but I’d like to tell you mine. For context, I’m the developer of CivitasRP, a closed-source roleplay framework. I simply don’t see the benefits of going Open Source for the time being. I’ve invested countless of hours already on the agnostic prototype, UI etc. and going open source for me would probably be a minute difference. Just looking at the changelog of DarkRP for example, nearly everything is done by FPtje even tho it’s open-source. I’m pretty sure if I open-sourced my gamemode the same thing would show. Since my framework is focused on hyper-realistic CityRP. There isn’t really alot of space for modification. If you compare almost all basic DarkRP servers for example, they’re basically the same except they each have some different weapon addons that they decide to charge $20 for you to use. I think that seems insane. Especially considering FPtje, the original creator of the gamemode, doesn’t see a cent of that. Imagine how much money FPtje is responsible for making(for other people).

I think open-source has its uses, I mean I have myself created an OS project for S&box, OAP(Open Arms Project), but i don’t think only having open-source projects helps developers, really only helps for things that multiple people will use.

1 Like

Commenting on the CI/CD part of your great article, I’d expect creating a mocking library for dealing with unit testing for S&box will be a pain, unless it’s baked in. Another option for unit testing would be to make something similar to selenium and spin up a s&box server and running tests that way, but I think it becomes a bit ineffective.
For the gamemode I’m working on, we’re looking at containerizing the s&box server so we can spin up instances of the server quickly and efficiently, so I imagine this route might be better for our specific use case.


Unit testing is more about testing one thing without touching the whole application, so it should be possible to write unit tests once you’ve detached logic code and run tests anywhere outside the game.

1 Like

Of course, maybe we should create a thread dedicated to this debate if that’s allowed

Before going through your point of view, I just want to clarify that I’m absolutely not against monetizing your work. All work deserves to be paid. I just want to point out the lack of cooperation that can be sometimes too present sometimes in some communities.

Yes, I agree that your time and efforts should not be given without any fees. I mean, based on my experience, the major drawback of open source is that nearly anyone can claim your efforts as their own and monetize your work in your back. That’s not acceptable.

Indeed, if nobody contributes to making the project better even if they use it, that’s really sad. However, just getting feedbacks and tips are already a win :slight_smile:

That could be one idea for monetization: you can have a generic open-source base, then you provide premium features or custom development. Another way to do this is to have premium support where people can ask for features, only premium supporters can “sponsor” a feature.

This being said, I’m aware that this is not something that works with every product and it requires a lot of attention for sure. More attention than simply selling the whole addon at least (this is not a negative comment, people can’t take their whole week to work on game scripts).

You have a point, open-source promotes community creativity with cooperation. But many users won’t take the time to interest themselves in all of that, it will just be a bunch of copy-paste servers and that’s sad but real indeed.

I totally agree with you on that one. Maybe setting everything open-source is more harmful, but, I would love to see at least open-source libraries, framework,s and proof of concepts (for now, that’s what I’m seeing, but I know other communities where it’s not the case).
On my side, I think I’ll probably stick to open-source for my project because that’s how I’m working (but we should never say never).

I’m definitively fine with developers who monetize their work when it’s legit, when there’s some work, when they’re not just leechers. Maybe I should modify my small paragraph to talk about leechers and opportunists developers instead of monetized addons

You’re right, it has great chances that CI won’t be painless. I already wonder multiple times how we can implement something like that in a video game for scripting purposes, that’s why I wanted to talk about it here. Maybe someone has the magic sauce to do it right :smiley:

Also, @Phyksar summarizes the unit test quite nicely. Unit tests are not designed to test the behavior of your script in its final context, but to test the logic in a controlled environment.
I think that every software should be tested at a logical scope, at least to eliminate predictable errors. Thus you can determine if your code is doing what you want (input cases => expected output). Depending on the complexity of your code, you would need to test some logical path and assume that some others should not be tested as they are too rare/not enough critical/… . Testing everything with every input possible is just overkilled, we develop game scripts, not aeronautic tools :grinning_face_with_smiling_eyes:

Then the most difficult part remains the CI part where you put your addon in S&Box context. Indeed it depends of your database connection quality if you need one, on the amount of concurrent player, … . You have too many variables to have an efficient Continuous Integration infrastructure.

Thanks for clarifying :slight_smile:

1 Like

I’ve thought about this, and I am tempted to do this, but the question becomes of how much you want to open-source. I might go open-source with my core code when it comes to the character system. You’ve definetely awoken some of my previous thoughts from the beginning.

1 Like

I have mixed feelings on the topic. I think monetized addons aren’t inherently bad. Some people may have a hobby in programming, and they want to make some extra money on the side with that talent. I don’t think it’s any different from people who make and sell blankets on etsy as a side hustle. I think addon monetization can be a good thing, and it’s okay to have monetized addons. On the other hand, though, I respectfully disagree with the idea that open-source doesn’t really help developers. As someone who learned through exposure for the Garry’s Mod content I made, I would be lost without being able to look at other people’s work and think, “Oh, alright, that’s how they do thing.” I think it makes learning far more accessible.

1 Like

What I meant is that it doesn’t help the author, it’s entirely a self-less act. I respect that alot and have changed my view and will open source a part of my gamemode, but in all honestly I won’t gain much from it personally. I’ve just decided to do it because I want to give back to the community cause others are doing OS things that I might use.

1 Like

Oh, I get what you mean. Yeah, it’s not really helpful to the developer. Open source really just helps onlookers anyways, unless people are altruitistic enough to contribute their own improvements. I get what you mean now.

I meant my original comment mostly facetiously but I’m glad you thought about it! A release pipeline would be interesting to implement but ultimately when you’re dealing with a lot of bespoke infrastructure that lives in the game itself it would probably be very difficult to get unit testing working properly. There’s likely a lot of negative work that comes with mocking that all out, not to mention maintaining a second source of truth for the Sandbox API.

That being said, it’d be pretty cool to set up some automatic linting/formatting, because that’s probably the biggest benefit to be had here. Nothing was worse than trying to work with someone’s Lua code who did not indent properly, or even in inconsistent intervals.

As for the open source discussion, I thought it was the case that clients will compile the same executable that’s running on the server, meaning it would be impossible to have truly proprietary code in Sandbox. If someone has a link to a discussion that says otherwise, feel free to correct me.

1 Like

No that is not the case, that is honestly just an awful decision if it was. We already discussed it in the discord anyway. We are fairly certain it’s compiled on the server and given to the client. Hotloading server and client code would not be any good if they aren’t in sync with their backend. The only way to keep them in sync would be to have the server give out code and why would you have the server throw out massively larger uncompiled files through the network that someone can intercept and tamper with.

1 Like

Right, that is my point- The client can just take the .NET assembly it’s given and decompile it to effectively look at all of the source.

obfuscation exists to prevent exactly that