The MASM Forum

Projects => Game Development => Topic started by: avcaballero on September 02, 2022, 06:13:46 AM

Title: Puzzle game
Post by: avcaballero on September 02, 2022, 06:13:46 AM
A tiny puzzle from some years ago. Made 100% asm+gdi, no external libs.

Menu:
- New. New game
- Reinit. Reinit the game if you are lost.
- Load a bitmap. You may load any bitmap to solve the puzzle for it.
- Level of difficulty (bmp divided in how many tiles).
- Exit

Ayuda (Help):
- Ayuda: Help. This open a window with the original bitmap to serve as a guide.
- Acerca de: About. This open a child window with a nice about dialog.


To shuffle the slide puzzle I use brute force (manually), but there are some algos to do so, like the Fisher-Yates, but not every shuffle may be a solvable puzzle. When I have time I'll try to use some algo to shuffle it.
Title: Re: Puzzle game
Post by: zedd151 on September 02, 2022, 06:30:03 AM
Cute game. Kinda like my 4x4 game, but with pictures and only 2x2.


Should expand it to 4x4. For the unsolvability issue, I start with a solved puzzle and scramble it using only valid "moves" I do many iterations of scrambling for a better mix. Then you could even make it larger 5x5, 6x6, etc. without worrying about unsolvable puzzles.


Very nice about box. That is the crowning jewel of this example.  :cool:
Title: Re: Puzzle game
Post by: avcaballero on September 02, 2022, 06:40:38 AM
You may increase the number of tiles of the puzzle by selecting the "Menu/Level/1,2,3,4,5,6,7,8". It has 8 leves, 2x2 is only the first level.  :thumbsup:

You also may use your own bitmap using "Menu/Load Bitmap"
Title: Re: Puzzle game
Post by: zedd151 on September 02, 2022, 06:42:16 AM
Oh, cool. I just gave it a brief look at. I'll give it a better look when I'm at my computer
Title: Re: Puzzle game
Post by: zedd151 on September 02, 2022, 07:50:31 AM
Okay, it is cool. I really like the about box especially. Usually they are fairly plain.
Title: Re: Puzzle game
Post by: avcaballero on September 02, 2022, 04:29:44 PM
 :thumbsup: Thank you