QUIX 15k

I just made this game:

http://stephan.syska.dk/javating/quix/quix.jar

run with:

java -classpath quix.jar main.MainFrame

Controls:
Mouse click: Place line
Space: Rotate cursor

Instructions:
Create new blocks and avoid the balls the hit the line while you are creating a block
When you have covered a certain percentage (Visible bottom left corner) you go to the next level.

There are currently 16 levels.

Couldnt keep it down to those fancy 4k so I thought what the hell, lets make it a 15k then ;D

You should be able to fit that in 4K, no problem! I don’t have the source, but from the binaries, here’s the suggestions I can make:

  1. Inline all those classes into one class. Maintaining the state of things like balls is quite easy. Just put the state variables in the class. (e.g. int ballx, bally, ballRadius;) In the case that you need multiple objects, just use arrays with a counter telling you how many are used. e.g.:
int[] ballx = new int[256];
int[] bally = new int[256];
int[] ballRadius = new int[256];
int ballCount;
  1. Stop using packages. That just wastes space. In fact, rename the main class “MainFrame” to “Quix”. It may only seem like a few bytes, but you’re talking about a name that’s stored in the class file, the zip file, and potentially the manifest. When you only have 4096 bytes, every byte counts!

  2. Use 7Zip or KZIP. I knocked a full K off your program by doing:

7z a -tzip -mx=9 quix.jar META-INF/MANIFEST.MF main/*.class system/*.class unit/*.class

And I even managed to include an executable JAR Manifest. :wink:

Good luck! :slight_smile:

Well I dont really wanna bother making this a 4k game.

I study java programmin at school and I rate a good structure higher than the file size.

Byt anyway, what do you think if the game?

[quote]Well I dont really wanna bother making this a 4k game.
[/quote]
How dull. :wink:

[quote]I study java programmin at school and I rate a good structure higher than the file size.
[/quote]
It’s true that good structure is one of the most important things you can learn. Reworking something for 4K is something people should do only after they are confident in their skills. The contest is less about violating the rules, and more about knowing when to violate them and when not to. :slight_smile:

[quote]Byt anyway, what do you think if the game?
[/quote]
I thought it was rather fun. In fact, many students I’ve seen have enough difficulty with TicTacToe, much less something as complex as this. Good job! :slight_smile:

My only request is, could you add a Main-Class manifest? I much prefer being about to double click on a JAR file. All you need to do is create a file like this:

Main-Class: main.MainFrame

Then when you JAR it, you simply add the ‘m’ option. e.g.:

jar -cvmf mymanifest.mf  quix.jar main system unit

Dang it, Quix is my name, hands off! :stuck_out_tongue:

Do you use Eclipse?

If you do, do you then know if there is a smart way of doing an export with a manifest file in Eclipse?

[quote]Dang it, Quix is my name, hands off! Tongue
[/quote]
Have you made the same game??

Or just with the same name?

Cute game… not quite the same rules as the original Arcade version of Quix tho.

I do like the fading block colour.

Re: 4k - we work in java, we’re hardly interested in design elegance for size normally. Thats what makes it so much fun to fall back to the crap old days now and again.

Kev

Nice twist to the idea. Like it, but a bit easy for my taste, and a bit mechanical (Step 1. place bar right behind ball Step 2. back to step 1)

Maybe you can spice it up with a bit more balls than just two, and to begin with let them move a bit slower, so that it isn’t impossible.

When several balls, let them move at different speed.

Let the ball move other path than just diagonal (45 deg)

Let the balls bounce less perfect. Hitting the wall at an angle of 10 deg, but might leave at an angle of 15 degrees for example. “Uneven wall”.

I like how the wall changes from orange to gray. Neat.

[quote] Re: 4k - we work in java, we’re hardly interested in design elegance for size normally. Thats what makes it so much fun to fall back to the crap old days now and again.
[/quote]
hehe ok, well thats good to hear, and I do think it is an art to keep the file size down to 4k, but as you say, it should just be for fun

Jojoh:
About the changes in the game:
Yes, they direction could need some sort of random twist when bouncing out.

ANother thing is when you split the screen with a line and there are balls on both sides of the line you win. Maybe a box should just be created on the sie with the fewest balls / the size with the smallest area - WHat do you say?

I just uploaded a new version with 24 levels and som graphical adjustments.


I just did some changes. If there are balls on both sides of the line it is the side with the lowest number of balls that will convert. In the case that the number is the same it will be the smallest area that will convert.

Right-click does now do the same thing as Space does. (Rotates the cursor)

Ive uploaded it to the same URL, so pls re-download it and tell me what you think of it.