Results 1 to 25 of 25
  1. #1
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Posts
    149

    Question Protecting Source Code

    I was just told that UnrealScript source code cannot be protected when publishing a title through the UDK. Is this true, and is there a way to circumvent that issue?

    Even if you're just releasing a free mod, it seems like you wouldn't necessarily want your code exposed for the world to see, at least, not all of it.


  2. #2
    Palace Guard

    Join Date
    Jul 2006
    Location
    WorldInfo_61
    Posts
    3,553
    Gamer IDs

    Gamertag: KickedWhoCares

    Default

    Do you have any UnrealScript source code worth protecting?
    Got UnrealScript skills?

    BeyondUnreal Wiki
    There's no formula for fun

  3. #3
    MSgt. Shooter Person
    Join Date
    Jan 2011
    Posts
    424

    Default

    Where did you read this?

  4. #4
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    The source code is not available when packaged. Simple as that.

  5. #5
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    146

    Default

    More like 'the source code is available when packaged in a compiled form'. Which does not exactly mean safe, depending on how well it can be decompiled. Been wondering this myself, whether you can obfuscate or do some other similar stuff to it.

  6. #6

    Default

    Write your code in C++ with DLLBind.
    Previous projects:
    MechWarrior: Living Legends

  7. #7

    Default

    The Hunted a mod for UT3 had somehow protected unreal script you could only see default properties after Exporting though i have no idea how to do this.

  8. #8
    Palace Guard
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    3,940

    Default

    Every compiled .u file contains the whole source code in uncompiled form at the end of the file (actually the majority of the file is the readable source code, you can check it yourself with a simple text editor).
    I don't know if UDK gets rid of that stuff during the cooking process, but if not then you can already slightly increase the safety by deleting the end of the files manually.
    Our Loop, which art in source code, hallowed be thy keyword.
    Thy condition come, thy instruction be done, in RAM as it is in cache.
    Increment us this day our daily counter,
    and forgive us our typos, as we also have forgiven our compilers.
    And lead us not to the nullpointer but deliver us from bugs.
    For thine is the API, the GUI, and the CLI while(true).
    Semicolon;
    Please don't send me questions about how to do something in the UDK via PM. That is better discussed in the forums and we only have limited PM storage.

  9. #9
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Posts
    341

    Default

    I doubt you could do that. Even from AAA games using UE3 one can extract UnrealScript code.

  10. #10
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    New Zealand
    Posts
    37

    Default

    Quote Originally Posted by Crusha K. Rool View Post
    Every compiled .u file contains the whole source code in uncompiled form at the end of the file (actually the majority of the file is the readable source code, you can check it yourself with a simple text editor).
    I thought that was a closely guarded secret. You've let the cat outta the bag now.

    Seriously though UDK Frontend (link below) has a strip source function (number 4 in the link). I haven't tried it but it may be exactly what you're looking for.

    http://forums.epicgames.com/showthread.php?t=741905

    Also please stop putting those pics in your posts. They may be briefly amusing to look at but its kinda hard to you seriously with them there.
    Last edited by Iron_Maniac; 04-05-2011 at 07:26 PM.

  11. #11
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    Quote Originally Posted by rogacz View Post
    More like 'the source code is available when packaged in a compiled form'. Which does not exactly mean safe, depending on how well it can be decompiled. Been wondering this myself, whether you can obfuscate or do some other similar stuff to it.
    Source code = / Packaged code.

  12. #12
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    146

    Default

    Meh so the most you can do is obfuscate which will not be so useful since you want to reuse as much of udk code as possible anyway.

  13. #13
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    Quote Originally Posted by MVGS View Post
    I doubt you could do that. Even from AAA games using UE3 one can extract UnrealScript code.
    You sure about that? How would that be done? The engine doesn't actually run UScript, it runs the compiled form, so it is never "exctracted" in the process.

  14. #14
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,953

    Default

    theoretically the bytecodes could be decompiled, but i don't actually know of any programs that can do that. You can stripsource on the .u packages, and the cooked packages don't actually have the script in them aside for tiny bits, from what i've seen.
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  15. #15
    Redeemer
    Join Date
    Jan 2004
    Location
    The great Pacific Northwest
    Posts
    1,426

    Default

    UT Package Tool appears to decompile the bytecode on select Unreal Engine games. That's how you can look at the SplinterCell or Raven Shield source code for instance (though the results tend to be pretty mangled with most(all) native functions given their number identifier instead of the original name).
    "What do you mean it doesn't exist clientside?"
    YARM: where player's Lean, Prone, Mantle, Dash, Crouch Jump, 'Parkour' and slide around all with generic realistic weapons!
    My Generic Mods for UT2K4:
    Yet Another Real-life Mod: Realistic weapons, unoriginal gameplay, w/ cheap CODMW knockoff mutator
    TD Vehicles: HUMV, MI4Hound, Motorcycle, IFAV Jeep, UH-60, MH-53 & AH-6 Helicopters, Abrams Tank

  16. #16
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,514

    Default

    It's really not worth protecting. The best way to protect your code, is with a lawyer.

  17. #17
    Redeemer
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    1,231

    Default

    decompiling works like this with a batch file:
    Code:
    "C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" batchexport %1 class .uc "C:\Users\XYZ\Documents\My Games\Unreal Tournament 3\UTGame\Decompiled\%~n1\Classes\"
    XYZ is your users name ofcourse
    You just feed it a .u file and it does the rest for you
    I dont know if it would work with UDK though, edit the paths in the batch to UDK/your liking and try it I guess...


    Also Planetstorm mod for UT3 had the same protetction in their scriptfiles.
    2B || !(2B)

  18. #18
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,953

    Default

    batchexport doesn't work on cooked script files.
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  19. #19

    Default

    And BatchExport doesn't decompile, but only export. The script, as mentioned before, is imported as raw text, excluding class defaultproperties. What BatchExport does is exporting the imported script text and generate a defaultproperties block from the class defaults.
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
    <TNSe> nono
    <TNSe> its always funny to find code a week later you dont even remember writing
    <Pfhoenix> what's worse is when you have a Star Wars moment
    <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  20. #20
    Iron Guard
    Join Date
    Apr 2008
    Posts
    542

    Default

    Quote Originally Posted by Blade[UG] View Post
    theoretically the bytecodes could be decompiled, but i don't actually know of any programs that can do that. You can stripsource on the .u packages, and the cooked packages don't actually have the script in them aside for tiny bits, from what i've seen.
    It's not just theoretical - I wrote a tool that does exactly that. The script compiler doesn't optimize the scripts, so the decompiled bytecode differs from the source only in a few trivial ways. All you need is the names of the numbered native of functions labeled as native(##), which in the case of UDK is easy since they're publicly available and you can't add new ones.

  21. #21
    Palace Guard

    Join Date
    Jul 2006
    Location
    WorldInfo_61
    Posts
    3,553
    Gamer IDs

    Gamertag: KickedWhoCares

    Default

    Quote Originally Posted by Solid Snake View Post
    It's really not worth protecting. The best way to protect your code, is with a lawyer.
    I have to roll with this too. I very much doubt the OP has source they want to protect to this extent. The best form of protection is to not release it!
    Got UnrealScript skills?

    BeyondUnreal Wiki
    There's no formula for fun

  22. #22
    Iron Guard
    Join Date
    May 2010
    Location
    UK
    Posts
    662

    Default

    Hey guys I made this game, it's so awesome that I'm not gonna release it because other people will try to clone it.
    Project Aron is now recruiting (experienced programmers)!
    My website!

  23. #23
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,514

    Default

    I have to roll with this too. I very much doubt the OP has source they want to protect to this extent. The best form of protection is to not release it!
    Just to further clarify what I meant, is that you can put in X amount of dollars and time to "protect" your code, but given that this is UDK, someone can create a tool which can decompile all UDK games thus your "protection" method ends up costing you money. Thus, instead of spending X amount of dollars and time for a "potential" threat, spend it when it actually occurs.
    Last edited by Solid Snake; 04-08-2011 at 11:40 AM.

  24. #24

    Default

    And when it happens, take advantage of the community and make the copyright infringement public. If it causes you actual loss of money, you can still take it to court. But being publicly known as code stealer certainly hurts as well.
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
    <TNSe> nono
    <TNSe> its always funny to find code a week later you dont even remember writing
    <Pfhoenix> what's worse is when you have a Star Wars moment
    <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  25. #25
    Iron Guard
    Join Date
    May 2010
    Location
    UK
    Posts
    662

    Default

    If a game which is made by stealing your code is more popular than yours, you did something wrong somewhere.
    Project Aron is now recruiting (experienced programmers)!
    My website!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.