PDA

Click to See Complete Forum and Search --> : jigsaw game


Breax
May 10th, 2001, 08:36 AM
i'm new in game programming
i'm planning to make a puzzle game, but i've many problems

1. how to cut a part of an image and put to one control

2. how to make rounded activex control( the shape like those in real jigsaw game)

3. how to rotate images

plenderj
May 10th, 2001, 09:58 AM
Well to cut the images you could just create the one device context for the the entire picture, and then "Blit" from specific areas of that picture ...

Zaei
May 10th, 2001, 11:54 AM
Probably the best way that I can think of making a puzzle game is to make a 2D array for the height an width of the puzzle, one for each piece. Each array has a value, 0..numPieces - 1. On the side, you have the piece bank, which you can select your piece from, and then click on the main area, to place the piece. Create some code to take the mouse click location, and turn it into an array index (for the 2D array), check the piece ID against the location in the array. if they match, place the piece. Otherwise, put it back into the bank. You can do this by creating a BIG bitmap with each piece, and use BitBlt with a Mask (look around on here to find that information) to draw the pieces.

Z.