views:

756

answers:

6

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?

+17  A: 

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...

Chinmay Kanchi
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
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
Even the FSF has supported games that GPL'ed their engine but kept the other materials to themselves. +1
Tim Post
+6  A: 

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.

Tom
@Tom: +1 from me...that is an excellent motivational answer I have ever come across! :)
tommieb75
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
@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
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
A: 

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.

pdr
+4  A: 

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).

Andrei Fierbinteanu
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
A: 

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.

ire_and_curses
+2  A: 

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?

HXCaine
I have already started to work on it actually, I'll add the link when its finished.
Guzba