don't click here

Question: Best way to open-source an engine to the community

Discussion in 'Fangaming Discussion' started by cmakeshift, May 24, 2017.

  1. cmakeshift

    cmakeshift

    Member
    15
    0
    0
    Hello to all

    I have been posting about my Sonic engine for a little while now, first in a thread back in SFGHQ before the most recent wipeout, then a couple of posts in the screenshots/video thread. It is named dwEngine, but the name is yet undecided. Here it is:

    [media]https://youtu.be/KryYucArniI[/media]

    Sorry for the capture errors. Please look past them, here it runs at butter-smooth 60pfs (Linux, Intel graphics).

    So as you can see, it is a basic HD-ready 2D Sonic engine. It was written with Qt 5 and QML, and custom native components on top. The physics are good: implemented from scratch following the SPG as close as possible, deviating only in how the sensors work under the hood. As far as I can tell, they are indistinguishable from the classics. There is an in-game level-editor that allows you to create level layouts and place objects (everything is an object). Under it all, the engine employs a binary tree for culling. There needs to be more work on custom objects, the level could receive some improvements, and it reeeeally needs some good assets for a good one-level demo. Whatever is there, I either made myself or stole the sprite as programmer-art.

    My problem is, while I'd love to develop this as much as possible before release, I simply do not have the time. Nos as long as I have graduation coming up and a part-time job to keep. I thought it would be a nice thing to do to just give it to the community right now, and see what can be done with it. Maybe bring on more people and then work on a fangame? Who knows.

    Is anyone really, truly interested in this? Would it be a problem to just put this up on GitHub, with the Sonic assets and all? Opinions, ideas, and angry mobs are all welcome.
     
  2. Billy

    Billy

    RIP Oderus Urungus Member
    2,118
    178
    43
    Colorado, USA
    Indie games
    I'd say putting it up on GitHub would be the best option, paired with the open source license of your choosing. Personally, I'd go for GPL, but I care a lot about people sharing their changes, but you may not. You can make the assets open as well, but if you don't you'll want to include at least some basic ones.

    Don't be discouraged if nobody really picks it up and runs with it, though. There are many Sonic engine options out there these days. Doesn't help that most fan games seem to be one-man affairs (would love to be proven wrong on that).
     
  3. Violet

    Violet

    Member
    150
    2
    0
    Sweden
    Flicky Engine, Overdrive
    Like billy said, put it on GitHub if you want.
    Although I'd wait until it's fully done until i release it. So people have the full experience.
     
  4. AeroGP

    AeroGP

    Member
    130
    1
    18
    Los Angeles, CA
    Sonic for GameMaker: Studio
  5. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Put it up on GitHub, use a license like MIT or BSD (this will allow people to rework the engine into something usable for a commercial project, like how Freedom Planet and Spark the Electric Jester used Sonic Worlds; GPL forbids people to do that!), explicitly state that the Sonic assets are not released under an open source license and belong to SEGA, and you should be good to go.
     
  6. Billy

    Billy

    RIP Oderus Urungus Member
    2,118
    178
    43
    Colorado, USA
    Indie games
    GPL does not forbid selling your software. Basically if you GPL a game, people are actually paying for non-open assets (much like how the original Doom is now) because they have to release their changes. This will make it less attractive to people who want to use it for commercial games, however.
     
  7. Blastfrog

    Blastfrog

    See ya starside. Member
    Wha?

    GPL makes it more attractive for commercial use. Anyone that wants to hold onto code that isn't theirs are irrational assholes. There is benefit to sharing your code: outsiders can improve it, and you can just take their changes without needing permission.
     
  8. cmakeshift

    cmakeshift

    Member
    15
    0
    0
    Thanks guys, I have settled on GPL v2. On the next couple weeks I will prepare the release, get rid of as many proprietary assets as possible (especially music) and post it on GitHub (and here).
     
  9. James K

    James K

    Member
    39
    0
    0
    Please reconsider using MIT, BSD, or Apache 2.0;

    GPL will discourage people from using your code with existing MIT/BSD/Apache code.

    --

    Please reconsider not using GPL.

    GPL will add extra restrictions that will limit the amount of people that can use your code.


    GPL is a viral license
    This means, anything you combine with GPL, must also be under GPL.
    This is bad, because relicensing existing work to GPL is not always practical.

    First of all, most new open source software is MIT licensed(at least on Github's ten million+ repositories https://github.com/blog/1964-open-source-license-usage-on-github-com)
    [​IMG]


    GPL is incompatible with MIT, BSD, Apache, and most other licenses
    This is bad because it means people can't easily use their own MIT code with your engine to add new features.



    What if someone has made a good graphics engine in MIT license,
    and then they want to combine MIT code with your GPL code for the 2D physics so they can make this?:

    https://www.youtube.com/watch?v=ZxXycBv3Rlk

    If you use GPL, they can't do that, they have to relicense all of their code just to use a part of your engine,
    and most people won't relicense, they just wouldn't bother because your GPL code is incompatible with their license.

    If you use MIT, BSD, or Apache 2.0; your code can be used in many more projects; and more people can build on top of your code.


    More and projects have switched from GPL to MIT/BSD/Apache recently; because MIT/BSD/Apache is compatible with more existing code bases, AND you still receive credit and the possibility of others contributing back code. And for many many MIT licensed projects, people DO contribute back code and have dozens of contributors.

    People won't be contributing back any code at all if your GPL license means they can't use your code in the first place
     
  10. cmakeshift

    cmakeshift

    Member
    15
    0
    0
    Wow. Lots of bold text. You make a very nice case.

    So... is this a question of where I lean, Politically? Leftie? Libertarian? I chose GPL because I did not want to see it be "Tivoized" by someone.

    Then again... Isn't this all a giant hack atop the QML runtime and QtQuick 2? A hack that I love and that works, granted, but a hack nonetheless...

    So let this be the first influence of the community on the project. BSD 2-clause it is.

    Oh, there was that one time when someone told me to not use Sonic CD's 'jumping off stage' sprite for every time sonic is falling without rolling, because that looked stupid. Huge thanks to that guy.
     
  11. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,237
    969
    93
    Long-term happiness
    Please stop spreading false bullshit about the GPL, James K.

    GPL licensing a project like this is just fine.
     
  12. Blastfrog

    Blastfrog

    See ya starside. Member
    It's a good thing that GPL is the way it is. If you can't get code relicensed: oh well. Either forget about it, find a GPL (or compatible) equivalent, or write your own version. It's for the best, the folks at FSF know what they're doing.

    I strongly encourage you to consider GPL over other options. A good example is the Doom community, that's the prevalent license there, and it has served them very, very well for numerous reasons.

    An even better example: Linux. Android OS is built on it, and thus you can pull anything you want from it. You can make any version you want, with anything from anywhere so long as it's GPL or compatible. I emphasize that you can indeed use non-GPL code in GPL projects, so long as the licenses are compatible.

    Bull-fucking-shit. That's the entire point of GPL, is to maximize sharing code! Your statement is only true if other people are using projects not licensed under the GPL.

    Point is, if it's under the GPL, you can use any and all code that is also under the GPL. Sure, it's "viral" and limits your options to work outside of it, but the benefits far, far outweigh that (frankly, insignificant and irrelevant) drawback.

    And damn them all for doing so. The vast majority of anything that actually matters is still under GPL and will remain so for good reason.

    Don't get me wrong, the others aren't terrible licenses or anything (at least not MIT/BSD, I don't know enough to comment on others), but they are prone to potential abuse. The GPL is strict for this very reason.

    Actually, no. Most free software projects are under the GPL (and for good reason). Going GPL may restrict your use of code from other projects under incompatible licenses, but you're actually going to have a lot more available to you if you do go with GPL.

    Dammit. Don't do this, please. James is full of it. I might be arrogant (I'll admit as much!), but do consider the facts. Consider the benefits and the drawbacks. There is a reason the GPL has so well established itself, and the fact that there are projects that abandon it for mere convenience to use non-free code does not diminish the value and strong ethical standard of the GPL; it just means that those who move away from it are being unethical and lazy pricks.

    If you choose to go for another license, you weaken the GPL as a whole. It is the best option practically and ethically, but it only works when everyone cooperates. Don't be a part of the problem, be a part of the solution. Truly free software does not tolerate non-free uses of code, or even the potential for it.

    Sure, it's a little Borg-like. Doesn't matter, though, the excellent results of the FSF's work speak for themselves.
     
  13. winterhell

    winterhell

    Member
    1,165
    7
    18
    So... what happens when someone violates your GPL or otherwise licensed project? Can you sue them? Do you get money?
     
  14. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Yes. BusyBox sued companies using their stuff without providing the source code.

    Also, the main reason GPL works for Doom is that the engine and the game assets are separate. The Doom engine is released under the GPL, and any derivatives or modifications have to also be under a GPL license. HOWEVER, that's just for the engine that runs the game. The game assets - the stuff that makes the engine run Doom - are under a proprietary license, and you have to pay id Software to use it. You don't have to use the original asset files, you could make your own and run them with the engine; that's what FreeDOOM is doing.

    Sonic fangames, however, tend to have the engine and the game assets intertwined together, generally due to the technology used in the community. (Fusion, Game Maker, etc. combine code and assets into a single blob.) As such, a GPL license can't work well here, because you can't partially open source it. You can't abstract out the game engine from the assets. And even then, if you did have an engine that was able to abstract everything, you'd still have to code in the behaviors of objects unique to your game: if you didn't want to give away how you did that awesome boss battle, you would have to have a scripting language implemented in the engine that read code from the asset files, which is a lot of overhead for a 2D platformer game, and making a scripting language and testing it can be a total pain in the ass.

    (For the record, that's how modern Doom mods are made: DECORATE, ACS, ZScript are used to bend the game engine from the asset files.)

    For over a decade, the Sonic fangame community used its own informal "license": If used, please give credit. A more formal version of this would most likely be the 2-Clause BSD license. This is effectively what Sonic Worlds is licensed under, including Sonic Worlds Delta. If it was under the GPL, I would have to force Strife to open source the MFA for Freedom Planet, because he made changes to the code that were not released under GPL. Same goes for Lake and his indie game Spark the Electric Jester. That would be pretty shitty to do to these guys.

    So, what I'm saying is, unless you have a clear way to keep the engine and assets completely separate entities without impacting the ability for users to create game projects for the engine, you should use a more permissive license.
     
  15. Billy

    Billy

    RIP Oderus Urungus Member
    2,118
    178
    43
    Colorado, USA
    Indie games
    By the way, I recommend http://tldrlegal.com for reading up on software licenses. Though it does look like their site is a little broken at the moment.
     
  16. null1024

    null1024

    Member
    161
    0
    16
    For cases like this, licensing/linking exceptions are what you want. You can totally partially open source it, provided that you actually do make the proper exceptions (and remember that you can't un-GPL something once you've applied the GPL to it -- you (as the author) can absolutely make later versions proprietary again, but there's nothing you can do to stop someone redistributing older, GPL licensed versions of the code). Heck, you can make various parts ISC/BSD/MIT licensed, as long as the license is compatible with the GPL (and all those I listed except original BSD are, there are several examples of projects with parts GPL, parts other licenses, like FFmpeg). There's also absolutely nothing stopping you from licensing it more permissively later on if you decide that the GPL is too restrictive, although older modified releases would be still under the GPL.

    Adding a scripting language is pretty standard and usually ends up with Lua being linked in because it's robust and relatively little effort (admittedly, still effort) to add.

    Assets can be and are often totally combined into one big binary in GPL'd projects, assets aren't part of the code and can absolutely be differently licensed. As long as the assets are replaceable in your source tree, you're golden.
    Look at Firefox's licensing for a fairly public detail of how that works, and why there are things like IceWeasel and the lot.
    also, Doom's enemy logic is part of the GPL'd code, only the graphics+sound aren't -- if they cut it out and provided entry points to add your own enemy logic, they could have separately licensed it

    The GPL takes no rights away from the author -- your code is your own. It just grants rights to other people, and ensures that others can't just use your sources without others being able to do the same to their modified versions.

    All that being said, I kind of like using the ISC license -- it's short and sweet and you don't have to think too much about it.
    It's extremely, extremely permissive and boils down to "do whatever you want, but keep my name on it," however. It's like the MIT/X11 license, but shorter.
     
  17. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,237
    969
    93
    Long-term happiness
    If you want short, there's always the WTFPL =P

    Code (Text):
    1.         DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
    2.                     Version 2, December 2004
    3.  
    4.  Copyright (C) 2004 Sam Hocevar <[email protected]>
    5.  
    6.  Everyone is permitted to copy and distribute verbatim or modified
    7.  copies of this license document, and changing it is allowed as long
    8.  as the name is changed.
    9.  
    10.             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
    11.    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    12.  
    13.   0. You just DO WHAT THE FUCK YOU WANT TO.