Hello all, I've been trying to make a Bejeweled clone with Scratch. I've gotten a little bit stuck, so I thought I'd come here where people think more technically than they do in scratch's "Help with Scripts" forum.
There is actually one already out, called Bescratched, but it was made with an old version of scratch and isnt nearly as extensible as I want mine to be.
By changing variables, almost every aspect of the game should be variable. I've already programmed variable board dimensions of 1x1 to 60x60. Its not reasonable to play with less than 5x5, and 60x60 isnt so reasonable either, so those are theoretical limits. The amount of gems that you have to line up and how many gem-types are used should also be variable. I've managed to program that part fairly accurately, although it might be possible to fine-tune it.
Notice the slight difference in whitespace around the edges with different sizes. I'm not sure how to fix that, but its not that important at the moment.
So now that I've programmed the resize-able gem-board and selector, I need to start working no the actual game.
I'm trying to script efficiently and effectively - to do as little as possible but do what needs to be done.
The way bescratched works is by checking all possible locations of a row of 3 using 10 different sprites. My goal is to do it with one sprite, only checking the locations that might have a set:
How should I script checking for rows of 3, 4, 5, when applicable or only 3?
I'm not quite sure how to do that.
I would like the same script to be useable for the other checks that need to be done after the gems fall, but how? I would need to keep track of the origin of checking and the direction, and do them one by one, but this could quickly get redundant. I would also need a lot of different lists for that, because scratch doesn't have 2d arrays.
The game board is a list of the gems in order from top left to bottom right, with each type of gem labeled as a number 1, 2, 3 etc;.
What would be the best way to script this? Please post any comments, questions, suggestions, or the like.
I'm sorry if I didnt explain something enough. If something is unclear, let me know and I'll try to explain it.
Also I would like suggestions for themes other than gems.
Thanks!
There is actually one already out, called Bescratched, but it was made with an old version of scratch and isnt nearly as extensible as I want mine to be.
By changing variables, almost every aspect of the game should be variable. I've already programmed variable board dimensions of 1x1 to 60x60. Its not reasonable to play with less than 5x5, and 60x60 isnt so reasonable either, so those are theoretical limits. The amount of gems that you have to line up and how many gem-types are used should also be variable. I've managed to program that part fairly accurately, although it might be possible to fine-tune it.
Notice the slight difference in whitespace around the edges with different sizes. I'm not sure how to fix that, but its not that important at the moment.
So now that I've programmed the resize-able gem-board and selector, I need to start working no the actual game.
I'm trying to script efficiently and effectively - to do as little as possible but do what needs to be done.
The way bescratched works is by checking all possible locations of a row of 3 using 10 different sprites. My goal is to do it with one sprite, only checking the locations that might have a set:
How should I script checking for rows of 3, 4, 5, when applicable or only 3?
I'm not quite sure how to do that.
I would like the same script to be useable for the other checks that need to be done after the gems fall, but how? I would need to keep track of the origin of checking and the direction, and do them one by one, but this could quickly get redundant. I would also need a lot of different lists for that, because scratch doesn't have 2d arrays.
The game board is a list of the gems in order from top left to bottom right, with each type of gem labeled as a number 1, 2, 3 etc;.
What would be the best way to script this? Please post any comments, questions, suggestions, or the like.
I'm sorry if I didnt explain something enough. If something is unclear, let me know and I'll try to explain it.
Also I would like suggestions for themes other than gems.
Thanks!