tepples wrote:Perhaps the hardware you need is a Game Boy Advance, which has a 4x overdraw for sprites and the ability to rewrite OAM mid-frame.
Yeah, but as far as I know nobody's ever said it was impossible to do this on the Game Boy Advance.
This isn't some brilliant and original concept I'm trying to realize and should pick the appropriate platform for. It's specifically an attempt to cram an existing game onto the SNES (which has a much specialer place in my heart than the GBA, not to mention better sound). If I'm allowed to switch platforms, there's no point; I might as well go play the original.
I already know I won't be able to get it pixel-perfect. And I also know that a nerfed version is possible - worst case, I have to abandon both scaled/rotated backgrounds and 100% faithful bullet patterns. The question is how close I can get.
Do you have a screenshot of a comparable game in the same genre? Or should I just say "perfect cherry blossom" and leave it at that?
That's close enough, though I'm dubious about the GSU2 being able to handle that game. Same general idea.
That was a really good guess... was it that obvious?
The attached pics (from Perfect Cherry Blossom, because why not) show a case similar to what I'm worried about - a ton of bullets on screen, a line of enemies pouring in from the side (each side, in this case), and a lot of shots from the player (way more than I'll need to deal with) as well as some powerups (using the term loosely here), all on top of a scaling and rotating background. Don't worry about the snowflakes and cherry petals; the game I'm thinking of doesn't do that sort of thing.
It would be a major challenge to fit all the moving objects into one 4bpp palette and still have them look halfway decent, especially with multiple different-coloured bullets present... but doing just the enemies might be feasible in spots, if I'm really stingy with the colours. The problem with doing the sidebar in sprites is that with a Mode 7 playfield I'd have almost no capability to have
anything in it that wasn't part of either the blitted surface or the Mode 7 BG itself. Even if I were to use a constant colour for the overlay, which could be done with windowing, the HUD data would eat into the available sprite tile count.
Bregalad wrote:Oh, so you mean there's going to be more than 128 bullets on screen at the same time ?!
Even if that's the case, how's the CPU going to handle them ?
It's not. I'm hoping to have enough horsepower left over on the GSU2 to run the bullet engine and do collision checks. That way the S-CPU only has to run the rest of the game, which isn't especially demanding.
If you require the Super-FX chip I definitely can't test it, as the Super Power Pak only supports no chip or the DSP-1.
The final game would require a GSU, but a test ROM addressing the thread topic would not.
I'm not going to ask you to become a remotely-operated dev kit for a game. Among other issues, the logistics of that would be ridiculous. I'm hoping the sd2snes supports what I need by the time this project enters full-scale development (by which point I should have the spare cash to buy one); if not, I may have to take apart a copy of Doom or something...
You can't have mode 7 and another BG, period. However, you could simulate mode-7 effets without using mdoe 7 at all. Especially if you have a Super-FX chip.
If the Super FX were tasked with rendering the background too, the only way to get 30fps with this size of playfield would be to use 2bpp for both layers, which would look awful, and even then I doubt you'd have enough power to scale and rotate an entire layer that fast. For the same colour depth Mode 7 + sprites gives you (8bpp + 4bpp), the ceiling drops to 10fps.
Just blitting the bullets at 30fps takes up the bulk of the power available even at 21MHz. I'm still not sure it's even possible, but the way the GSU handles pixel plotting is rather nice and I may have a trick up my sleeve...
Sik wrote:I would imagine that even if this worked, if mode 7 was on the right side of the screen (or just anywhere that's not the leftmost side) it's very likely that the deformation computations would be completely wrong since they weren't started at the left side of the screen. Or does the hardware compute it regardless of which mode is currently being displayed?
I would imagine this could screw up other modes as well in similar ways (e.g. tiles not being fetched correctly at the transition area, scrolling being broken, etc. - depends on how the hardware implements this).
Possible, and I'm (kinda) prepared to be disappointed in this. But as Bregalad once said, "we're not going to re-invent the SNES PPU and this should be tested."
psycopathicteen wrote:It depends on how big the "mode-7" layer is, if it is scaling, rotation or both, and if it's a full 360 degree rotation, or just tilting. If it's small sprites, it could pre-rotate sprite frames in wram while the game is running, so it can smoothly rotate several sprites by the time they appear onscreen. Same for scaling, but both at the same time would eat up a lot of wram. If it is a larger object, that is 128x128 or 256x256, it can be smoothly tilted back and forth using MODE-2 offset-per-tile mode, and HDMA line-scrolling. You can use tilting to transition between large rotation steps, to make a full 360 degree.
I suppose I could look into that; it seems you've been doing some good work in that area...
There are parts where a large background consisting of almost entirely unique tiles (it pretty much fills up Mode 7's memory map) is scaled to fill the playfield and doing 360° rotation. There are also parts where the background is doing F-Zero-style perspective (or maybe even Pilotwings-style), though with fewer unique tiles. There's even a part where I was considering abusing HDMA to make Mode 7 look like polygon graphics with a minimum of CPU rendering involved...
I think that with tricks like those you describe, the sections with intricate rotating backgrounds would take too much memory unless they were redrawn to use vastly fewer tiles. DMA is pegged in the general case because of the bullet layer, so everything has to fit in VRAM.
Bregalad wrote:I can't help but think that the simplest is to make 2 bullet in a single sprite. Then it'll be complicated to draw them of course, but at least you'll use only sprites.
With 8x8 sprites, you can have 64 sprites for showing 2 bullets in the same tile with all possibilities, assuming they're just a 1-pixel dot.
That might work for an original game, but unfortunately these bullets are not just 1-pixel dots. (I'd have no doubt about being able to draw them with the GSU if they were...) Scaled to SNES resolution, they range from 4x4 to 32x32, with the bulk of them being 8x8. Also, your method limits you to 256 bullets onscreen if nothing else is happening
and each one is next to at least one other, which is still too few.
Plus it doesn't do lasers. Did I mention there were lasers?
psycopathicteen wrote:I have another idea. Use a 2bpp layer for bullet sprites, and have software sprites using 2 palettes, and use the 8 hardware palettes as gradients from one palette to the other, to create a glowing effect, when two sprites of different palettes are in the same tile.
...buh?
Okay, I think I get it.
I'm a bit dubious; I think that there are bullets in this game that would suffer quite a bit with a colour limit that tight, especially some of the big ones that span multiple tiles. And while this scheme looks like it would enable 60fps without the drastic NESification of a monolithic 2bpp layer, I'm not sure the GSU could keep up... But it's something to keep in mind.