Planning for Competition of 2015

Hi everyone, thanks for starting this excellently named board for the nK Java game competition of 2015.

I suggest that we start migrating to this thread in order to plan the rules and other details of the game competition of 2015. Once we have completed this competition and it has taken place we can make a new topic analysing what went well and what was not so good in order to improve the competition for everyone.

I shall post a comment on the original thread which I started in order to get people migrating to using this thread.

If you have any good ideas or want to test the water with some ideas, please post on this thread and then these ideas can be debated within this thread :).

Thank you everyone so far for the level of interest in this competition and the excellent ideas put forth so far.

While it is not going to be ready any time soon… for prosperity’s sake I am writing a java applet to java script converter.

This converter will be targeting applets as that is what most of the past J4K entries have been and will limit the scope of the project somewhat.

I believe that this is achievable due to the following:

  1. Java 4k entries usually only use a limited subset of Swing
  2. Java 4k entries do not use native methods.
  3. Java 4k entries are usually single threaded and or limited threading
  4. Java 4k entries by their nature usually have only limited dependencies to the Java API.
  5. Once the core common Java4k entries components are implemented/functional, I will be able to expand the converter as necessary, piecemeal.
  6. There is a lot of commonality between the core java and java script langages.
  7. I have currently finished the first pass of a ClassFile parser and am now in development of creating a java byte code parser.
  8. Modern Javascript does have the concept of WebWorkers that can manipulate referenced image data. This should allow me to render swing components to an image on a separate thread.
  9. There are java script modules out there that can emulate Long integers in javascript (one of the main differences between java and javascript)

I have no idea how performant the resulting game will be but one can hope as the java script runtime machines get better the games will be playable in the future.

Note that my javascript programming experience and knowledge is not extensive. I believe that I am able to produce this converter… however and javascript performance tricks are beyond my knowledge.

@moogie: you’re setting yourself up for failure. The project as you describe it is a few orders of magnitude bigger than a Java4K backend.

[quote]7. I have currently finished the first pass of a ClassFile parser and am now in development of creating a java byte code parser.
[/quote]
Just use ASM and be done with it - if you’re going to continue with this enormous side project.

Hi Moogie, that sounds excellent, really neat :D. Good work and excellent idea! I agree with Riven however, it will be a large amount of work.

Currently I’m going to design the web site so that it uses the J4K launcher but it will be easily modifiable and hopefully replaceable with your system, with the J4K launcher as being a backup option for games which may not be as performant when they are converted to JS. However, if the worst comes to the worst, the J4K launcher can be used anyways.

Next thing on the agenda I suppose is that we need to hammer out the ground rules, so are the following to everybody’s satisfaction?

  1. Compressed Java code size (compressed .class file) must be nK or less (will be compressed at server side and also a script will be provided for people to project this);
  2. The game must not use any external libraries however may depend on external art and sound assets which will be packed into the final JAR file;
  3. The game must be written using pure Java;
  4. The entry must be a playable game;
  5. The game must utilise JRE7.

If these rules are to everybody’s satisfaction then games can start to be designed and developed under that assumption, however if anyone has any constructive criticism for these rules or has suggestions for amendments/additions, please post to this thread and let us know :D.

Sure, I think I might be a little naive… but so far so good. And all the obstacles I have currently come across I have found solutions for… At worst it will improve my understanding of java script… and the jvm.

As you are probably aware, Understanding comes from solving problems. I did think about using existing libraries, however I think I will gain the knowledge to actually achieve this project by performing the parser work myself.

However that does not mean that once I have that knowledge I will not change to using libary such as ASM as you have suggested :slight_smile: I am sure that their implementation is much more mature and tested than my parser could ever be!

@richard.pickering

Will there be a defined entry point? i.e. Applet or executable JAR? Webstart?

Sounds good overall Moogie, and I agree with your assessment of how best to learn; I have always found this to be the case.

That is a good question. I think we should still use applets in order to maintain consistency with the previous competition and to ensure that the applet template and whatever else that is available may still be used for people new to the competition.

What are your thoughts?

I agree, applets are the most mature entry point for this competition