#13479 - doudou - Sun Dec 14, 2003 8:49 pm
I'm working on a tile based game and i would prefer using mode 4 with double buffering instead of mode 0 which is generaly used for this kind of game. Is it a bad choice ?
#13480 - sajiimori - Sun Dec 14, 2003 8:57 pm
What do you gain by using mode 4?
#13493 - Miked0801 - Mon Dec 15, 2003 12:52 am
I'll tell you what you lose and that's half of your Sprite VRAM. Mode 3/4/5 are hacks to get bitmaps to work. The hardware does a much better job managing and working with tile based graphics. There's only 2 reasons I would use a bitmap Mode:
1. I need to display a 15 bit image for whatever reason (truth is with HBlank interrupts, you can get this with tile mode fine at the cost of ROM palette space)
2. I want to do some 3D work without having to map my images onto chars (which I admit is a pain, but one that can be solved.)
Stick with mode 0/1/2.
Mike
#13495 - tepples - Mon Dec 15, 2003 1:48 am
What if you're trying to make a puzzle game, and your tiles aren't 8, 12, or 16 pixels wide? (Heights can be anything with the Columns Crown method; widths of 8n + 4 are easy with the Puyo Pop method.) Is it easier to swap sprites in Hblank (as Super Puzzle Fighter II does), or is it easier to draw the playfield as a bitmap?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#13496 - Miked0801 - Mon Dec 15, 2003 2:32 am
If you want a non Char conforming puzzle game, then you aren't working to the platform's strengths (yes I know this is debatable and probably flame bait :P )
Seriously though, I would still use (and have done so) a char mode solution just to be able to have multiple planes and such. A 320x240 screen is 32x20 chars or 640 chars total if every char is unique (which as you know most screens aren't. Note: you only get 1 screen if these chars are 8-bit, but still you get the picture) That means you could have 2 unqiue screens in memory (for page flipping if you needed it, alpha blend effects, cross fades, 512 color images, etc.), room for a 3rd and 4th partial plane or a 3rd rotation plane, and all your sprite RAM for the tile pieces. If you need more OAMs or VRAM, then by all means, HBlank swap on a vertical line. But this way, you aren't burning 10% or so of your CPU time just swapping OAMs and VRAM.
If for some reason sprite couldn't be used for the pieces, then just write them into the unique char map instead and go from there.
Overall, using chars will save cart space and give you more options than a bitmap mode. I do welcome other opinions :)
Mike
#13497 - tepples - Mon Dec 15, 2003 2:42 am
Miked0801 wrote: |
If you want a non Char conforming puzzle game, then you aren't working to the platform's strengths (yes I know this is debatable and probably flame bait :P ) |
But if it's your job to port a puzzle game from another platform to the GBA, your boss probably won't care whether you're "working to the platform's strengths." Often, 8x8 tiles are too small to make anything out (see also Puyo for Super Game Boy), and 16x16 tiles make the playfield taller than 160 pixels, especially for games on a 6x12 space or similar size playfield. I'm guessing that a port of Viacom's Zoop (which uses an 18x14 space playfield) would have to use tiles of size 12x11 pixels.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#13498 - Miked0801 - Mon Dec 15, 2003 2:55 am
But a sprite can be any size (with transparencies on edges) and is much easier and efficient to move around on the background. Since you aren't scaling/rotating, you won't get sprite breakup, and it'll be much easier to do piece effects later with sprites and the extra BG planes available.
That said, if you don't need any of the special GBA effects and are looking to just pull a quick and dirty conversion, then bitmap mode could work. I'm just stating that since Tile modes play to the strength of the platform, you'll be able to do much more much easier after you get the basic tile engine running. It all depends on how many days (or hours :) ) you have to get your engine running and how likely your boss is going to say: "That's nince and functional, but now can you get it to do this really cool effect that this other GBA game is doing." I know my boss has a habit of doing the same. Plan ahead if you can :)
Mike
#13506 - ampz - Mon Dec 15, 2003 9:54 am
Don't forget one of the tile-modes big advantages: It allows hardware scrolling. If you want to scroll a bitmap background, you have to redraw the entire bitmap, consuming lots of VBLANK time.
I'am more or less mapping a bitmap onto the tilemode just to get the hardware scrolling.
#13636 - doudou - Thu Dec 18, 2003 10:23 pm
to close this discussion : thanks for all your posts, i deceided to use mode 0.
#13645 - sgeos - Fri Dec 19, 2003 4:39 am
doudou wrote: |
...i would prefer using mode 4 with double buffering... |
You can use a spare screen base block to double (or tripple, etc) buffer. That uses less space. Draw to the inactive screen base block and swap screen base blocks every v-blank.
tepples wrote: |
What if you're trying to make a puzzle game, and your tiles aren't 8, 12, or 16 pixels wide? ... Often, 8x8 tiles are too small to make anything out (see also Puyo for Super Game Boy), and 16x16 tiles make the playfield taller than 160 pixels, especially for games on a 6x12 space or similar size playfield. I'm guessing that a port of Viacom's Zoop (which uses an 18x14 space playfield) would have to use tiles of size 12x11 pixels. |
One could use rotation/scaling BGs. The setupcode would be fairly simple. After that, it's just a character based BG with the added bonus of being in a mode that can do rotation and scaling effects. Sprites could also be scaled and rotated, or just drawn at the proper resolution in the first place.
-Brendan
#13647 - SmileyDude - Fri Dec 19, 2003 5:49 pm
In a game that I was working on earlier in the year, I used a 12x12 block for each game tile... it was a 10x10 board, which gave me a nice looking 120x120 overall.
The way I did it was to use Mode 0, and then I dedicated 2 layers for the board... with one of the layers offset by 4x4 pixels. Depending on which position on the board it was, I'd either put it in layer 0 or layer 1.
I tried the scaling option at first, but I could never get the scaling to give me consistent results (i.e, the same tile would look slightly different in the next row/column).
[Images not permitted - Click here to view it]
_________________
dennis