gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Bejeweled Clone help

#51924 - psycorpse - Wed Aug 24, 2005 6:41 pm

I have decieded to make a bejeweled clone as one of my first projects. I know it is going to be a little more difficult but it will be a good learning experience. I have read several tutorials on how to display sprites and so forth and I know how to display them and move them. I haven't been sucessful in finding the answers to my questions so I am posting here. If you don't want to give the answers because they are lenghtly then can you point me in the right direction and I can research from there? Anyways here are my questions.

1. I have three sprites (I know there could be more. But I am keeping it simple) that I am using. I have them loaded in OAM and I can display them fine. The question is how do I go about repeating them on the screen?

2. How would I go about checking to see if three of the same sprite are in a row?

Thanks for any help.
-Mike

#51929 - poslundc - Wed Aug 24, 2005 8:16 pm

psycorpse wrote:
1. I have three sprites (I know there could be more. But I am keeping it simple) that I am using. I have them loaded in OAM and I can display them fine. The question is how do I go about repeating them on the screen?


Create multiple OAM entries that point to the same tile in VRAM, but have different x and y coordinates. Just don't go over your 128 OAM entry limit.

Quote:
2. How would I go about checking to see if three of the same sprite are in a row?


By keeping track of the location of your game's entities in an array of their own data structure. Then for each row, loop through the array and keep a running total of how many of each different type you've found.

#51947 - tepples - Wed Aug 24, 2005 9:44 pm

Another helpful hint: If you're making a grid-based puzzle game such as T*tris, C*lumns, Kl*x, P*yo P*yo, L*mines, M*nesweeper, or B*jeweled, it's most efficient and most common to draw most of the game objects as tiles in a mode 0 background unless you have an oddball playfield size. In fact, the coin-op Tetris by Atari Games (now part of Midway) used a video chip that didn't support sprites at all.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#51951 - psycorpse - Wed Aug 24, 2005 10:57 pm

Thanks. That should get me on the right track.

#52494 - Quirky - Wed Aug 31, 2005 8:25 am

And play Zooo, (the GBA version of DS Zoo Keeper) it's a pretty good commercial bejeweled clone. It uses sprites for the animals, as witnessed in the 'angry animals' moment when you run out of time.