(1) In this thread ( viewtopic.php?f=2&t=12831 ), tokumaru said:
I don't understand what "adding 157 and reversing the bits" means. If I understand correctly, 157 is the bias, which is added to the subpixel velocity, and if the result exceeds 256, then the pixel position is incremented. I don't understand when the reversing is done.
(2) In an rpg like Dragon Warrior or Final Fantasy, or any game that has tile-based movement, how is movement between tiles made smooth? (If anybody remembers the game "Chip's Challenge", it's a tile-based puzzle game that doesn't have transitions between tiles at all. I don't wish to copy it's jerky movement.)
(3) Again, in an rpg like Dragon Warrior or Final Fantasy (and all their sequels), (a) how is a map stored? (b) How would it *ideally* be stored? I assume you have one grid (an array of arrays) of tiles (grass, forest, desert, water, etc), but what about chests? Are they stored in the same grid? or a different grid? or an array? How do you store whether they've been looted or not? What about people that wander around? Are they in an array or a grid? If they're in an array, that'd mean you'd have to iterate the array when you press A to try to talk to whoever's in front of you (to find the one with the right location), but if they're in a grid, that'd mean you'd have to test each tile if it has a person so you can make them wander. I suppose the first sounds like the lesser of two evils.
Quote:
I just tested in my crappy JavaScript implementation and guess what resulted in the smoothest movement? Adding 157 AND reversing the bits. That's with a velocity of 0.25, at least.
I don't understand what "adding 157 and reversing the bits" means. If I understand correctly, 157 is the bias, which is added to the subpixel velocity, and if the result exceeds 256, then the pixel position is incremented. I don't understand when the reversing is done.
(2) In an rpg like Dragon Warrior or Final Fantasy, or any game that has tile-based movement, how is movement between tiles made smooth? (If anybody remembers the game "Chip's Challenge", it's a tile-based puzzle game that doesn't have transitions between tiles at all. I don't wish to copy it's jerky movement.)
(3) Again, in an rpg like Dragon Warrior or Final Fantasy (and all their sequels), (a) how is a map stored? (b) How would it *ideally* be stored? I assume you have one grid (an array of arrays) of tiles (grass, forest, desert, water, etc), but what about chests? Are they stored in the same grid? or a different grid? or an array? How do you store whether they've been looted or not? What about people that wander around? Are they in an array or a grid? If they're in an array, that'd mean you'd have to iterate the array when you press A to try to talk to whoever's in front of you (to find the one with the right location), but if they're in a grid, that'd mean you'd have to test each tile if it has a person so you can make them wander. I suppose the first sounds like the lesser of two evils.