My Little Puzzle game

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

My Little Puzzle game

Post by LuisR14 » July 11th, 2013, 5:48 am

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)
Attachments
Puzzle.rar
(1.56 MiB) Downloaded 341 times
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
Tristan
Posts: 14
Joined: July 7th, 2013, 3:38 am

Re: My Little Puzzle game

Post by Tristan » July 11th, 2013, 6:56 am

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

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: My Little Puzzle game

Post by Asimov » July 11th, 2013, 6:44 pm

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.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: My Little Puzzle game

Post by LuisR14 » July 11th, 2013, 8:12 pm

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:)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: My Little Puzzle game

Post by LuisR14 » July 17th, 2013, 3:25 am

i think i'll make my own sudoku game (wanna see how that works out :P)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

nG Inverse
Posts: 115
Joined: April 27th, 2012, 11:49 pm

Re: My Little Puzzle game

Post by nG Inverse » July 17th, 2013, 5:17 am

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 :)

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: My Little Puzzle game

Post by Asimov » July 17th, 2013, 4:56 pm

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.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: My Little Puzzle game

Post by LuisR14 » July 17th, 2013, 7:26 pm

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)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

nG Inverse
Posts: 115
Joined: April 27th, 2012, 11:49 pm

Re: My Little Puzzle game

Post by nG Inverse » July 17th, 2013, 7:40 pm

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.

User avatar
viruskiller
Posts: 399
Joined: June 14th, 2012, 5:07 pm

Re: My Little Puzzle game

Post by viruskiller » July 25th, 2013, 9:29 pm

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

Post Reply