<<split from https://cboard.cprogramming.com/showthread.php?t=57880>>
i need to do the same game, Bejeweled, can you help me with this? The code below of Bubba it's a little buggy.
Printable View
<<split from https://cboard.cprogramming.com/showthread.php?t=57880>>
i need to do the same game, Bejeweled, can you help me with this? The code below of Bubba it's a little buggy.
I have a great idea if it's buggy. Fix it. That post was not intended to be the end all be all of how to code bejeweled.
Do some research.
What is Bejeweled?
I looked at Bubba's program, but it didn't look like a game, to me??
Its a browser puzzle game. Type it into google and you will see.Quote:
Originally Posted by Adak
IMHO theres nothing wrong with the OP's question. At least he took the time to search the board first, and in all fairness the code he found had more errors in it than you could shake a stick at. Not to mention it did not do anything.Quote:
Originally Posted by Bubba
The code was in response on how to display a bejeweled type game. I'm not going to sit here and attempt to defend a 4 year old post. For those of you who actually read the original thread I was simply showing a way he 'might' - key word - 'might' go about displaying items. I wrote the code while writing the post and I'm sure it was buggy but it was never intended to be bulletproof. It was simply a shove in the right direction.
I'm so sorry that I didn't just write the whole game so someone could copy it later.
Yeah it's not a game. I was showing one way to possibly render the text symbols or the entire board. So the concept is there but the code is quite honestly not meant to be an example of exactly what to do.Quote:
Posts: 676 What is Bejeweled?
I looked at Bubba's program, but it didn't look like a game, to me??
np, all I was trying to say was that theres no need to take offence by the OP's question; I'm sure it was never intended as anything personal :)
Sorry but quoting a 4 year old post and complaining about code that the OP obviously cannot write themselves is rude.
Maybe I should ask 'How do I make my next 3D game?' and then cite all sorts of samples from various posts that don't fit my exact design.
We like to see at least an effort here and thus far in this thread I've seen nothing.
i don't have plenty of time, i'm in the last year at highschool, and my time is filled with extra curriculum activities. Thanks for help!
Back in my day extra curriculum was just that, extra, focus on your real curriculum and do your own homework.
help me out then and tell me how do i load for displaying a full image in c++ for DOS(v3.31). I need to show images in C++ DOS when playing Bejeweled. The images must be linked someway, in a way that i can randomise the 7 squares.
I am searching 2 weeks now, and with no result!Sorry for my english, i'm in a hurry!
Ok, problem solved. Now i have to make the algorithm for the table to automatic delete the 3 blocks horizontally/vertically in combination, to make the blocks from the upper line come down in the place of the deleted blocks and finally, to verify wether there are other blocks that are making a 3-consecutive combination after the replacements of the blocks. Any help is good.
You'll need to scan through each element of the table, both by rows and by columns, and see where any combo of 3 jewels in a row, might be found.
This code is very untested, so be warned. I've never played Bejeweled, either. (Tried to, but it kept tell me it couldn't with my browser (Firefox).Code:/*an example of a row based scan*/
flag1 = flag2 = flag3 = 0;
for(row = 0; row < NumberOfRows; row++) {
for(col = 0; col < NumberOfCols - 1; col++) {
if(table[row][col] == table[row][col+1]) {
if(flag2 == 1) {
flag3 = 1; //indicating you have 3 jewels in a row
//add your "falling from the top rows down to the current row" code, here
//remember to start with the current row, and "pull" the jewels down, otherwise
//you'll not know what jewel to pull down after the first one, because you
//over-wrote it's value already
flag1 = flag2 = flag3 = 0; //ready to continue scan
}//end of if
if(flag1 == 1)
flag2 = 1; //indicating you have 2 jewels in a row
else
flag1 = 1;
} //if table[row... ==...
else
flag1 = flag2 = flag3 = 0; //1st time no match, all three flags need to go back to zero
}//col
}//row
Good luck with your project.