#165719 - Chano Marrano - Mon Jan 05, 2009 2:20 pm
Is there any way to surpass the 1024 tile limit in a map with Grit?
For example if flipping flags could be overwritten, tile index can be expanded to allow 4096 unique tiles (for a dynamic tile reloading map).
_________________
Sh*tty RPG
#165720 - eKid - Mon Jan 05, 2009 2:26 pm
Chano Marrano wrote: |
(for a dynamic tile reloading map) |
Sounds scary. :P
#165785 - silent_code - Tue Jan 06, 2009 8:25 pm
If you're asking to fool the hardware, then the answer is no. Anything else (a dynamic tiling background engine) would have to be written by you for your game engine.
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#165787 - gauauu - Tue Jan 06, 2009 8:50 pm
I don't think he's talking about fooling the hardware. He's talking about making a map with 4000 tiles, where his engine loads the correct tiles into vram when needed. It sounds (I haven't messed with grit enough to confirm this) that grit only supports 1024 tiles, but he'd like it to support more to generate the tile data for his large dynamic maps.
#165788 - Chano Marrano - Tue Jan 06, 2009 8:52 pm
Quote: |
If you're asking to fool the hardware, then the answer is no. Anything else (a dynamic tiling background engine) would have to be written by you for your game engine. |
I know, I know. The problem is that if a bitmap with more than 1024 tiles is converted with Grit the program doesn't allow to overwrite the flipping flags. With gfx2gba I hadn't that problem.
_________________
Sh*tty RPG
#165795 - eKid - Wed Jan 07, 2009 3:06 am
How would your system organize the data (how would grit know how to format it)? It would seem pretty messy to manage such a thing.
#165806 - Chano Marrano - Wed Jan 07, 2009 9:14 am
Quote: |
How would your system organize the data (how would grit know how to format it)? |
Grit doesn't need to know any special format. It's as simple as converting tile 1024 as 0xX400 instead of 0xX000. Tile number is moduled by 1024, I only want to remove this restriction.
Another problem is how to manage this data on the GBA, but that's out of the question.
_________________
Sh*tty RPG
#165813 - kusma - Wed Jan 07, 2009 1:00 pm
For constructing very custom maps, I've found that I'd have to write my own converters. It's not really that much of a hassle if you're using something like FreeImage, though. However, extending Grit might be a more future-proof option.
#165900 - silent_code - Mon Jan 12, 2009 10:03 am
A very contemporary name comes to mind: MegaTile ... ;^D
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#165907 - DensitY - Mon Jan 12, 2009 8:24 pm
silent_code wrote: |
A very contemporary name comes to mind: MegaTile ... ;^D |
lol!!
#165911 - Kyoufu Kawa - Mon Jan 12, 2009 9:44 pm
More like "jetpacks to mind" or something like that, amirite? ;)
#165936 - Jinroh - Tue Jan 13, 2009 7:47 pm
silent_code wrote: |
A very contemporary name comes to mind: MegaTile ... ;^D |
ROFL! ^_^
I will also agree that you will have to write some kind of tile/scene management system.
_________________
The lone Wolf howls, driven by pride he presses on. Knowing not where he goes, but only where he wants to be.
~Me~
#165989 - silent_code - Thu Jan 15, 2009 6:09 pm
X^D
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.
#165996 - Cearn - Thu Jan 15, 2009 7:40 pm
I masked the tile index with 0x03FF because generally it's not a good idea for bitfields to bleed into each other. However, since if you're over the tile limit, the data will have gone sour anyway, I suppose I could modify it so that it either doesn't mask at all, or only mask those bits that didn't appear in the tile-reduction options (for example, -mRtpf would use 10-bits for the tiles, but -mRtp would use 12). If you can build grit from the source, you can even make the modification yourself: it's one line in grit_tile_reduce(); the one that says "se |= jj & SE_ID_MASK;". Remove the mask there and it should work.
Having said that, even with this change you'll need to be careful. As far as I can tell, dynamic tile loading has certain special needs. For example, you can't have something like tiles 0x0002 and 0x0402 in the same field of view because they'd both use character 2. Either the maps would have to be specifically prepared to work around those occurring, or the map engine must be able to work around that.
#166001 - Chano Marrano - Thu Jan 15, 2009 9:51 pm
Thanks, Cearn. I'll try to modify Grit next week.
About the tile loading thing, I think it would be a good approach to have a table of correspondence between BG tiles and tiles loaded in VRAM, and another table with the number of map entries on screen that are using each VRAM tile (a value of 0 means that a BG tile can be loaded in the VRAM tile).
For example, if the map is scrolled one column right, the engine would have to delete the left column that is not visible anymore (decrementing the values of the second table) and to load the new visible column at the right (incrementing the values of the second table and loading new tiles in VRAM if necessary).
_________________
Sh*tty RPG
#176272 - elwing - Wed Jun 08, 2011 9:08 am
Chano Marrano wrote: |
Thanks, Cearn. I'll try to modify Grit next week.
About the tile loading thing, I think it would be a good approach to have a table of correspondence between BG tiles and tiles loaded in VRAM, and another table with the number of map entries on screen that are using each VRAM tile (a value of 0 means that a BG tile can be loaded in the VRAM tile).
For example, if the map is scrolled one column right, the engine would have to delete the left column that is not visible anymore (decrementing the values of the second table) and to load the new visible column at the right (incrementing the values of the second table and loading new tiles in VRAM if necessary). |
That seems really costly, would be nice to see if you're able to do that...
#176288 - keldon - Wed Jun 15, 2011 12:44 pm
Chano Marrano wrote: |
Thanks, Cearn. I'll try to modify Grit next week.
About the tile loading thing, I think it would be a good approach to have a table of correspondence between BG tiles and tiles loaded in VRAM, and another table with the number of map entries on screen that are using each VRAM tile (a value of 0 means that a BG tile can be loaded in the VRAM tile).
For example, if the map is scrolled one column right, the engine would have to delete the left column that is not visible anymore (decrementing the values of the second table) and to load the new visible column at the right (incrementing the values of the second table and loading new tiles in VRAM if necessary). |
That's the sort of thing that was on on the DMG (classic gameboy), although IIRC tile data wasn't copied. But why do you need to do this with tiles, if you have no duplicates then this is essentially a giant bitmap, and if there are duplicate tiles (that can result in reduced tiles) then are you using Tonc in the right way?
___
<edit>: So you could just store a giant 4-bit bitmap (presuming that's not what you were proposing), then rendering that into tile data memory.
</edit>
---
The streaming could be complicated since you need both vertical and horizontal scrolling ability, so you may want to duplicate your data so that it can be streamed in all directions effectively (or is card-streaming not an issue with the sd-based file systems).
#176289 - Chano Marrano - Wed Jun 15, 2011 7:58 pm
Necropost LOL.
In this two years I haven't much time to work on GBA (career and work :P), and eventually I lost interest on it.
Whatever, what I wanted to do was to be able to show a "giant bitmap" without having to stream all tiles in a row/column, only the unduplicated ones.
I don't understand why I would need to duplicate any data, I think a buffer of 31x21 tiles should allow to scroll on both directions simultaneously.
Do you know a better approach to get this?
PS: sorry for my bad english u_u.
_________________
Sh*tty RPG
#176291 - keldon - Wed Jun 15, 2011 11:43 pm
Chano Marrano wrote: |
Necropost LOL.
In this two years I haven't much time to work on GBA (career and work :P), and eventually I lost interest on it.
Whatever, what I wanted to do was to be able to show a "giant bitmap" without having to stream all tiles in a row/column, only the unduplicated ones.
I don't understand why I would need to duplicate any data, I think a buffer of 31x21 tiles should allow to scroll on both directions simultaneously.
Do you know a better approach to get this?
PS: sorry for my bad english u_u. |
You can blame Yequan for the necroposting. When I say duplicate, I mean identical tiles. So if you only had 1000 unique tiles, then they could all fit within the 1024 tile names.
You can ignore what I said about the horizontal/vertical streaming, I thought you were having a super huge bitmap (like 1028 tiles wide of something).
Here's a link on how to do this: Jason's large map scrolling.
#176294 - Chano Marrano - Thu Jun 16, 2011 12:47 pm
What I mean with the "giant bitmap" thing is to allow maps of more than 1024 unique tiles (I think it's also called dynamic tile reloading). The 31x21 tiles buffer I talked before is for VRAM.
_________________
Sh*tty RPG
#176295 - keldon - Thu Jun 16, 2011 2:33 pm
Ok, and for the dynamic tile reloading it is a simple case of keeping a list of available tile names and a key-map from your original tile name to the "allocated" tile name.
I am curious, where exactly did you get 'stuck'? I guess the first obstacle is getting Tonc/Usent to output more than 1024 tile names, but where else would you need assistance after that?
#176300 - Chano Marrano - Fri Jun 17, 2011 5:46 am
Nothing, really. As I said, I just lost interest in it because of lack of time.
Sorry if I make you losing your time. I suppose I should have asked moderators to close this thread two years ago.
_________________
Sh*tty RPG
#176303 - gauauu - Fri Jun 17, 2011 2:57 pm
Chano Marrano wrote: |
Sorry if I make you losing your time. I suppose I should have asked moderators to close this thread two years ago. |
No, it's worth leaving threads open and buried. We need to ask the mods to delete spammer accounts like Yequan that necro these old threads to sell crap.