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.

Graphics > mode 7 and vectors... the balance

#81996 - DakeDesu - Wed May 03, 2006 9:53 am

A thought occured to me in a thread where somebody claimed they had a super compression program (in one of the coding forums I believe). Some body suggested the compression program might be vector based.

Well then I thought of something... in a mode, such as mode 7, could memory be freed by using vectors in areas where tiles normally be used? If so, what would the general balance be?
_________________
[ Main Site | Kid Radd Fan Project | Forums ]

#82021 - poslundc - Wed May 03, 2006 3:48 pm

Huh? The mode 7 technique is still a normal tile background mode; it just has a raster effect applied to it every scanline to give it the illusion of perspective.

Dan.

#82108 - tepples - Thu May 04, 2006 1:01 am

Yes, you can free ROM by generating your tile data from vectors. No, you cannot free RAM to use more than 256 tiles on one layer.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82111 - DakeDesu - Thu May 04, 2006 1:41 am

poslundc wrote:
Huh? The mode 7 technique is still a normal tile background mode; it just has a raster effect applied to it every scanline to give it the illusion of perspective.


Never said it was.

tepples wrote:
Yes, you can free ROM by generating your tile data from vectors. No, you cannot free RAM to use more than 256 tiles on one layer.


Ah, thanks. I wasn't necessarily thinking of using more than 256 tiles per a layer. Using tiles where vectors would be cheaper just seemed like an interesting idea to me.
_________________
[ Main Site | Kid Radd Fan Project | Forums ]

#82204 - poslundc - Thu May 04, 2006 4:00 pm

DakeDesu wrote:
Ah, thanks. I wasn't necessarily thinking of using more than 256 tiles per a layer. Using tiles where vectors would be cheaper just seemed like an interesting idea to me.


You realize that you can't use vectors instead of tiles, though, right? Not at the phase where Mode 7 actually happens, anyway.

Even if you store vectors instead of tile data on the ROM, you will still have to render your vectors into tile data, and consume just as much VRAM as you would have otherwise.

Dan.

#82233 - DakeDesu - Thu May 04, 2006 6:19 pm

poslundc wrote:
DakeDesu wrote:
Ah, thanks. I wasn't necessarily thinking of using more than 256 tiles per a layer. Using tiles where vectors would be cheaper just seemed like an interesting idea to me.


You realize that you can't use vectors instead of tiles, though, right? Not at the phase where Mode 7 actually happens, anyway.

Even if you store vectors instead of tile data on the ROM, you will still have to render your vectors into tile data, and consume just as much VRAM as you would have otherwise.

Dan.


I never suggested tiles wouldn't be used. As per VRAM not being used. In my mind, I am pretty much thinking that is a constant anyways. Hmm... I am having difficulties getting my thoughts out here.

The idea is that some of the artwork for a mode 7 game could be represented by Vectors instead of tiles. Now, the tiles would still exist in memory, just there would also be vector artwork displaying more complex art... or would that be less complex art... I am not sure.

I will go on in this post, but I doubt I'll make sense.

The idea would be to draw onto one of the backgrounds vector area in a manner like:
Code:

while(path) {
   x = getx(path)
   y = gety(path)

   position = y * screen_width + x
   next(path)
}


where path would contain the image I'd want to draw. The tiles would either be drawn before or after this, depending on the wanted effect.

I am just wondering if a marriage of these two ideas would work, and some opinions on where the best balance would be on having mode 7 tiles and having vector art for thing that would take up less memory as vector artwork then as sprites.[/code]
_________________
[ Main Site | Kid Radd Fan Project | Forums ]

#82234 - tepples - Thu May 04, 2006 6:30 pm

First, you'd have to render the vectors onto a bitmap. Then you'd convert the bitmap to tiles and coalesce redundant tiles. Finally you'd build the map out of these tiles.

Or you could use an extended rotation background (GBA modes 3-5) and not have to worry about tiles, but in that case, the total size of your map is smaller, and it won't wrap.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82236 - DakeDesu - Thu May 04, 2006 6:37 pm

tepples wrote:
First, you'd have to render the vectors onto a bitmap. Then you'd convert the bitmap to tiles and coalesce redundant tiles. Finally you'd build the map out of these tiles.

Or you could use an extended rotation background (GBA modes 3-5) and not have to worry about tiles, but in that case, the total size of your map is smaller, and it won't wrap.


I was under the impression that 3, 4, 5 were modes for double (or triple) buffering (with five being useless for anything other than FMV), and that with modes 1, 2, 3 each had one background layer, as well as the tiling layers.
_________________
[ Main Site | Kid Radd Fan Project | Forums ]

#82240 - tepples - Thu May 04, 2006 6:43 pm

DakeDesu wrote:
I was under the impression that 3, 4, 5 were modes for double (or triple) buffering (with five being useless for anything other than FMV), and that with modes 1, 2, 3 each had one background layer, as well as the tiling layers.

Yes, modes 4 and 5 can be double buffered, but modes 3-5 can also be scaled and rotated in the same way as rot/scale layers. Mode 3 can also be double buffered if you scale it first.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82248 - DakeDesu - Thu May 04, 2006 7:41 pm

Does the DS have about five gazillion different modes for graphics each with their own little quirks and nuances? Or do I have to wait until the next portable?

So, if I get this straight I can only use tiles or just straight pixel pushing? Well, I guess considering the hardware limitations, but... er... uh... my head hurts.

Anyways, this must make me look really stupid asking this... why cannot there be a libSDL wrapper available for GBA?
_________________
[ Main Site | Kid Radd Fan Project | Forums ]

#82262 - kusma - Thu May 04, 2006 9:28 pm

DakeDesu wrote:
Anyways, this must make me look really stupid asking this... why cannot there be a libSDL wrapper available for GBA?


there can, but it would be slower and more aggressive on memory-usage, simply because libsdl gives guarantees that the gba-hardware doesn't. you'd end up with a full software-emulation with a copy-pass in the end, more or less.

#82270 - DakeDesu - Thu May 04, 2006 10:13 pm

Thanks for reminding me about how much memory libSDL takes up. Yeah, I guess the guaruntees it would make are a bit much.

Okay, I think this thread has lived past being useful.
_________________
[ Main Site | Kid Radd Fan Project | Forums ]