Mode 7 rotation and masking sprites for landmarks
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: New SNES game in development: Furry RPG (working title)
Might I suggest having it to where the scenery on the Mode 7 map is made is facing straight down? I honestly had no clue as to what I was looking at originally.
Re: New SNES game in development: Furry RPG (working title)
It's a style choice, really... Having ALL scenery face a static direction when the map is rotated might be absurd but just keeping major landmarks facing down shouldn't be hard at all to do using sprites at a calculated position. Thing is, I'm not sure if you'd want to do that.Espozo wrote:Might I suggest having it to where the scenery on the Mode 7 map is made is facing straight down? I honestly had no clue as to what I was looking at originally.
If you do use sprites you'd need to scale them with distance, which should only be a minor pain but might not look very good and I'd think it would glaringly stick out as separate from the map. On rotation it WOULD fix one major problem of perspective - if you spin the camera around that tower for example you can watch it expand and contract in height. But, personally, I think it's probably going to look pretty awful to have such objects rotate themselves relative to the map to stay facing you.
Trying to go full-out on the sprite method seems really, really painful though if it's even possible: Have sprites for each increment of rotation around the object, then versions of that set for each draw distance, and place appropriately. That already sounds like it's threatening to run you out of VRAM room for just one object; though I suppose you probably have lots of free processor time to DMA a new tileset to VRAM as you move toward/away from it.
My memory isn't clear enough to recall how various successful Mode 7 games handled that particular problem. I think some of them just never rotated the map at all?
In any case, good progress!
Re: New SNES game in development: Furry RPG (working title)
It's certainly doable, seeing as I did it in real time on the NES.Khaz wrote:If you do use sprites you'd need to scale them with distance, which should only be a minor pain
F-Zero and Super Mario Kart had separate sprite cels at different sizes and rotations, which got copied into VRAM as needed. Things didn't change smoothly from one size to the next; instead, they suddenly grew larger or smaller, but players didn't care. Still, it wouldn't be hard to go from this to Neo Geo-class scaling that my aforementioned NES demo does.My memory isn't clear enough to recall how various successful Mode 7 games handled that particular problem. I think some of them just never rotated the map at all?
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: New SNES game in development: Furry RPG (working title)
This is kind of random, but one thing I've always thought of is if people made a mipmap for sprite scaling on something like the Neo Geo, so an object that was scalled down to half its original size would only affect the sprite pixel limit half as much.
Re: New SNES game in development: Furry RPG (working title)
The way F-Zero and SMK work is already halfway to mipmaps.
Re: New SNES game in development: Furry RPG (working title)
Have a look at FF6's airship scenes ...Khaz wrote:My memory isn't clear enough to recall how various successful Mode 7 games handled that particular problem.
Last edited by Ramsis on Sat Jun 13, 2015 1:22 am, edited 1 time in total.
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: New SNES game in development: Furry RPG (working title)
There's zero real time scaling being done though, and the transitions look really jumpy. Would it have been impossible to scale 8 32x32 racers down to 16x16 in one frame? Is shrinking any slower or faster depending on how much you are scaling? It would still help reduce overdraw, unless you somehow have it to where it doesn't put the empty times on screen.tepples wrote:The way F-Zero and SMK work is already halfway to mipmaps.
Re: New SNES game in development: Furry RPG (working title)
Better question: how much spare memory is in work RAM? Because if there's enough RAM maybe some prescaled graphics could be cached.
Re: New SNES game in development: Furry RPG (working title)
It's slower or faster depending on the size of the sprite being scaled. For example, a 32x32 will take four times as long as a 16x16. But the NES can scale a 32x48 in four frames, and if I remember correctly, my demo is limited more by the NES's anemic CPU-to-PPU bandwidth and work RAM capacity than by CPU time. But I agree that even scaling other vehicles at 15 fps would be an improvement in visual smoothness.Espozo wrote:Is shrinking any slower or faster depending on how much you are scaling?
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: New SNES game in development: Furry RPG (working title)
Now that I think about it, why didn't they just use software scaling in the first place? they would have saved memory, and it would have looked nicer. I'd have thought that they would still have enough CPU time for game logic, and if they would use mip mapping, they could still save a little extra CPU time, but you would of course need to store the smaller frames, but it would just be a 32x32, a 16x16, and a 8x8 instead of all they have. It's highly unlikely that all players will be the same distance from the camera. I guess I'd try to have as little frames as possible, but if I'd run into slowdown, I'd add just enough frames to avoid slowdown.
Re: New SNES game in development: Furry RPG (working title)
Can't think of many games that actually used more than one sprite in mode 7...and the thing with the player's sprite is that it has minimal rotations and no scaling necessary- slightly right, slightly left. (If you want to see how hilarious this can look taken to extremes, here. (Admittedly not mode-7)Khaz wrote:My memory isn't clear enough to recall how various successful Mode 7 games handled that particular problem. I think some of them just never rotated the map at all?
FF4:
FF6: Rotated the map. No sprites but the player('s vehicle).
Secret of Mana: Rotated the map. No sprites but the player's vehicle (and another flying thing). If the compass directions were sprites, well, they were just horizon-points anyway, no rotation nor scaling necessary.
Secret of Evermore: Rotated the map. No sprites but the player('s vehicle).
Terranigma: Didn't rotate the map, iirc. No sprites but the player('s vehicle).
Demon's Crest: Rotated the map, but only used a nonplayer sprite on the overworld in a cutscene where it didn't rotate.
7th Saga/Elnard: Rotated map. No sprites but the player('s vehicle)...on the overworld, but used rotation of the ground + mode 7 for battle (which was super-cool, back in the day). Sprites of player/foes did not have rotation nor scaling, though.
Pilotwings...didn't really have other sprites that needed/cared about rotation. Not sure how projectiles/ring/bar particles were scaled.
TMNT 4 basically ignored rotation for everyone, iirc, except when transitioning to side-scrolling for the boss of the Mode-7 stage (Neon Night-riders).
[etc.]
Now, Super Star Wars (and the other two Super Star Wars games) used Mode 7 flight-combat segments...but I'm not terribly familiar with them.
-
KungFuFurby
- Posts: 264
- Joined: Wed Jul 09, 2008 8:46 pm
Re: New SNES game in development: Furry RPG (working title)
I think Maka Maka has a Mode 7 world map... at least from what little of the game I played.
Re: New SNES game in development: Furry RPG (working title)
Wouldn't racing games be the prime example of mode 7 with non-player sprites?
Re: New SNES game in development: Furry RPG (working title)
Tepples already mentioned F-zero and its multiplayer clone Super Mario Kart; I'm not familiar with others. (The list at https://en.wikipedia.org/wiki/Mode_7#Use is incomplete.)
...though that does jog my memory: wasn't Hyper Zone a Mode-7 game? Don't believe it allowed map rotation, though.
...though that does jog my memory: wasn't Hyper Zone a Mode-7 game? Don't believe it allowed map rotation, though.
Re: New SNES game in development: Furry RPG (working title)
Hyperzone is a behind-the-player rail shooter, along similar lines to Space Harrier, Tetrastar: The Fighter, Cosmic Epsilon, Eliminator, and the later Star Fox/Starwing. It uses mode 7 for the floor and ceiling, with no rotation. It was developed by HAL, and it shares several level names with HAL's Kirby's Dream Land games.
The racing game Cameltry/On the Ball, a spiritual predecessor of Super Monkey Ball, uses mode 7, but the player and indicators are the only sprites in the playfield. The rest of the sprites are random scenery placed behind the background.
The racing game Cameltry/On the Ball, a spiritual predecessor of Super Monkey Ball, uses mode 7, but the player and indicators are the only sprites in the playfield. The rest of the sprites are random scenery placed behind the background.