[quote]I made this game and now I want you to tell me what you think of it.
ā¦
it is an exe file and need Java Virtual Machine to be installed in order to run, but I dont think any of you havent got that.
[/quote]
Since theres absolutely no reason for packaging java apps as an EXE-only I wonāt be touching this with a bargepole, and expect most other people wonāt either.
This is irrespective of whether I trust you: EXE has nothing to do with java and I wonāt touch it.
exe has nothing to do with java? EVeryone says that but I dont get it. What is then the best way for my friends to run the game?
What is the easiest way of running my java files on other machine without sharing my java code and without compiling til exe?
Webstart? WHat the * is that all about? I just saw it twice in other posts so its very new to me. How does it work? And how do I compile my game for webstart?
Webstartās the best way to deploy Java games to the people in this forum. More or less, youāll get 10x the feedback.
I use both EXE and Webstart because outside of this forum no-one gives two shits about Webstart because it sucks in all sorts of pesky ways and scares people.
Basically webstart is a method of running a java program, where it automatically sets up all the jar that are required on the users machine.
Check out some of the 4k games on āYour Games Hereā for examples. They are the links that have .jlnp extensions. If you have a newish version of java installed it should do the rest.
As a developer you have a little xml file to describe your installation.
Also, you can use a code obfuscator to protet your code rather than compiling to an exe.
Obfuscating basically messes around with your byte code in a way that doesnāt change what the code does but makes it either hard or impossible to decompile (depending on the obfuscator/decompiler combination) and, if it is decompiled, very hard to understand.
Just Google for java obfuscator - thereās plenty around and I here some of the free ones are pretty good.
[quote]I use both EXE and Webstart
[/quote]
Just to be clear: no problem with that. Distribute however you want, but donāt cut of your nose to spite your face by NOT distributing java files in any of the āproperā ways (class files, one or more JARs, or webstart (in increasing order of user-friendliness))
Well, when ppl upload jar files, does yhat mean that they dont care bout other ppl watchin / stealing the code?
And why should it be so hard to distribute your work? There should be an Export button in eclipse that exportet the fil to different things like an exe file and a java webstart file.
and by the way J4exe is a compiling tool to make exe files with which ease the distribution except when people are afraid of exe file.
[quote]Well, when ppl upload jar files, does yhat mean that they dont care bout other ppl watchin / stealing the code?
[/quote]
.class files donāt exactly read like a book, your original source code would not be in the jar, so is still pretty safe unless someone takes the time to decompile the class filesā¦which is highly unlikely.
Running an obfuscator on it will make it so even if they did decompile, what comes out is crap that wonāt compile (reserved words for variable names and such) and is next to impossible to read.
Any obfuscated EXE file thatās been through a decent decompiler is almost as easy for me to read as your original source.
In some (tragic) cases where people are crap at designing and documenting their code itās actually easier to decompile it (because some refactoring goes on in the decompilation process!).
Forget protecting your code - I promise you, your code aināt worth it anyway. Sure, make it mildly difficult for casual people to decompile, but remember:
ANYONE WHO LIKES DECOMPILING STUFF WILL DECOMPILE YOUR STUFF INSTANTLY
(or near enough; they will already have the tools setup and the macros configured and it really isnāt going to be hard for them unless you put a LOT of effort into screwing up their macros and tools etc)
Though, I disagree with how easy it is to read. A good obfuscator will completely trash your code to the point where you wouldnāt want to use it.
However, the extent to which obfuscation works greatly depends on three things: The complexity of your code itself, the size of the code base and your codes internal event/messaging model.
The current project my team is working on is over 3.5 million lines of Java code⦠Although it costs over a million to buy the software, I have no worries about others reverse engineering it. It is simply to large and to complicated with a message model that makes it next to impossible to understand the interworkings without the orignal source. I would say to all : Good luck trying to reverse engineer it. If you could do it, then you probably could have rewrote it yourself in the same or less time anyways.
Your ide will choke on the first of over 10,000 files with 40-100+ syntax errors. Macros will help somewhat, but not enough. Plus, you will never know what is a numerical assignment or what was a final static assignment. The bit operations with the messaging would be justification for suicide if you had no choide but to decompile back to the source.
I have seen this code decompiled (part of it at least) after it was obfuscated. I know almost every important line of code in the original source and I almost puked when I saw the results
[quote]We are really talking about games here tho.
Kev
[/quote]
Make your game multi-threaded and then setup a high speed messaging schemeā¦oh wait, we already had this discussion
Just kidding.
I still think this applies to games though. My current project is around 50k lines or so, but I am only about 10% and itās pretty complex (not just because of the threading). I bet most games, once they hit a certain level of complexity and size will start to become good candites for safe obfuscation.
There is another thread around here talking about Carmacks Q3 and Q2 codeā¦itās self obfuscated from itās own complexity (as many pointed out). Now scramble that and try to figure it outā¦ick.
I give away all of my source code and obfuscate nothing I donāt see any plethora of Fluxian Ales of Sooper Dooderinos or Twattytrons coming out. Nor do I see any difference in my (lacklustre) sales.
No. You can do it to EXE files as well if you have good enough decompiler tools (Iāve pulled C++ source out of assembler before).
You obviously havenāt done much decompilation, and my original point stands. Please go and look at how good OOP source can be produced from nonsensical badly written hand-coded bytecodes. I dont have any refs to hand (wrong physical location) but there are plenty of research papers, and quite a few free demos / prototypes.
This is the thing that really kills current decompilers. Although I would be very surprised if none of the research projects I previously follwed years ago had got around to infering messaging models yet.
Or, to put it another way, Iāve done mathematical theory that is designed to chart such things and does a good job of infering and documenting messaging systems logically (i.e. without black holes) when done by hand. One of my professors was working on software implementations to do the inference using the mathematical models; his ultimate aim at the time was to write something that could automtaically find holes in security protocols.
There are so many protections against them doing so even with an excellent decompiler. All Iāve said above gives you - at best - thoroughly well-organized OOP code. It cannot give you code comments aimed at humans (or has someone started doing that already ::)? ) and so you have to spend time understanding the code in front of you.
However, it CAN infer decent variable names in a lot of places, and the most basic of free decompilers come with tools to make substituting back in your own var names very easy.
LOL! You think anyone dumps raw class file bytecodes into source and then into an IDE?
No way. You go through several passes (just like ⦠a compiler, surprisingly enough ;)) and get increasingly easy to read and use source. Getting rid of silly ātricksā like making method names that are illegal is one of the easiest bits.
I realize you can obfuscate EXE files, I just thought his concern was around .class files
Ever tried decompiling something obfuscated with Zelix Klass Master?
It has name obfuscation (which is what the cheapy obfuscators all have) but adds in some serious mind f*ing with flow obfuscation and finally string encryption.
I donāt know about you, but suicide would be more plesant then reversing even 10k lines of that kind of code. That is a very simple block of code that was obfuscated. Try it with something that is really complicated containing a proprietary messagng system (of almost any kind); The mess is so ungodly that it will scare your decompiling friend into early retirement or at least convince them to move onto the next program they want to hack.
The goal of obfuscation, or any type of encryption is not to make something impossible to decrypt (for that is impossible), but to make it as painful and time consuming as it can be. The good obfuscators do a pretty good job at this IMO.