Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I have a bit of a dilemma and wanted to get some other developers' opinions on it and maybe some guidance.

So I have created a 2D game for Android from the ground up, learning and re factoring as I went along. I did it for the experience, and have been proud of the results. I released it for free as ad supported with AdMob not really expecting much out of it, but curious to see what would happen.

Its been a few of months now since release, and it has become very popular (>250k downloads!). Additionally, the ad revenue is great and is driving me to make more good games and even allowing me to work less so that I can focus on my own works.

When I originally began working on the game, I was pretty new to concurrency and completely new to Android (had Java experience though). The standard advice I got for starting an Android game was to look at the sample games from Google (Snake, Lunar Lander, ...) so I did. In my opinion, these Android sample games from Google are decent to see in general what your code should look like, but not actually all that great to follow. This is because some of their features don't work (saving game state), the concurrency is both unexplained and cumbersome (there is no real separation between the game thread and the UI thread since they sync lock each other out all the time and the UI thread runs game thread code). This made it difficult for me as a newbie to concurrency to understand how it was organized and what was really running what code.

Here is my dilemma:

After spending this past few months slowly improving my code, I feel that it could be very beneficial to developers who are in the same position that I was in when I started. (Since it is not a complex game, but clearly coded in my opinion.)

I want to open up the source so that others can learn from it but don't want to lose my ad revenue stream, which, if I did open the source, I fear I would when people released versions with the ad stripped, or minor tweaks that would fragment my audience, etc.

I am a CS undergrad major in college and this money is giving me the freedom to work less at summer job, thus giving me the time and will to work on more of my own projects and improving my own skills while still paying the bills.

So what do I do? Open the source at personal sacrifice for the greater good, or keep it closed and be a sort of hypocritical supporter of open source?

share|improve this question

migrated from Aug 11 '11 at 7:45

This question came from our site for professional and enthusiast programmers.

Just out of curiosity, what is this game? I recently got a new Android phone and am always on the lookout for games that I would like to play... – Chinmay Kanchi May 21 '10 at 21:48
+1 from me for a very good question!!! :) in fact I favourite'd this question as it would be a motivational kind of question... – t0mm13b May 21 '10 at 21:55
Absolutely stellar question. +1. – Tim Post May 23 '10 at 19:25
When you open source it, could you please come back here & post a link so that we can look at it & learn? Thanks++; – Mawg Mar 13 at 14:40

8 Answers 8

up vote 59 down vote accepted

One possibility is to do what several of the large game studios have done (ID software for example). That is, you release the game source code, but keep all the resources (graphics, sound, etc.) to yourself. That way, people can use your code to build their own games, but won't easily be able to duplicate it without a significant effort to recreate the resources...

share|improve this answer
I think this is the most practical answer. Most people are going to look at the code to learn how you implemented things, and so there really is no reason to include graphics, sound, etc if this is the primary focus. – Corey Sunwold May 21 '10 at 21:56
This is the approach I am likely to take. I think the most beneficial thing I could do for someone interested would be to show them how I organized the threads and their communication, without even needing to reveal app specific code (which may just clutter it really). Thanks for the suggestion! – Guzba May 21 '10 at 22:45
Even the FSF has supported games that GPL'ed their engine but kept the other materials to themselves. +1 – Tim Post May 23 '10 at 19:26
@Guzba ID software also waits a few years before releasing source of their game. Create a new better game with a better library and only then release sources of the old, but still a great library. – Czarek Tomczak Sep 9 '13 at 7:01

There's nothing hypocritical about earning money from your work that you've spent time, effort and your own resources in getting done. Open-source doesn't mean that you have to let others take something that's yours or get a free ride. Otherwise, you might as well make your home open-source and let the thieves in. However, I think your actions may become muddier if you prevent others from earning their fair reward in the same way.

I say: Well done on your work and don't feel guilty about earning a living from it. If you wish to give something back to the community, it can take all kinds of forms, like helping others become better coders at StackOverflow.

