AnimalMatch 4k

Unfortunately I didn’t completed the physics engine as I planned.
So instead I submit the proof of concept game for the polygon drawing.

ANIMALMATCH4K
[url=http://java4k.com/index.php?action=games&method=view&gid=392]

http://dl.dropbox.com/u/17655614/4k/animalmatch4k/animalmatch.gif

[/url]

Obsoleted:
[WIP] Prof4K

Hello All,

This year I’m going to try to make a game like Professor Fizzwizzle.
It will be a vertical platform puzzle game where the hero can’t jump or fly.

First I will investigate fillPolygon as opposed to sprites created by String.
In the past I had good results using String encoding Sprites.

This is where I’m headed now (pseudo-code)
String sprites="[nrofcoords]XY…XY[nrofcoords]XY…XY";
Each sprite definition starts with nr of poly followed by x,y coordinates.
Maybe advanced technique would be to include number of sprite parts indication with
some color definition encoding.

Anybody allready walked that road in 4K? Any suggestions?!

Best regards from

M.E.
Edit: Java4k link

Well, I used string-encoded low-precision hex coordinates for my levels (which were just polygons, really) in several of my 4k games, including Spiderball and Bullets. It’s worked well enough. In general, hex strings seem to compress very well :slight_smile:

The proof of concept for the polygon usage for the sprites came out just fine.
Made a poly-editor to draw over an existing image and converted into string-encoded-coordinates.

Endresult of the proof of concept is ANIMALMATCH 4k.

Edited original message to include the applet.

Best regards from

M.E.

me, your game is not working on my computer - the screen just freezes - with Internet Explorer under Windows 7. However, it runs fine on the the same computer with Chrome.

For the time I have played it, it seems to be an interesting puzzle game. I have just to get the confirmation ( by you or by my experience ) that no movement are allowed on black squares.

Your applet screen’s parameter don’t match, so the game can’t be finished because there’re tiles that I can’t see.

Hello ReBirth and StephR,

Thank you for testing my game! Greatly appreciated!

@StephR: I changed the sleeping-mechanism and introduced Implemented/Run instead of a single init to hopefully fix that
freezing issue.

@Both: There seems to be a change to the java4k.com site as I now can see different outputs on different
browsers that wasn’t there before.
Other games are running with chopped game canvases as well on IE 9. Chrome still works, but give extra white spaces
next to the applet.

@StephR: Sometimes the rules of the tiles are blocking eachother.
Fish can only swim across other fish and black = empty tiles.
Land animals can only walk on empty = black tiles.

An example of unfinished level is for instance:

http://dl.dropbox.com/u/17655614/4k/animalmatch4k/animalmatch_lose.gif

Here the fish tiles are blocking the animals.
You can only make L-shape matches or horizontal-vertical matches.

Best regards from
M.E.

Now your game doesn’t crash anymore with Internet Explorer on my computer.

Thanks for your explanations about the game mechanics. And I’m sorry to admit I had skipped the helpful demo-levels at my first try… However, I can’t pass the one about the “middel tiles can be matched at a penalty”.

Oh, and your game just crashed as I came back to the main menu by clicking on the mouse right button, then started again the demo-levels. It was not possible to click on anything on the first demo-level, and the game lost its focus. The Java console gave me the following error message :

Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: -1
	at a.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

I got the same error with Internet Explorer and Chrome.

Thank you for that bug-report !! Found the -1 index , I think!
Should be fixed now.

The red pieces should be matched to make a path between the right and left side.
Only at a penalty of 100 points can the middle pieces be matched, so you should
be careful in matching just the two easiest animals and think ahead.
Hope that helps!

Best regards from
M.E.

I confirm that the bug I found seems to be fixed.

However, I just can’t figure out how to use the middle pieces in the demo-level about them. I tried a lot of different combinations, to get the same results : my score was reduced by 2 and I heard the sound related to forbitten moves.

Same here. I thought the red box acted like wildcard.

You have to click on both middle tiles to get them removed.
The middle tiles are blocking-tiles so that you have to avoid them during
the matching. If however you want to remove them you can do so by clicking
on two middle tiles. But only horizontal/vertical matches have real effect!

Hope this helps…

Best regards from
M.E.

Thanks for the explanations about these middle tiles, me. Maybe should you make clearer that there are 2x2 middles tiles. What about coloring them in red and green like this :
[ red ][ green ]
[ green ][ red ]

Instead of :
[ red ][ red ]
[ red ][ red ]

In your demo-levels, you may also indicate that the player has to select two middle tiles in a row or in a column to remove them.

Added extra line describing the horizontal/vertical matching.
Since you can match either of them I didn’t want to choose different colors. It doesn’t feel right to match a red and green tile. Sorry!

Thank you very much for your input!

You’re right, different colors for the middle tiles would not be in the spirit of your game. So what about marking them with the same specific symbol, like this :
[ M ][ M ]
[ M ][ M ]

Because it would really help to see that there are four middle tiles, and not just a big one.