What programming language does Source 2 use? And can i use C++?

As the title says . I saw that it was written in C++ , but from what i can see Garry uses C# but it can also use lua. So i started learning C++ as my first language and im curious if i can use it?

I’m not a C# expert, but I read that C++ and C# could work together if you want. You can import DLLs you compile from C++ directly in your C# codebase. (I hope not telling wrong things, someone will probably correct me if I’m wrong)

EDIT : As @TankNut says just below, C++ won’t be supported into S&Box. Plus I found on the Facepunch discord where it says that S&Box won’t support C++ (s&box/code channel)


Source 2 can use a variety of languages (including lua) for VScript

Sandbox however isn’t going to support VScript and is instead doing it’s own thing, you’ll be able to write your addons using C# and html/css for UI stuff, C++ isn’t going to be supported.

You can find more info here: S&Box FAQ


I forgot to ask about Sandbox variety of languages but tnx you actually answered it for me.

Indeed, I was wrong, thanks for the clarification :slight_smile:


I’d expect it’d be a great use to know C++ for adding functional support to the server-side of S&box. However natively I don’t think you’d be able to ship the addons you’re making in C++ from the server to the client for obvious reasons.

So keep learning C++, because it’s useful for other projects and I expect some aspects of S&box, but also start learning C# if you want to be able to make S&box projects.