Looking for help from other programmers
BlitzPlus Forums/BlitzPlus Beginners Area/Looking for help from other programmers
| ||
I have been a member since December 2005, trying to teach myself programming off and on. I have been reading and working with "Game Programming for Teens" second edition and "Programming for the Absolute Beginner" among others. I have no formal training, just the desire to learn to program my own games. I would like to create a memory matching game for my girls using BlitzPlus. I am not sure where or how to begin. I am looking for insight from other programmers. I have created 13 images, one for the back of the cards and 6 pairs of matching images. I would really appreciate some information or advice to get me going in the right direction as I am having trouble turning my ideas into source code. Thanks, Nivlac |
| ||
As a programmer you should really stop and ask yourself; what kind of program am i going to create here? you should try using "command reference" to help you out ( say you didn't have any idea on how a command works there you can find out ) next i would recommend going here: http://membres.lycos.fr/blitzcoder/articles.shtml ( i learned to much here...to be honest i found this site from a user here called Hotshot2005 ) that should get you going :D pardon my imperfect english |
| ||
Here is a good plan of attack for a matching game: 1) Take every image pair and assign it a number 2) Make a two dimensional array of rows and columns, and assign every "cell" a number. This will be your card layout. 3) Draw card's backside on the table, in rows and columns. 4) When the user clicks a card: a) If it is the first guess, show the correct card using the information in the array corresponding to its row and col. b) If it is the second guess, overturn the card, check if the elements in the array of the first guess and this guess are equal. If they're not, turn them back over. Otherwise leave them face up. 5) Mark the array cell as "matched" by giving it a negative value, or something unique. When all the elements of the array have this value, the game is over. Hopefully that helps you get started with a plan of attack. Try accomplishing each step one by one, and it'll start to come together. If you have any code questions don't hesitate to ask. |
| ||
Thank you lid and sauer for taking the time to give your advice and insight. I don't have any source code to post now but will be working on it. I'm looking forward to being a programmer and an active member of this site and may be able to help someone or others in the future. Hope to be able to post some code soon! Thanks again NIVLAC |
| ||
I am posting code for a memory match game that I have been working on. I am stuck and am hoping that someone can review what I have done so far and give me some suggestions on how to move forward. As a reminder, I have no formal programming background, just the desire to learn as much as I can. |
| ||
Not everyone that can help has Blitz plus. It is useful to say what exactly the problem is. You can paste all your images together in one big strip, then use loadanimimage to load them. Your array can then store the image frames for the card at each location, so in the loop you will do something like: drawanimimage cards,x,y,c(row,column) |
| ||
I'm not sure how to match each image pair and then draw them to the table(the array)and make them random so they don't end up in the same space every time. I know then i need to use the mouse to click on the the image to show what is behind it, if the images match mark them as match or turn them back over, just not sure how to do so |
| ||
Bah! The comfort of five years o' BMax makes B+ code look extremely sloppy and lame. Nonetheless, I think it works. Some of the mechanics here are just sooo easy 'n tidy in BMax! Make sure you download that png mentioned above in the code, save it somewhere and match the path. The PNG doesn't line up to the grid correctly (so there are some stripes and thingies here and there), but it's rather hard to find anything on the net that does line up nicely and doesn't have a thick bar around the whole picture. ; Memory! - CS_TBL 2010 ; ; |
| ||
Uh.. that's nice. The forum shows an image in a code area :D Let's see.. ; http://maxcdn.webappers.com/img/2007/11/vector-icons. png Wipe that bogus space before the 'png' I can actually see people taking (mis)advantage of having graphics in a code area ^_^ |