Page 1 of 2

My Little Puzzle game

Posted: July 11th, 2013, 5:48 am
by LuisR14
well here's a little game i made (made in a day)
hope you like and enjoy ^^ (btw, readme.txt lol)
suggestions are welcome :P (didn't give the game a menu, just jumps into game)

Re: My Little Puzzle game

Posted: July 11th, 2013, 6:56 am
by Tristan
Holy crap I suck at these slide puzzles :P
But I finally got it! It took me a lot longer than it should have!
Image

Re: My Little Puzzle game

Posted: July 11th, 2013, 6:44 pm
by Asimov
Hi Luis,

Well it worked once I worked out I had to copy the files from "Chill Directx framework" to Release LOL.
I think all this game needs is a nicer interface. Maybe a border around the playing area and stuff.

Maybe it would polish it that when you click on a square it slides along instead of just appearing there.
Of course that would mean adding timeDelta to get the speed right.

However nice game.

Re: My Little Puzzle game

Posted: July 11th, 2013, 8:12 pm
by LuisR14
Asimov wrote:Well it worked once I worked out I had to copy the files from "Chill Directx framework" to Release LOL.
pretty much why i had put that "run" batch file :P, tho i could've done that instead but was just lazy :P (and the batch file i had already made for when i was coding thru commandline lol)
Asimov wrote:I think all this game needs is a nicer interface. Maybe a border around the playing area and stuff.
easy to do i guess :P
Asimov wrote: Maybe it would polish it that when you click on a square it slides along instead of just appearing there.
Of course that would mean adding timeDelta to get the speed right.
yea i had thought of that but would require some bit more code, i'd have to change some stuff :P (so ofc i was being lazy and wanted game to be working already :lol:)

Re: My Little Puzzle game

Posted: July 17th, 2013, 3:25 am
by LuisR14
i think i'll make my own sudoku game (wanna see how that works out :P)

Re: My Little Puzzle game

Posted: July 17th, 2013, 5:17 am
by nG Inverse
I love sudoku! I was actually going to make one myself, but without being able to find a stable database of unsolved puzzles that I could simply read into the program, I lost interest quickly.

If you (or anyone) makes any intuitive and abstract puzzle games, I would love to have a play through. I just recently created a sokoban remake for my sister to try and drag her into the madness. It consisted of dogs pushing bones into holes, so she found it enjoyable for a few minutes :)

Re: My Little Puzzle game

Posted: July 17th, 2013, 4:56 pm
by Asimov
Hi nGinverse,
I love sudoku! I was actually going to make one myself, but without being able to find a stable database of unsolved puzzles that I could simply read into the program, I lost interest quickly.
Surely you wouldn't need a database. Can you not work this out mathematically?
I don't play sudoku, but I believe it is random layout of numbers 1 to 9. I am sure you could generate games by random numbers with some simple control and checks.

Re: My Little Puzzle game

Posted: July 17th, 2013, 7:26 pm
by LuisR14
nG Inverse wrote:I love sudoku! ... I would love to have a play through. I just recently created a sokoban remake for my sister to try and drag her into the madness.
hehe, well my younger sis loves sudoku lol :P
Asimov wrote:Surely you wouldn't need a database. Can you not work this out mathematically?
yea i thought that as well (i pretty much made this game using random placement)

Re: My Little Puzzle game

Posted: July 17th, 2013, 7:40 pm
by nG Inverse
Never really thought about it, I'll look up some algorithms for it. You have to make sure the outcome would work too, and if the puzzle is solvable with the given information.

Re: My Little Puzzle game

Posted: July 25th, 2013, 9:29 pm
by viruskiller
think is more about just random placing the numbers, and algorithms to generate them sound really complex, i mean u gota find a semingly random pattern of numbers that fit the 1-9 rule on every column or row and then just extract the numbers u want to put on the unsolved table.

although if i think of it it wouldn't be that hard to get it:P

just randomly generate first horizontal line, then generate another line with the condition that no number is equal with any of the numbers in the same row , column or region, if it gets into a dead end condition re run the whole row. this might be an inefficient way of doing it, for all i know it might end up into a dead end after getting a full row done, so it might need a row failed count which should decrease for each new row, like last row has one solution, so it will be found first time,
the row before it has 2 solutions, and so on..........

nvm what i said above, i was typing while thinking it and then then an idea came to mind.

what if we can start from a basic template and scramble it to look random?

if u take this table


1 2 3 4 5 6 7 8 9

4 5 6 7 8 9 1 2 3

7 8 9 1 2 3 4 5 6


2 3 4 5 6 7 8 9 1

5 6 7 8 9 1 2 3 4

8 9 1 2 3 4 5 6 7




3 4 5 6 7 8 9 1 2

6 7 8 9 1 2 3 4 5

9 1 2 3 4 5 6 7 8


u can see that any row has the 1 2 3 4 5 6 7 8 9 numbers in a consecutive order, some with a bit of offset

now to scramble that we can choose a random number on the first region and swap it with another in the same region, and then swap the same numbers in all regions.

do a few swaps between random numbers and u get a solved table, from that pick some random numbers in each region and dump the rest and u got an unsolved table:P

just checked wikipedia on sudoku
In 1986, Nikoli introduced two innovations: the number of givens was restricted to no more than 32, and puzzles became
"symmetrical" (meaning the givens were distributed in rotationally symmetric cells).
if u look at the unsolved puzzle below u see the rotational symmetry they talk about:P

http://upload.wikimedia.org/wikipedia/c ... 050714.svg