nes15 - Yet Another Puzzle Game

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
nes15 - Yet Another Puzzle Game
by on (#72312)
I haven't posted here or done any NES development in quite awhile, but last September I was bitten by the bug. After much studying, several exercises, and two months of work, I put together this:

Image Image

It is an implementation of the Fifteen Puzzle for the NES. It even includes an auto-solver you can watch solve the puzzle for you.

Until I can come up with a better hosting solution, the game can be found here. The source code is released under a simple BSD-style license and is included with the game. Please see the 'README' and 'LICENSE' files for more details. Comments and questions are very much welcome.

02/12/12: Updated link

by on (#72351)
Very nice! The controls are smooth, and the choice of music is great. Do you have any further plans for this game, or do you consider it complete?

I have been working on a similar project with Game Maker for PC, and I'd be willing to share some of my plans that I think could be implemented in an NES version.

by on (#72356)
Well I suck at this type of game, but congratulations for successfully writing the solving AI. This should have been the hard part !

by on (#72359)
Sweet! You know, oddly enough, when I started NESDev, I was planning on making this game, but never actually got around to it (and actually, forgot about it).

It's funny, the puzzles I usually solve leave the blank space in the top-left corner. I was trying to solve it forever that way, and kept ending up with two switched peices, which actually brings me to a question. Is it possible to solve one of these no matter how the peices are arranged? Or are there some impossible starting layouts?

by on (#72361)
Nice looking puzzle game! I've not tried your rom yet, but from the web post is looks cool.

No, it is not possible to solve for any given random arrange of pieces. IIRC, 50% of random arrangements are solvable and 50% are not. I forget the proof, but it deals with an even and odd acid test.

by on (#72363)
Thank you everyone for the responses. It's always nice to get positive feedback.

Quote:
Do you have any further plans for this game, or do you consider it complete?


I was hoping to call it complete, unless any bugs needed to be fixed or minor changes needed to be done.

Quote:
I have been working on a similar project with Game Maker for PC, and I'd be willing to share some of my plans that I think could be implemented in an NES version.


I would be curious to hear some of your ideas, but I can't guarantee that I would actually get around to implementing them. This, after all, was just a programming exercise to prepare myself for a slightly larger project.

Quote:
Well I suck at this type of game, but congratulations for successfully writing the solving AI. This should have been the hard part !


Believe it or not, I actually spent most of my time on the sound engine. The solver was one of the final things I did and it only took about a good week to a week and half to finish.

Quote:
Is it possible to solve one of these no matter how the peices are arranged? Or are there some impossible starting layouts?


This reply is correct:

Quote:
No, it is not possible to solve for any given random arrange of pieces. IIRC, 50% of random arrangements are solvable and 50% are not. I forget the proof, but it deals with an even and odd acid test.


I forgot to include links to various websites about the puzzle in the README file unfortunately... However, I found the explanation about solvability here to be rather readable if you are interested.

by on (#72369)
Nice little game with good presentation. However, I think, the control method is overcomplicated and this hurts to the gameplay. You don't need a cursor - there is always only one tile for one direction on the field, so it is enough to just move a tile when a direction pressed. Much faster and optimal to play (less keypresses), also less code work.

Also, I would prefer to solve a puzzle with nice picture instead of boring numbers, but this is not easy technically, so numbers are OK.

by on (#72380)
I've always loved this game as a kid. Best so far: 240. Anyone else beat it?

by on (#72398)
The control method might be overcomplicated, but it adds a simple visual cue and possibly prevents accidental moves (if the moves were just mapped to the D-pad, for instance).

Nice work.

by on (#72399)
Quote:
Nice little game with good presentation. However, I think, the control method is overcomplicated and this hurts to the gameplay. You don't need a cursor - there is always only one tile for one direction on the field, so it is enough to just move a tile when a direction pressed. Much faster and optimal to play (less keypresses), also less code work.

Either that or do like the FF1 version : allow to move multiple aligned pads in a single moves.

by on (#72416)
WhatULive4 wrote:
I've always loved this game as a kid. Best so far: 240. Anyone else beat it?


223 =).

Quote:
No, it is not possible to solve for any given random arrange of pieces. IIRC, 50% of random arrangements are solvable and 50% are not. I forget the proof, but it deals with an even and odd acid test.


Interesting. That is probably why even after 4000 moves, I could not solve the puzzle with the top-left space left blank!

EDIT:

Just bested my previous score: 124!

by on (#72441)
It is very nicely done. I like the cursor movement also, but I do agree with what Shiru's point about the controls being more complicated than needed. On the plus side, now anyone can look into the source code and see what you did to move the cursor like that.

The sound and the AI solver is pretty nice too. It's a pretty simple game by design, but it feels like it's finished, which isn't extremely common around here, heheh.

by on (#72464)
One thing that a cursor like this would allow is to move more than one block at once:

Image
Click on 9 to move both 15 and 9 up.

However, this game doesn't implement that behaviour. :) Anyways, nicely polished game, hope the bug keeps biting!

by on (#89839)
A spammer who posted here earlier reminded me of this project. It looks good enough to go on my 2 meg multicart.

by on (#89865)
Quote:
A spammer who posted here earlier reminded me of this project. It looks good enough to go on my 2 meg multicart.


Sure! I didn't mention it since the project was a bit of a novelty and I couldn't imagine anyone getting to much entertainment out of it. But if you want to, go right ahead :).