Page 1 of 1
Help with Memory Game
Posted: Tue Apr 10, 2007 3:42 pm
by royrogersrevenge
Hi everyone, I'm trying to take random images from a database I have and put them into a memory game. There would be 4 columns and 4 rows and everytime you click on a square, an image would appear. You would then click on another image and if they matched, the two images would both remain 'up', or if they did not match they would both be flipped back down. The game would be won when all pairs are matched. I'm quite new to php so, while I've tried a good bit with this, I haven't really gotten anything accomplished as I'm not entirely sure as to what I'm to do for much of this. Could anyone help me out with some advice or code to help me accomplish this?
Thanks,
Roy
Posted: Tue Apr 10, 2007 3:55 pm
by feyd
It would be more responsive if you did most of this project in Javascript.
Posted: Tue Apr 10, 2007 4:57 pm
by RobertGonzalez
I agree with feyd. This is really something that, just from a pure user experience standpoint, should be done client side.
Posted: Tue Apr 10, 2007 5:23 pm
by Ollie Saunders
If you were going to implement this in PHP you would need to make use of sessions.
Posted: Tue Apr 10, 2007 6:07 pm
by impulse()
I made this a while ago -
http://stesbox.co.uk/new/games/oxo/
I know it's not exactly what you're looking for but I think it will get you most of the way.
Take note of the URLs for each square and let me know if you want to see the code.
Regards,
Posted: Tue Apr 10, 2007 8:53 pm
by royrogersrevenge
Unfortunately I know very little about javascript and I'm afraid that it must be in PHP anyway as this is for a course I'm taking at school and this is the project my groupmembers chose(though it seems I'm doing all of the work :-\). Impulse, I would very much appreciate a look at your code as, while a different type of game, it seems to have several things in common with what i'm attempting to create.
Thanks,
Roy
Posted: Wed Apr 11, 2007 10:40 am
by RobertGonzalez
How much PHP do you know Roy? I only ask because if you look closely at the way the links are laid out in that example, it should be somewhat straight forward how to implement it.