share|improve this answer
+1 from me...that is an excellent motivational answer I have ever come across! :) – t0mm13b May 21 '10 at 21:51
I think this comment has put me back on the right track when it comes to how to support future devs. I can both reap the rewards of my labor and give solid open code back at the same time (as described by Chinmay Kanchi). – Guzba May 21 '10 at 22:49
@Guzba: Indeed... everyone's got the right to earn his (or her) bread as long as you go about it in a fair way. – Tom May 21 '10 at 23:11
You should probably make clear the distinction between Open Source as defined by the OSI (and the related Free as defined by the FSF) and open source simply meaning that you're willing to let people peak behind the curtain. Because the OSI and the FSF do mean letting people take what you did and run with it... – dmckee May 23 '10 at 12:12

Just my 0.02$: Keep the sources to yourself for now, to ensure you make enough money to sustain your next (big) project. When the downloads for the game start going down and not so many people are playing it anymore you can open source it. Sort of like how John Carmack did with Quake. This way, by the time other people start using your sources, you are already working on the next thing and retain your competitive advantage, but still offer something to the community, even if it's not from the first moment (better late than never).

share|improve this answer
I am blending this suggestion with Chinmay Kanchi. I plan to hold on to most of the core code that is specific to and only even relevant to my game and intent to release a functional but generic "how I did it and why I did it this way" source for others to start from that is far clearer than Lunar Lander for example. Thanks! – Guzba May 21 '10 at 22:54

Why not just make a blog in the name of your game, which is clearly very popular, telling people how you achieved certain effects and perhaps writings short tutorials (although you don't have to go to that much effort usually -- code speaks for itself).

This way you can share your work without sharing too much, while using the name of your game to explain explicitly how things may be done for the benefit of others.

Win-win, right?

share|improve this answer
I have already started to work on it actually, I'll add the link when its finished. – Guzba May 24 '10 at 1:59
How did this go? – HXCaine Nov 30 '10 at 13:12

Open-source is not necessarily about altruism. People will open-source a framework to get other people's support in improving it, while building their applications on top of that framework. People will open-source software just to get their name out there, which can reap financial rewards when looking for a job. I doubt many people open-source applications hoping that the karmic benefits will feed their families.

share|improve this answer
Good point. If others develop the framework, it still needs the creativity with the OP, and maybe not everyone, has to develop a good game with it – Mawg Mar 13 at 14:42

There are a few options. One approach that could work might be to open-source the basic version of the game, while keeping the best features closed. Another is to dual-license the code, restricting commercial use.

The general options available are discussed in this related question: Making money with open source as a developer.

share|improve this answer

This would be a bit of work, but I suggest making adjustments to your app design so you can extract and open-source a framework. By releasing a framework, you could keep your app code to yourself while giving others the ability to not only see your code, but have it as part of their applications without having to rewrite it.

You'll need to provide a sample app with your framework, but that wouldn't take long since you already know the ins and outs. Plus, the development process might point out a few features you could add.

Not only would that solve the problems you've outlined, but any company that uses the framework will be fighting to hire you.

share|improve this answer

I suggest:

Patience & Honesty

they are sweet virtues. You see things eventually die & market always moves on, I suppose by the time I am posting this you may have lost a few users, although I sincerely hope not.

Set a lower than break-even-point bar of income for yourself, once you reach this open-source your project - without any self excuse.

Because from industry experience, I can assure you copying you graphics & audio would barely take a trained competitor just a few hours, like myself.

Better yet, become an instructor. Seriously, you will get:

  1. a short spike of income, like around $5k on Udemy or Lynda - satisfying
  2. reputation among peer & something enviable to add to your resume`
  3. actually achieve your goal.

See Creating a Flappy Birds Clone in Python

share|improve this answer

protected by MichaelT Jun 3 at 15:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.