Which open source license?

First of all, hi everybody! I’ve been lurking for a while now, but I decided to register now that I have something to ask.

I’ve come to the conclusion that DRM is bs, and shouldn’t be used since it doesn’t prevent piracy in the long run, and is just a bother for legit users. Now I think I should use some open source license, so people could mod my game if they wanted, and continue it’s development if I abandon the project. I don’t want to have a direct download link to the source for everyone, but I could, for example, include it with the actual game, so people would buy the game, and then get access to the source.

So, what would be a license that allows this but doesn’t allow the user sharing the code to the public? Mods, of course could be distributed, but only the .class files the mod maker changed, not the whole game.

Sorry if that explanation was hard to understand, but tbh, I don’t know what I’m looking for exactly either.

If the code can’t be shared it isn’t open source.

If you have to pay to have access to the code it isn’t open source.

Eh, read this. Pretty much all you will need.

http://www.apache.org/licenses/LICENSE-2.0.html

I know it is a lot to read but it pretty much gives you an idea of where you stand given certain circumstances.

Ah, I thought there was a problem in my way of thinking. Well, I guess the game will be free to those who take the time to compile the sources, and others can either search the internet or buy it. Thanks for the help!

You can allow mods without releasing your source code. Just provide interfaces for people to use. Also use those interfaces for yourself so anyone who makes a mod can do anything that you can do.