Temple of The Roguelike Forums
Development => Programming => Topic started by: miki151 on July 06, 2013, 02:40:46 PM
-
There is always the question of going opensource or not. There are arguments against (of course they are debatable):
- keeping secrets of the game from source divers
- stopping people from making unwanted variants
- having the option to make income from the game in the future
and for:
- attracting contributors
- portability
- higher chance of building a community (?)
I was wondering why not obfuscate parts of the code that you are most worried about, and distribute that. I think you get best of both worlds. You can hide your secret AI stuff, game plot or other logic, while letting people work on improving UI, porting etc. What do you think?
-
I can't speak for everyone, but I don't open source because my code is me. Most people I think care about the personal nature of the produced code more than the hypothetical benefits that you speak of. I'd rather have worse code that is all me than better code that is partially not me. But everyone has different reasons for why they write code, naturally.
-
I totally understand you. But then you could release your code completely obfuscated, and at least let people compile it on their platforms.
-
Obfuscation won't stop someone from figuring out how the code works. If you don't want people figuring it out then the only option is not to release it open sourced ( but even then someone *really* determined can figure it out from the assembler ).
It's actually arguably the worst of both worlds.
-
what kind of obfuscation?
questionable naming conventions?
oddly commented code?
devious threading?
...?
Unless you release closed source, what is the point of obfuscation?
-
I think you guys haven't seen well obfuscated code, it's as easy to read as a binary, and no way of converting it back. Of course there are tools to do it.
-
It's actually arguably the worst of both worlds.
Yup.
If you want some parts to be open source and some parts to be closed source, then why not release some parts as open source and other parts as closed source? If you make open source code that's intentionally hard to understand then you have the costs of open source and none of the benefits and it would just take a few people some time to refactor it into something that could be understood.
-
I think you guys haven't seen well obfuscated code, it's as easy to read as a binary, and no way of converting it back. Of course there are tools to do it.
Like this?
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \
}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
:0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
Believe me or not, there are people who translate stuff like this into plain C within several minutes. Of course, there aren't too many of such people, but releasing closed source has its magic and to numerous developers this is much more important than "better portability" (wow, they have compiled my game to Amstrad CPC, this is so cool, I'm gonna piss my pants! :P).
-
while letting people work on improving UI, porting etc.
Like that's going to happen. You first need a Nethack level game to get people involved in any way.
-
Really? I've done two small opensource projects before, and both had people involved fairly quickly.
-
In my case things are different. Though my project will be closed-source, people will still be able to modify it through the editor that will be available for download. In fact, people will be able to build their own world setting with it. Of course the editor will not offer the same flexibility of changing code directly but it will let people add, change and remove pretty much all of its core functionalily. This includes attributes, formulas and a shit load of many other things.
The editor also adds one major advantage over an open-source project without an editor, it allows everyone to change a game without needing coding skills, which I believe that will capture the attention of more people. But hey! I've been wrong before.
In a distant future and if everything goes well, I plan even to let the user to edit the game engine itself so you can change, remove and even add your own functions into it.
-
In my case things are different. Though my project will be closed-source, people will still be able to modify it through the editor that will be available for download. In fact, people will be able to build their own world setting with it. Of course the editor will not offer the same flexibility of changing code directly but it will let people add, change and remove pretty much all of its core functionalily.
So you are giving up biggest advantages of open source (ability to contribute, portability) while preserving the biggest disadvantages (revealing game's secrets, allowing forks). Interesting.
-
So you are giving up biggest advantages of open source (ability to contribute, portability)...
I don't think contribution is something exclusively done though coding. Regarding portability, since the project is being coded in C# it means that it will be available also for Linux and mac. So it will be able to run on the 3 major platforms. But yes, you won't be able to port it to anything else like Android and IOS, life isn't fair, we all know that.
while preserving the biggest disadvantages (revealing game's secrets, allowing forks). Interesting.
You mean like having anyone accessing the source-code to dig out its secrets? I do tend to miss on purpose movie-trailers that might be related to something I might be fond of, just to make sure I don't get spoiled in any way. Some people enjoy playing in cheat-mode others don't. It is their decision on how hardly they wish to be spoiled during their adventure.
Anyway the editor itself is mainly for contributors. I'm glad you find all this interesting which is always something good. (Yeah, anyone can use sarcasm. But is it something useful? Well, it does tend to add more words in a text)
PS: I'm just really glad people can conduct their own projects the way they want.
-
I don't think contribution is something exclusively done though coding. Regarding portability, since the project is being coded in C# it means that it will be available also for Linux and mac. So it will be able to run on the 3 major platforms. But yes, you won't be able to port it to to Android and IOS, life isn't fair, we all know that.
Yes, mobile platforms were on my mind. Not a great loss for me as no roguelike game could possibly run on my ancient phone, but there are more and more players with Android and stuff like that, so...
You are totally right about contribution, but should you abandon the project, either temporarily or permanently, your contributors would not be able to develop it anymore without access to the closed part - this is what I meant (recently discussed in another topic, by the way:
http://forums.roguetemple.com/index.php?topic=3483.msg29323#msg29323 ).
You mean like having anyone accessing the source-code to dig out its secrets? I do tend to miss on purpose movie-trailers that might be related to something I might be fond of, just to make sure I don't get spoiled in any way. Some people enjoy playing in cheat-mode others don't. It is their decision on how hardly their wish to be spoiled during their adventure.
Of course. But releasing the source code (or any part of it, or even your non-code data files) greatly increases chances that you will get involuntarily spoiled in the nastiest way. If a game is popular enough, once the spoilers leak out, they're virtually everywhere unless you cut off your internet cable.
(Yeah, anyone can use sarcasm. But is it something useful? Well, it does tend to add more words in a text)
That wasn't a sarcasm. OK, maybe that was a *little* sarcastic. But actually I'd love to see how your editor will do. Perhaps I'll be able to steal an idea or two for my own tools :).
-
(...)should you abandon the project, either temporarily or permanently, your contributors would not be able to develop it anymore without access to the closed part - this is what I meant (recently discussed in another topic, by the way:
http://forums.roguetemple.com/index.php?topic=3483.msg29323#msg29323 ).
If I loose interest in the project for good, I will definitely upload its source so people can use it at will. This is something I really doubt it will happen though, because this is my life's project, under development for 7 years now.
That wasn't a sarcasm. OK, maybe that was a *little* sarcastic. But actually I'd love to see how your editor will do. Perhaps I'll be able to steal an idea or two for my own tools :).
Sure. I've stolen so many ideas myself already. The roguelike concept in which we base our projects on, is itself a "stolen" idea 8). Any way, it would make me happy to know that my work actually helped someone or that influenced anyone on their own projects.
More power to game creators!
-
If I loose interest in the project for good, I will definitely upload its source so people can use it at will. This is something I really doubt it will happen though, because this is my life's project, under development for 7 years now.
That's probably what every single developer thinks (and says) before he abandons his project :D.
-
If I loose interest in the project for good, I will definitely upload its source so people can use it at will. This is something I really doubt it will happen though, because this is my life's project, under development for 7 years now.
That's probably what every single developer thinks (and says) before he abandons his project :D.
Agreed! But 7 years under development... When I look back at all that has been done so for, it is like its impossible to stop now, unless my life suffers a major change. Well, lets see what happens next!
I'm thing I forgot to mention about the editor is that it will mostly act as a model generator for items, quests, planets, exploration sites, creatures (including NPCs) and objectives, so even if everyone knows how the game works it will be impossible to foreseen its results when starting a new adventure with a new terraforming seed. The editor won't be able to edit elements from "that" particular generated world.
-
My theory is that this kind of one-person long term projects get scrapped mostly because of low code quality. It's really hard to keep good design and while adding features, so the code gets messier, and messier, until you're too tired of it and start working on something else. If that's the case, it's hard to go and publicly release it, and you're not likely to start cleaning it up after you've just abandoned it :)
-
My theory is that this kind of one-person long term projects get scrapped mostly because of low code quality. It's really hard to keep good design and while adding features, so the code gets messier, and messier, until you're too tired of it and start working on something else.
And that's pretty much the reason why I decided to begin the game with an editor, so that all design is settle down trough it fist without having me constantly restructuring everything whenever I decided to change or add stuff around. So far so good.
-
That actually sounds like a pretty decent idea. Forcing yourself to think about how everything is going to work before implementing. I tend to do that by using XML files that define a lot of data - but I've found myself changing stuff a TON due to implementation details once I start coding the game, so that might be a caveat.
-
Like that's going to happen. You first need a Nethack level game to get people involved in any way.
Please take a look at Cataclysm-DDA's contribution history.
https://www.ohloh.net/p/cataclysm-dda
Yes it was a big game already when I picked up development last September, but I sure as hell wouldn't call it "Nethack level". Now maybe....
I'm not saying this WILL happen, but you can be sure it won't if it's closed-source. Before I started working on Cataclysm, I really wanted to work on @X-com, but it's closed-source, so it wasn't an option. Lucky for Cataclysm I guess.
-
You know, re-reading this, if your goal is to keep the secrets of the game etc. one way to go that's way better than obfuscation is separation of engine and module.
It's hard to do right, takes way more discipline, but for example, Tome4 does it with the T-Engine totally separate from the Tome module.
You could distribute the engine open source, and the module as binaries. The engine code can be perfectly maintained for readability, understanding, and expansion, any your module can keep all its secrets.
-
That might technically work, but I don't imagine you're going to get all that much community support (from developers, players frequently don't care) for an engine that doesn't work without a closed-source component. Maybe in the past when there were no compelling alternatives, but there are a lot of open source game engines now.