Is rotation possible on nes?
Moderator: Moderators
Is rotation possible on nes?
I saw a video of this game boy game: https://www.youtube.com/watch?v=AyjU4MtonZM
At 0:46 I think they rotate a sprite (or they have every possible sprite)?
Is it possibile to do so on nes?
At 0:46 I think they rotate a sprite (or they have every possible sprite)?
Is it possibile to do so on nes?
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is rotation possible on nes?
Battletoads' intro "software renders" the flying spaceship into CHR-RAM with a scaling operation. (Check the CHR pattern pages in a debugger to watch it in action.)
A rotation would be similarly feasible. (Could probably scale at the same time as rotating too without extra complexity.)
A rotation would be similarly feasible. (Could probably scale at the same time as rotating too without extra complexity.)
Re: Is rotation possible on nes?
True sprite rotation is very slow without a coprocessor. In some cases, a small amount of rotation can be faked with shearing. But usually, pre-defined rotations are stored in the ROM.
Scaling without rotation is faster because it can be done with lookup tables.
Scaling without rotation is faster because it can be done with lookup tables.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is rotation possible on nes?
Hmm, doing a quick estimate, I think a naive fixed point 32x32 rasterizing could probably be done at 30fps?tepples wrote:True sprite rotation is very slow without a coprocessor.
You could keep up with a vblank bandwidth of 128 bytes per frame, I believe.
Re: Is rotation possible on nes?
What is shown in this video is wireframe graphics. This is perfectly on a NES. Elite is a game released only with those. I did a demos myself using that, and so did other nesdev people.MartsINY wrote:I saw a video of this game boy game: https://www.youtube.com/watch?v=AyjU4MtonZM
At 0:46 I think they rotate a sprite (or they have every possible sprite)?
Is it possibile to do so on nes?
My demo does not look really 3D, but I have another one on my hard disk with pre-calcluated 3D shapes and it works and looks impressive. I wanted to save it for a real game so I didn't publish this but since I don't know if I'll ever release a real game...
Another approach to rotating sprites is simply to pre-render it. Usually pre-rendering is the key of success when it comes to this stuff :p
Re: Is rotation possible on nes?
It's 1000 times easier to bake rotation into sprites than it is to generate them on the fly.
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Re: Is rotation possible on nes?
Say you are using a mapper with 16kB of memory per bank. In that bank you can store a 256x64 8-bit bitmap image. Have all the rotatable sprites located in the middle of that 256x64 bitmap, with extra space between them. Then you can calculate the ROM address for each pixel by having X location as the low byte, and Y location as the high byte. Then fetch the pixels and convert them to planar format.
Re: Is rotation possible on nes?
A 64x64 pixel 2bpp graphic is 1 KiB. A 256x64 pixel 8bpp graphic is 16 KiB. If you'll be wasting 94% of each bank on 8bpp sprites with huge blank spaces between them, you might as well just use the space for 16 pre-baked rotations that you can scale using a shrinking LUT.
Re: Is rotation possible on nes?
Little Samson's character select screen have the selected character rotating.
I think it's a prerendered rotation, not made on the fly.
But it's a nice effect!!
I think it's a prerendered rotation, not made on the fly.
But it's a nice effect!!
Re: Is rotation possible on nes?
Heh yeah it's nice but I don't think the topic is about that kind of rotation. That's just normal animation.
Re: Is rotation possible on nes?
You'd need 3D models to do Little Samson's rotation in real time...
Re: Is rotation possible on nes?
Pretty sure all of Little Samson is prerendered
Re: Is rotation possible on nes?
The effect seen in Super Spy Hunter is shearing, the overhead counterpart to how Pole Position and Rad Racer draw their roads.
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Re: Is rotation possible on nes?
You can composite 4 sprites into the 8bpp bitmap, and even rotate all 4 at once that way.tepples wrote:A 64x64 pixel 2bpp graphic is 1 KiB. A 256x64 pixel 8bpp graphic is 16 KiB. If you'll be wasting 94% of each bank on 8bpp sprites with huge blank spaces between them, you might as well just use the space for 16 pre-baked rotations that you can scale using a shrinking LUT.