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 > Newb Question about tile size (Your opinion on Tetris)

#37931 - matthewwithanm - Fri Mar 18, 2005 9:26 pm

Although I fooled around with basic stuff a few years back, please consider me totally new to this. I'm planning on writing a Tetris clone and I was wondering, is there a way to use tiles other than size 8x8? That is, could my Tetris blocks be 7x7 pixels wide?

Thanks


Last edited by matthewwithanm on Sat Mar 19, 2005 4:51 am; edited 1 time in total

#37933 - tepples - Fri Mar 18, 2005 9:45 pm

Changing the height:
You can cut off the bottom of a row of tiles by using hblank DMA to the vertical scrolling registers. At least Columns Crown and Puyo Pop do this.

Changing the width:
The easiest way to change the width of tiles is to scale them down in mode 1 or mode 2. If you want to see scaling applied to T*tr*s, then go download TOD.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#37936 - DekuTree64 - Fri Mar 18, 2005 9:53 pm

Another way is to make one sprite for each tile, and position them yourself. If you need more than 128 of them (which you probably will), you'll have to use a raster trick called multiplexing, where you wait until a sprite has been fully drawn, and then move it down below the currently drawing scanline, so it gets drawn again during that same frame.

But realistically, just stick with 8x8.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#37938 - matthewwithanm - Fri Mar 18, 2005 10:07 pm

Wow, thanks for the quick responses!

Tepples - wouldn't the mode 1/2 method also take care of the height for me?

The thing is that I would like my clone to use the standard 10 x 20 well but I don't want it to take up the whole height of the screen.

#37939 - tepples - Fri Mar 18, 2005 10:26 pm

matthewwithanm wrote:
Wow, thanks for the quick responses!

Some of us have no life because we keep getting turned down by employers.

Quote:
Tepples - wouldn't the mode 1/2 method also take care of the height for me?

Yes.

Quote:
The thing is that I would like my clone to use the standard 10 x 20 well but I don't want it to take up the whole height of the screen.

For that, use tiles of 8x7 pixels on your playfield layer, with HDMA scaling in mode 0. In practice, players won't care that your tiles aren't square. Do you want HDMA scaling explained in detail?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#37960 - matthewwithanm - Sat Mar 19, 2005 4:46 am

tepples wrote:
Do you want HDMA scaling explained in detail?


I'm not sure. Maybe I can get your opinion on something. I'm planning on recreating the only Tetris I ever loved - the original NES version. I can't recreate it exactly because of resolution differences with the GBA but I'm going for the same 'feel.'

the original

One possible mockup (with GB Tetris sized well)

[url=http://dickinson.edu/~tretterm/tetris/mockup7%20(8x7%20tiles).gif]mockup with 8x7 tiles[/url] (haven't has a chance to rework frames yet so don't go by that)

There are plenty of other subtly-different mockups here. Please check them out and give me a prodding in the right direction. (mockup 6 has full size tiles and a full size well. All are very rough.)

I'm also considering freeing up space by changing the levels / lines display to either:

LEVEL
7.5

or

LINES
75

Thoughts?

#37962 - tepples - Sat Mar 19, 2005 5:05 am

Tetris for Game Boy uses a 10x18-tile field that touches the top and bottom of the 144-pixel-tall screen.

Tetris Worlds for GBA uses a 10x20-tile field that touches the top and bottom of the 160-pixel-tall screen, roughly similar to how your mockup 6 does it.

If you're trying to reproduce the NES version, I'd suggest using an 8x7-pixel tile layout similar to your mockup 7. When played on an actual TV, the NES version does not have square tiles because its pixels are stretched horizontally by a factor of 1.21.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.