Letter Puzzle

Community Forums/Showcase/Letter Puzzle

AltanilConard(Posted 2008) [#1]
Recently someone gave me a small puzzle, consisting of 4 pieces that had to be shaped like a 'T'. It was harder then I thought, and after a long time trying it was really satisfying when I finally completed it. I've tried to make a small game out of it. It might be a bit to hard on a computer (as you can't fit the edges of the pieces together that easy), so I didn't make an option to flip the pieces (they're all flipped the correct way allready).

Download:
Intel Mac Application
BlitzMax Source Code (game uses no external media)
*You'll have to rotate (right mouse button) and move (left mouse button) the pieces so they form a capital T. You can shift trough the pieces with the keys [1-4] and [TAB].*
(I'm still looking for a way to fill the pieces with a color, only outlines atm)

I'll post the solution on request. All comments are welcome!

[EDIT]
09-10-08: the pieces are now color filled. both links are updated.


markcw(Posted 2008) [#2]
Arrgh! I can't do it (but don't post the solution yet).


Taron(Posted 2008) [#3]
evil puzzle! :)))


EOF(Posted 2008) [#4]
Here is a version with filled shapes. I have removed the tPoint structure since the polygon shapes use array data

Couple of things to fix:
1) CheckIfFinished() not implemented
2) PointInPoly() function not working yet? The shape should turn RED when the mouse is over it

The shapes x/y positional structure stays the same in this example. The movement of the poly is done by using the SetOrigin command
Only the rotation affects the array values


There is another great puzzle similar to this where you need to fill a box area with pre-defined shapes. I cannot remember the name of the puzzle though




AltanilConard(Posted 2008) [#5]
The puzzle looks way better with filled shapes, just like I hoped. I'm studying your code right now, I really like the implementation of polygons. I'll try to implement CheckIfFinished() again (it's alot of work adding the solution data, I'll probably come to it tomorrow).
I could also easily add some more puzzles, as I made a basic editor that makes it easy to create shapes. If there are any suggestions, please post them.

Jim Brown, thanks for your contribution!

BTW, did anyone manage to solve the 'T' yet?


Nate the Great(Posted 2008) [#6]
could u post a windows executable?


AltanilConard(Posted 2008) [#7]
I currently don't have a windows computer with BlitzMax installed. If someone could compile a windows executable and send it to me, I could host it on my server.

I finished the CheckIfFinished() function and fixed some small things in Jim Browns version. I updated both the links in my first post to the new files.

Here's the code if you don't want to download it:



EOF(Posted 2008) [#8]
I got the PointInPoly() function working now so you can directly select a shape with the mouse. Same for rotation. Just hover over a shape then RIGHT-CLICK to rotate and LEFT-CLICK to move. The shape becomes the active one under both situations

Conrad,
I had to change the 2nd shape so that it draws in a clockwise manor. The PointInPoly() function only works on polygons constructed in a clockwise fashion
Can you therefore update the puzzle completion checking routine since this is will be currently broken?