CHeck out my new game - Risk clone

I made this game and now I want you to tell me what you think of it.

If you never played RIsk before you might want the basic rules for the game, but then I will post em here if you want.

http://stephan.syska.dk/javating/risk/risk.zip

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. :slight_smile:

You might want to post this in Your Games Here instead of here.

Also, alot of people arn’t going to run an exe on their machines without knowing who you are. I for one won’t download an exe and just run it…

Webstart would be even nicer.

Kev

[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. :slight_smile:
[/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.

Shrug. Deploy it properly and we’ll play 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.

Cas :slight_smile:

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.

see http://www.javagamesfactory.org/ -> atricles ā€œA Walkthrough with WebStart-JNLPā€ for more details.

Dan.

OOI, what’s j4exe?

Kev

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. :wink:

[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.

Sigh. No.

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)

I think you mean .class file :slight_smile:

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 :wink:

We are really talking about games here tho.

Kev

[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 :wink:

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.

Cas :slight_smile:

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.

This:

package test;

import java.util.*;

class Demo {

private Vector buffer = new Vector();

String getName() {
return ā€œHello worldā€;
}

int getStringPos(String string) {
for(int counter=0; counter < buffer.size(); counter++) {
String curString = (String)buffer.elementAt(counter);
if (curString.equals(string)) {
buffer.remove(counter);
return counter;
}
}
return -1;
}
}

becomes this after obfuscation and decompilation

package a;

import java.util.Vector;

class a {

private Vector a;
public static int b;

a() {
    a = new Vector();
}

int a(String s) {
    int i;
    int j;
    j = b;
    i = 0;
    if(j == 0) goto _L2; else goto _L1

_L1:
String s1 = (String)a.elementAt(i);
s1.equals(s);
if(j != 0) goto _L4; else goto _L3
_L3:
JVM INSTR ifeq 48;
goto _L5 _L6
_L5:
break MISSING_BLOCK_LABEL_37;
_L6:
continue;
a.remove(i);
i;
_L4:
return;
_L2:
if(i >= a.size())
return -1;
if(true) goto _L1; else goto _L7
_L7:
}

 String a() {
    return b(c("N\001\177\022k9#q\017\177n\034b\030"));

}

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.

Well, you guys are talking about making exe files, but you dont dare downloading and running my game BECAUSE it is a exe file.

If you are afraid of virus cant you scan it or something?

I PROMISE I AM NO VIRUS WRITER WITH THE PURPOSE OF MESSING UP OTHER PEOPLES COMPUTER

Im a game writer :slight_smile:

That obfuscated code looks like it’s going to make life rather hard for Hotspot.

Just say no! Code is worthless.

Cas :slight_smile: