J4K

Anyone got a concise complete list of the games this year? I wanted to show a collegue?

If not, I’ll collate one.

Kev

Anyone alive out there?! :slight_smile:

Heres the list I have so far, some data needs updating since I can’t get to some webservers at the moment:

http://www.cokeandcode.com/4kgames.html

Kev

ooh, sorry I didnt reply sooner! I have a complete list (thus far) here:

http://woogley.net/games.html

Ah ha, beautiful!

In that case I’d like to annonce Snake, Trooper and Ball4k… assuming of course we’re allowed multiple entries?

Snake

http://www.cokeandcode.com/games/4k/snakez/snakez.jnlp
http://www.cokeandcode.com/games/4k/snakez/snakez.jar
Main-Class: S

Trooper

http://www.cokeandcode.com/4k/trooper/trooper.jnlp
http://www.cokeandcode.com/4k/trooper/trooper.jar
Main-Class: T

Ball4k

http://www.cokeandcode.com/games/4k/ball4k/ball4k.jnlp
http://www.cokeandcode.com/games/4k/ball4k/ball4k.jar
Main-Class: R

EDITED: To remove snippy nature of post.

Kev

I just posted trooper on the games list, but I cant download the other two! i’m assuming your games subdomain is having a DNS problem?

about the multiple games, I don’t see a problem with it. Maybe we should start a poll?

Updated the links above. I think a poll might be a good plan. I was in two minds:

Pro: Multiple games means you’ll get more entries, more fun, stimulates the community…

Con: Means you’ll get lots and lots of entries to judge and quality may drop down a bit?

Kev

Personally, I see nothing wrong with multiple games. For many coders, this is their first year entering the 4K competition. Thus they may need to code a game or two to “get a feel” for what they can fit. I remember that the first year, I only used runtime generated graphics since I figured that pixmaps would be too costly. That first entry gave me a good feel for things, and the next year I came up with my SuperPack method for storing images.

Again, I felt that only bitmaps (1 bit == 1 pixel) could ever possibly fit. Yet my experience from that translated into this year’s SuperPackME tools with support for up to 255 colors! (Sadly, they don’t seem to be very popular. sniff Oh well, just means that I’ll trounce everyone. ;-))

The only downside I see to multiple entries is that it makes judging that much more difficult. Still, judging only happens once, so I think the judge(s) can live with sorting through a few extra games. :slight_smile:

Speaking of which, does anyone else think that we should appoint a panel of judges instead of picking just one? The combined score from, say, three of them would help remove any unconscious bias that a given judge might have. I’m thinking that maybe ChrisM would make a good judge if we can finagle him into it. :slight_smile: BlahBlahBlahh would make another excellent judge (if not a little… ok, a lot… cynical). Any other ideas for judges?

I’m thinking that the games should then be judged on the following criteria:

  1. Graphics (points: 0-10)
  2. Gameplay (points: 0-10)
  3. Sound (points: 0-5)
  4. Self Executing [i.e. java -jar] (points: 0 or 1)
  5. Music (points: 0 or 5)

That gives a maximum score of 31 points. Items 3-5 will only be awarded if those features exist. For music, I figured that anyone who could actually fit it should get a large bonus. :slight_smile:

Its a good break down (especially the music bonus) - after looking carefully at your points break down.

Kev

The judging bonuses look pretty good, and I agree that ChrisM would be a great judge.

kev your links work for me now, so I’ll update the list in a little while :stuck_out_tongue:

Very nice site woogley. I saw two of my games on the unofficial list. I guess I should go ahead and let them be official, assuming that I can continue developing them.

The games would be Slalom and Late

http://valhallawebdesign.com/Slalom/
http://valhallawebdesign.com/Slalom/Slalom.jnlp
http://valhallawebdesign.com/Slalom/s.jar
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1106049623

http://valhallawebdesign.com/Late/
http://valhallawebdesign.com/Late/Late.jnlp
http://valhallawebdesign.com/Late/l.jar
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1105724937

Should be enough of links I hope :stuck_out_tongue:

Points seems quite OK. Only thing I can think of “replay points”. Quite often, java games are something you only play once. It could naturally be baked into gameplay. Would be nice to promote games that you would actually come back to. Hard to judge, but just a thought.

[quote]Very nice site woogley.
[/quote]
Thank you :slight_smile:

I will add your games to the list when your server comes online again.

This is a very good idea! :smiley:

I’m glad you guys like the judging system. The real thanks goes to mlk, though, for inventing most of it for last year’s competition. I just “embraced and extended” it to better reflect the growing popularity of the competition. :slight_smile:

[quote]Points seems quite OK. Only thing I can think of “replay points”. Quite often, java games are something you only play once. It could naturally be baked into gameplay. Would be nice to promote games that you would actually come back to.
[/quote]
Actually, I think that’s very much a part of “gameplay”. If the gameplay is good, then you’ll come back. If the gameplay is poor, then you’ll be less likely to play again. Note that this is independent of the graphics score which merely judges how technically impressive the game is.

Here’s a few other scoring system I considered:

  • A “controls” score (i.e. how natural are the game controls). I discounted this because it heavily impacts gameplay, and thus cannot be considered a separate entity.

  • An “instructions” score. I discounted this because the small size doesn’t provide much space for text. If the text is there, then it’s almost certainly at the expense of something else. I figured that it would be best to leave instructions to the “Readme” files, where they can be spun with fun and interesting stories. :slight_smile:

  • A 3D bonus. 3D is nice, but it can easily detract from the point: making a game. So if the programmer wants to use 3D as his canvas, he can do so, but he won’t get any special bonuses for it. He may, however, get a higher Graphics score. :slight_smile:

Yes, very nice site woogley.

I like the scoring system as well. And a 3d bonus would be cool. After working for 2 weeks I have a rotating model in 4k. Wow, how am I going to squish a game in there…

[quote]I like the scoring system as well. And a 3d bonus would be cool. After working for 2 weeks I have a rotating model in 4k. Wow, how am I going to squish a game in there…
[/quote]
Are you using the Math.xxx methods? If so, I may be able to help you cut down on the size of your class. It just so happens I have some code lying around for Taylor Series computations of sines and the Babylonian method for square roots. If you use these to compute lookup tables, you can significantly reduce your code size by eliminating the overhead of method calls. :slight_smile:

Ooo, make my 3D engine smaller, please… ;D

Judging, I like the idea of having multiply judges.

I like.

Bonuses, last year I gave them out to anyone I felt deserved it. I think stating what they should be before hand takes the fun away :slight_smile:

Re: only one game, well last year some people entered multiply games. I really don’t see the problem with it. More stuff to play while board at work, err wait, as I’m currently looking for work, that might be best if I don’t mention I just play games at work. No no no, not at all, never play games at work…

[quote]Ooo, make my 3D engine smaller, please… ;D
[/quote]
I’ll see what I can do. :slight_smile: Here’s the Babylonian method for square roots:

public class SquareRoot
{
  public static void main(String[] args)
  {
    double square = Math.abs(Double.parseDouble(args[0]));
    double root = square / 2;
   
    for(int i=0; i<25; i++)
    {
      root = (square/root + root) / 2;
    }  
 
    System.out.println(root);
  }
}

Note that the precision increases or decreases based on the number of iterations.

Here’s the Taylor series implementation of sines:

public class Taylor
{
  private static int[] sineSeries = {3, 5, 7, 9, 11, 13, 15, 17};
  private static int[] cosineSeries = {2, 4, 6, 8, 10, 12, 14, 16};
 
  private static double getAngle(double angle)
  {
    boolean sign = (angle >= 0.0);
 
    if(!sign) angle *= -1;
 
    while(angle > 180.0)  
    {
      angle -= 180.0;
      sign = !sign;
    }
 
    while(angle < -180.0)  
    {
      angle -= 180.0;
      sign = !sign;
    }
 
    if(sign) return angle;
    else return -angle;
  }
 
  private static double normalizeAngle(double angle)
  {
    boolean sign = (angle >= 0.0);
 
    if(!sign) angle *= -1;
 
    while(angle > Math.PI || angle < -Math.PI)
    {
      angle -= Math.PI;
      sign = !sign;
    }
 
    if(sign) return angle;
    else return -angle;
  }
 
  public static double sin(double angle)
  {
    double sine = angle;
    double iteration;
 
    for(int i=0; i<sineSeries.length; i++)
    {
      iteration = (Math.pow(angle, sineSeries[i]) / factoral(sineSeries[i])) ;
 
      if(i%2 == 1) sine += iteration;
      else sine -= iteration;
    }
   
    return sine;
  }
 
  public static void main(String[] args)
  {
    double angle = Double.parseDouble(args[0]);
    double radians = normalizeAngle(angle / 180 * Math.PI);
 
    System.out.println("Sine: "+sin(radians));
  }
 
  private static int factoral(int number)
  {
    int result = 1;
 
    for(int i=0; i<number; i++)
    {
      result *= i+1;
    }
 
    return result;
  }
}

That one would need some finessing for 4K. I was originally developing a Math.sin() implementation for a CLDC library, so it’s designed to handle any and all input. (No matter how screwy.) Things that you can do to shrink it are:

  1. Inline everything.
  2. Eliminate the check for negative angles.
  3. Replace Math.pow() with a loop.
  4. Eliminate the normalization of the angles. That’s to handle angles greater than 360 degrees.
  5. Replace Math.PI with 3.14xxxxx (how ever many digits you want.)
  6. That makes the radian conversion “angle / 180 * 3.14”. Alternatively, use radians to begin with.
  7. Instead of storing the taylor series values in an array, use a loop like “for(int i=3; i<17; i+=2);”
  8. As with the square root, the number of iterations affects the precision. It may be more efficient to unroll the whole damn loop into 3 operations (two additions and one subtraction). That should give plenty of precision for what you’re doing.

Other things to keep in mind:

  1. Cosine is equal to sin(angle+90)
  2. Tangent is equal to sin(angle)/cosine(angle)
  3. Generate lookup tables! While code is generally cheaper than method calls, you can easily destroy your savings by including to much redundant code!

If you’re unfamiliar with the two methods above, I may suggest visiting Wikipedia and looking up “Taylor Series”, “Series Definitions of Sines” and “Square Root”. If you have completely forgotten about factorials (like me), you might also want to look those up. Let me know if you have any questions. :slight_smile:

[quote]Bonuses, last year I gave them out to anyone I felt deserved it. I think stating what they should be before hand takes the fun away :slight_smile:
[/quote]
True. But the competiton has gotten a lot bigger. How do such bonuses work when there are multiple judges? Do they have to agree on a bonus, are bonuses cumulative across judges, and what if judges disagree about what should get a bonus? Stating them up front makes things a bit easier. Anything truly spectacular is bound to get a really good score. :slight_smile:

However, I would like to see comments from judges. It’s always nice to hear both their praise and their constructive criticism. :slight_smile:

What about a bonus for cross platform compatability, after all that’s a big advantage of java? It is a shame that so many entrants don’t work on OS X, and that there isn’t a high resolution timer in 1.4 that we can use (normally I use LWJGL for this) :frowning:

1.4 compatability is costly bytewise, so a bonus would be nice :slight_smile:

Will.

Standard approach is that each judge gets to assign each bonus once, assuming the bonus types are decided on in advance, e.g. 1x cross-platform, 1 x coolness.

If the bonuses are secret, just give each judge “3 bonuses of your choice to assign”.

Generally, no - too much hassle.

Bonuses are inherently subjective. Anything voted on isn’t a bonus, it’s automatically part of the main criteria! :slight_smile:

Yes, but you make sure their sizes are inversly proportional to the number of judges, for obvious reasons :wink:

Each judge has absolute discretion, normally.

PS I’d be happy to be a judge. I’ve run competitions before with up to 12 judges (!) and have a pretty good idea how to deal with most of the issues that might come up.

any opinions on what is the best compression algo for class files?

I’m using bz2 which compresses them to 65% of their original size. Anyone getting anything better?

Will.