No announcement yet.

Why hide your code?

  • Filter
  • Time
  • Show
Clear All
new posts

    Why hide your code?

    I am really into modding this fantastic engine. Now that I have mapping down square, I have turned my efforts to scripting. Mainly because I want to get a feel for coding so that I am a step up when I go to university next year, I am coming along quite well, having made a number of nicely-coded classes and such, but often I need to look at some other code to learn how to do something new, as we all do from time to time.

    My question is this: Coders, why hide your code?

    Quite often the best starting point to learn something is to see how someone else did it and adapt your own solution from that. From there, you learn the basics of this scenario and are better equipped to tackle similar problems in the future.

    Unfortunately, very often when I grab some code from a mutator etc to take a look at a function or something, there is nothing but default properties. I managed to work out that WOTgreal gets around that, but still. I have absolutely no intention of stealing peoples code, If I ever want to use somebody's code I will ask them first (just ask jb from the CUT2 team), and I am SURE that most (if not all) the novice scripters around here are honest enough to follow the same idiom.

    To coders that happily leave their code exposed for all to see, I salute you. Countless times I have avoided hours of mindless hair-pulling just by looking at Epic's source code or the code of a skilled scripter to help me solve a problem. Hell, I released DWeather semi-recently and even distributed the full source code for it! Mysterial bundles the UT2004RPG source code along with the mutator!

    I'm sorry this turned out to be a rant of sorts, but my original question still stands: Why do some people feel it necessary to hide their code?

    You should be able to export any code from the .u except for classes that are no export ( i.e. GUI ). If you want people to bundle their code (.uc) with releases in order to save you a step then your probably making an bigger issue out of it than you should. Other than using a program to scramble variable names to gibberish which I don't beleive many people do and shouldn't do; I am wondering what you are trying to bring to our attention.


      I am not trying to get people to bundle the source with their creations, I was just using that as an example of the generosity of some coders.

      What I mean is this: You go into unreal ed, or use ucc export, whatever, to export the classes from a really cool mutator that you want to have a poke around in. This is a very functional mutator, so you are certain that it will have a fairly decent amount of code. You want to see how the author accomplished various things, eg with the GUI.

      You export it only to find this:

      // SomeMutator.
      class SomeMutator extends Mutator;

      Can't learn much from that!

      Why do some coders make their code do that?


        Because tgherer is a high number of rip off people in the unreal communtiy (sadly enough). People get paranoid


          Originally posted by Hsoolien
          Because tgherer is a high number of rip off people in the unreal communtiy (sadly enough). People get paranoid

          I just find it a little disconcerting that some people do this, as coming from a mapping background I'm used to being able to open up a stellar map and take a look at the tricks the mapper used. (even though some mappers do little insidious things to make life hard for both learners and theives alike)



            The full source code for all SPDT projects is only an email away.  This service is provided so that other coders do not have to go through what you've described MarZer.

            As for hiding code: I think this is wrong as Epic provide full access to their original source code, so others should follow the same principle.  It comes down to intellectual property, and trying to protect your hard work, but once a project has been released to the public there's nothing to stop a determined person from gaining access to the code, so why bother trying to hide it?

            If memory serves, there is another thread about this issue on these forums, with people pretty much saying the same things.  Which begs the question: do we as coders continue to help fellow forumites out?  They could end up using the code we provide to make releasable projects, so will they be giving us credit for our help?  If the source code is hidden from us we will never know (without some work to recover the files) what, if any, help we were to them.

            As it states at the top of this post, all the SPDT projects are available as uncompiled source files (with textures, test data, etc), so if there's anything you want to know about a project just use the link at the bottom of the help file and one of the team will reply.

            Hope this helps.


              I think all about this subject has been said on the UnrealWiki a long time ago:


                Thank you Adster. I'll keep that in mind

                El Muerte, thank you for posting that link, I read the article and I see that it is one of those issues people deal with on a personal level, like Intel vs AMD. I personally will never hide my code, but will always respect the work of others. I thank those that contributed to this thread, and also those that are willing to help newbie coders out.


                  Coders hide thier code because of thiefs taking credit for thier work. There are many websites devoted in helping coders get started. Unreal Wiki and UDN are just two.

                  Using or modifing code from someone else's work without permission is stealing to me. A lot of people do not understand or care that is takes coders and mappers many hours of work to get things working and looking good, to find out some :noob: has lifted their work to claim it for themself.

                  Originally posted by the AdsterAs for hiding code: I think this is wrong as Epic provide full access to their original source code, so others should follow the same principle.
                  Epic get paid for their work, we don't. We do it out of sheer admiration for the game, and ****** us off when :noob:'s and others want to rip our work. It might be OK to learn from each other, but most people don't give credit where it is due.

                  It's should be a coders/mappers right to protect their work, and epic should endorse any coder/mapper to help protect the work they do, which after all, this game would be pretty much dead if not for the coders and mappers......

                  I admit, I learnt from Epics coding, UDN and Wiki, which is essential, but taking code or stuff from maps designed by a person that does not get paid for their work is wrong.

                  I remove my code, especially from Beta's, and anyone who would like to learn from my work, I am willing to help and provide sample coding, that's how it should be.

                  Epic should add a LOCK MAP/CODE routine to the editor so it can not be edited by others, then we would see a lot more original work instead of RIPS and REMAKES. I am so sick of seeing ONS-Torlan being remade, it's making me sick.


                    AFAIK it was possible to screw up maps in UE1 by removing brushes and then NOT rebuilding if anyone tried to mess with it they would have some pretty funky artifacts (dunno if that works in UT2k4 tho)

                    As for code...The ONLY time I have ever hidden my code was when it was part of a cheat protection of some sort, and of the few times someone has ripped my code without permission (and with not the slightest attempt at giving credit) I have made their names well known (this was UE1 aswell)

                    While it is amazingly annoying for some a$$ to take code like that it is not hard to deal with them.


                      Well, for me the choice is simple.

                      I learned by examples and y not give back more examples?

                      My final mod includes a downloadable class pack, i have even made some basic code on request, plus i have another mod beta with a class pack. The only reason i wouldnt give away the code would be if the beta still had errors with the code, like my combat ambulance, some features are disabled, so theres no pressing need for me to show semi-working code. But if anyone wants code from my projects, i will be happy to provide it, cause despite all the stealing, I have a website for each mod, created BEFORE i release them, and have them hosted on my own site, so if anyone would even consider stealing them, I have complete proof of the original author.

                      And besides, whats the point in stealing my code if i let anyone use it if they give me a line in the credits of their work?


                        For me, its due to size. UTComp pre-stripsource is 1.2 megs. Afterwards, its about 650kb which is quite a bit faster easier to get on a server without redirect.


                          Originally posted by Lotus
                          For me, its due to size. UTComp pre-stripsource is 1.2 megs. Afterwards, its about 650kb which is quite a bit faster easier to get on a server without redirect.
                          You can't be more away from the truth.
                          Stripping code will reduce the file size not more than 50%, compressing it (with source) will reduce it to about 33% of the original size. So your argument doesn't hold up completely. Specially not when you have to download a map of a couple of megabytes.

                          Also, if your package contains binary data like textures or sounds stripping code it useless to, removing the textures or sounds is more usefull.

                          Another thing, when you do strip the source nobody will be able to extend your mod (a mod for a mod, yes it can be done) in a "legal" way.
                          Ofcourse stripping code doesn't give you any protection.

                          Don't know why I'm repeating this again, it's all in that Unreal Wiki page.


                            El Muerte, in most cases I would simply have to say "you know a lot more about this than me", but in this case, you are wrong.

                            Pre Strip-Source - 1166kb
                            Post Strip-Source - 666kb
                            Pre Strip-Source Compressed - 305kb
                            Post Strip-Source Compressed - 208kb

                            This decrease is WELL worth it for the oodles and oodles of server admins who don't bother to set up redirect.

                            Is it worth it for *EVERY* mutator/mod... no. In my case? Absolutely.


                              So you are fighting for 100kb or data? Why strip it rather than compress. Even compress w/o strip makes it 1/2 the uncompress stripped code.