It is currently Sun Dec 10, 2017 8:47 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: Tue Feb 07, 2006 10:16 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
Please calm down.
What you need is map compression, not meatile format reduction. In the opposite way, the best way your metatiles are made, the more tiles you'll save.
I think you have to first worry about how to make a working map engine before worring about the copression.
For the world map, I have an idea of how to store a very-large map, while being compressed.
If will work like a lot of maps large of at least 16x15 metatiles (so the size of a NES' nametable, you could do larger if you want (like 16x16 to simplificate calculations)). Then, while scrolling, you'll have room in SRAM to store 4 different small maps at the same time. Then when scrolling, the programm will fastly switch the map in SRAM to scroll it when needed. So each maps can be compressed, and you don't need RAM for all your world map at the same time.
The problem is that your maps have to be internally loaded dynamicly, so this couldn't show a huge frezee as the player walks on the world maps at certains scroll lines. I think it should decompressiong from ROM to RAM should be done in less than 1 frame (or if needed a bit more than 1 single frame).
For all other maps of any RPG, I doubt they would overflow the size of 32x32 metatiles (so the size of 4 world maps parts). If they do, have a larger memory buffer in SRAM.

About FFVII, you should programm the menu first I think, because it is a bit less tricky (while not being ideally much easier), and more game-specific. That will also force you to structure how to tidy items, materia, stats, etc... in memory.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 10:50 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
This is why a level coding scheme that allows random access to any rows or columns is good. However, the ammount of compression you can gain from such schemes is limited, and they result in maps with a certain ammount of repetition, not the case for RPG's.

To be able to scroll freely, 4 screens must be loaded at all times. But everytime the camera crosses a screen boundary, horizontal or vertical, you have to load 2 new screens. A decompression routine that will output 240 or 256 metatiles/bytes per screen can eat a lot of time. Fortunately, RPG's do not scroll very fast, and a little delay might just go unnoticed.

So, in the case of an RPG I'd go with the compression option. Maybe you can have each screen compressed independantly, and have an array of pointers, pointing to the place in memory where each screen starts, so you know where to decode each one from.

But I'd agree with Bregalad. Try making your engine first, using an already decompressed map in WRAM. Do not worry about loading/unloading and compressing/decompressing screens yet. Just move the character around 4 screens directly placed in WRAM. When the engine works, figure out the storage and handling of the screens.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 12:13 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
tokumaru wrote:
So, in the case of an RPG I'd go with the compression option. Maybe you can have each screen compressed independantly, and have an array of pointers, pointing to the place in memory where each screen starts, so you know where to decode each one from.

That is what I had in mind. So this fixes the problem of compression and or RAM usage, scince you only have 4 screens at the same time.
The real problem would be when you need to load 2 of them in memory. Yeah, a little delay may be unnoticed, but this shouldn't eat too much time.
Else, you could do the decompression in a sequence of different steps every frame, during a particular metatile is scrolling.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 1:36 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Bregalad wrote:
Else, you could do the decompression in a sequence of different steps every frame, during a particular metatile is scrolling.

That is not possible if you scroll in both directions. If scrolling was more limited, you could design the compression scheme so that data could be decompressed in a sequential way, relative to the scrolling direction, as part of the screen beeing decompressed will already be visible. But since you can approach a screen from any direction, that does not seem possible.

Unless more than 4 screens are loaded at a time. Maybe 16, arranged like a square. That way, as soon as the camera leaves one of the screens, the one that's 2 positions ahead begins to be rendered. I believe that having 16 loaded screens is the only way to perform progressive decompression of the screens. But that's just not practical... you'd need 4kb of memory for that and... well, it's just not practical.

EDIT: This post is pure crap. I don't know what I was thinking. Just ignore it.


Last edited by tokumaru on Wed Feb 08, 2006 10:40 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 2:03 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
Sorry I didn't folllow you.
On a side note, being too slow when loading can cause problems for example if you are scrolling like on an airship in FF1, 4 pixels at time.

Maybe you didn't mean sequencial like I meant. I think scince you have a buffer of 8 pixels, so 8 frames when scrolling 1 pixel at time, you can load a map in parallel with the programm that just scroll. Just save the pointers during decompression, and restore them the next frame. I see nothing impossible here.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 4:20 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Yeah, if you do it like you say it can work. You get that 8-pixel buffer by hiding the leftmost 8 pixels, right... As for scrolling vertically, your buffer is whatever the TV cuts off, certainly more than 8 pixels.

It's just that even when I try to think "RPG" I end up thinking "platform", wich is what I think about all the time, and they scroll tipically faster than RPG's. You are right, at low speeds like 1 or 2 pixels per frame an 8-pixel buffer is enough to decode 2 screens in separate "sessions".


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 9:51 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
The left border that can be clipped and the top/botttom 8 pixels of the screen aren't software buffers but hardware buffers, allowing you to scroll witout having gabrage in border.
However, on PAL TVs, the vertical 8 pixels buffer isn't valid.

But that isn't the problem here, I mean the 16 pixels that are from a metatile to another as a buffer, since you will load your data when scrolling to the last meatile of the last map, isn't it ?

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject: what is the "clipping"
PostPosted: Wed Feb 08, 2006 10:15 am 
i read nes documents.. what is the "clipping"???


Top
  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 10:39 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Bregalad wrote:
But that isn't the problem here, I mean the 16 pixels that are from a metatile to another as a buffer, since you will load your data when scrolling to the last meatile of the last map, isn't it ?

Man, I'm just stupid. I just realised how dumb I've been the last few posts. You're absolutelly right. I've been thinking so much lately that my brain is just not working very well...

You know what I was thinking? since you'd decompress the new screen as the last metatile started to scroll in, that would mean that such metatile would still be visible at the other side, and overwriting it would cause glitches. But that's just wrong, you'd just be decompressing to RAM, the RAM map would be overwritten, not anything graphical. Well, don't mind me, I was just beeing stupid these last few days.

Yeah, if you decode the new screens as the last metatile of the current ones begin to scroll in you have quite some time to do the decompression. It may get a little complicated if the player decides to go back halfway through the decompression though. But then again, as this is an RPG you can simply force the player to move full metatiles at a time and the problem is gone.

I'll just think better before I post stupid crap about loading 16 screens at a time.

lord wrote:
what is the "clipping"???

You have the option to hide the leftmost 8-pixel column of the screen, not showing any sprites or background. That space is filled with color 0 if you do so. It is mostly used to hide glitches caused by scrolling horizontally using horizontal mirroring. Some glitches usually still show, though.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 10:47 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
Since sprites cannot have negative HPos, it would disapear sudently on the left of the screen, so the leftmost 8 pixels clipping fixes this (sprites positions 0-8 act as negative).

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 06, 2006 2:57 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2142
Location: Minneapolis, Minnesota, United States
I'm really sorry to bring up this really really old thread, but I need to figure something out, and it's about Final Fantasy's maps, so might as well not start another thread...

I can't think of a way to:

A. Arrange a 16x16 screen 2x2 metatile map in a 1 dimensional array.
or
B. Compress data


I think this is really difficult, because there's so much data, and it has to be in a 1 dimensional array, and I have to worry about how much space I'm taking up. I really don't think I can afford to have the world map of a Final Fantasy game take up 64k of PRG! That's rediculous. If I can compress it well, then it'd be good. Any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 06, 2006 3:44 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Weren't you working on an implementation of RLE for this? RLE should work very well for this kind of map, where there is a lot of grass and such.

I'm not much of a FF fan, so I don't know exactly how the maps are, but usually, in RPG's, there's are a lot of repeated patterns, such as trees, houses, mountains, bushes, etc, so you could pull a SMB here and have your maps object-based, instead of (meta)tile based. Like, if you have the object "house" defined somewhere in your ROM, you could define a house anywhere in a screen with only 2 bytes (one to identify the house and another one to define it's position within the screen with metatile precision), and that's pretty compact for me.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 8:25 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
About 50% of an average RPG map would be just water tiles, so RLE will be really efficient for this.
If this is not enough, just pick any existing compression format and try it.
Quote:
I'm not much of a FF fan

How crazy...

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 07, 2006 9:02 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Bregalad wrote:
Quote:
I'm not much of a FF fan

How crazy...

Hehe! Well, I do like one of them, Final Fantasy VIII for the PSX, the only one I could play for more than 10 minutes.

I usually don't like RPG's (specially from the 8 and 16-bit era) because of the crazy ammount of pointless fighting to increase your stats. The fights are too damn repetitive, I can't stand that (I absolutely hate the random enemies that are everywhere, you can't walk!). It feels like freaking Teletubbies to me, waaaaaaaay too repetitive.

I like the rest of the mood in these games, it's just the insane ammount of boring fighting that pisses me off. I'm not saying RPG's are bad, I know for a fact that some are very good, but for me, repetitive fighting is not fun, so I don't play them. I like action RPG's (is that what they're called?), where there is no fighting engine and everything happens in place.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 2:28 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7312
Location: Chexbres, VD, Switzerland
RPGs is probably the genre that has the less changed from 8-16 bit aera and today. The genre isn't really much affected by 3D graphics and more powerfull systems, it is just perfected (in my opinion), while most other genre are ruined by 3D today (platformers.... Just play a recent Megaman X game and see what I mean)

Quote:
I absolutely hate the random enemies that are everywhere, you can't walk

What about RPGs like Crono Trigger, Final Fantasy Mystic Quest, Romancing Saga or Live a Live where battles aren't random ?
Quote:
Hehe! Well, I do like one of them, Final Fantasy VIII for the PSX, the only one I could play for more than 10 minutes.

In my opinion Final Fantasy VIII is the only one in the series wich doesn't absolutely rock, but also it is the only one wich is really annoying, wich its heavy G-Force cutscenes and annyoing messed up battle system.
I can undertand one doesn't like too "hardcore" RPGs like Dragon Quest, but Final Fantasy is so much innovative and perfected at each entries of the series...
If you don't love FF9 nor FF10 you're definitely crazy.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group