Is it possible to 'scale' sprites?

SGDK only sub forum

Moderator: Stef

ehaliewicz
Very interested
Posts: 50
Joined: Tue Dec 24, 2013 1:00 am

Re: Is it possible to 'scale' sprites?

Post by ehaliewicz » Tue Feb 09, 2016 8:52 pm

Manveru wrote:f the console sprites did not save 2 colors per byte, it will be a lot faster.
Agreed. I converted to bytes before rotating, which definitely incurs a large performance hit, but manipulating nibbles probably wouldn't have astounding performance either.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Is it possible to 'scale' sprites?

Post by Stef » Tue Feb 09, 2016 10:01 pm

alko wrote:
How do you think those games did the scaling?
likely, at the race level using same principle of first-person-like level.
namely, ray casting (and mirror top\bottom of objects).

Image

Image
Oh neat ! i did known the raycasting was using V flip for only half screen rendering (ceiling and floor are rendered differently) but i never noticed they used the same engine for the raster race level, actually it's quite impressive, the road is nicely done as well (with tires traces).

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Re: Is it possible to 'scale' sprites?

Post by POLYGAMe » Wed Feb 10, 2016 8:55 am

There are houses and stuff that scale too and they're not mirrored... I think you're right though. It's very cool. Shame it was the only fun level in the game. lol.

EDIT: Just checked it. It's the trucks that aren't mirrored. Everything else seems to be. Trucks could be too with wheels overlaid or something...

Manveru
Very interested
Posts: 85
Joined: Wed Sep 05, 2012 3:30 pm

Re: Is it possible to 'scale' sprites?

Post by Manveru » Wed Feb 10, 2016 9:20 am

ehaliewicz wrote:
Manveru wrote:f the console sprites did not save 2 colors per byte, it will be a lot faster.
Agreed. I converted to bytes before rotating, which definitely incurs a large performance hit, but manipulating nibbles probably wouldn't have astounding performance either.
You can convert to bytes just one time to ram at the beginnig, or you can save the byte buffer in rom. The problem is to re-join the two nibbles to a byte after the rotation, having it ready to be sent to VDP.

One possible solution is using "pixels" of 2x1 or 2x2 pixels size, something like Amiga mode 0.
The man who moves a mountain begins by carrying away small stones. Confucius, 551-479 BC

alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: Is it possible to 'scale' sprites?

Post by alko » Wed Feb 10, 2016 11:27 am

how about this scaling?
https://youtu.be/zpGdWYwDNkk?t=2209

scale too quickly.
Maybe head of Lawnmower Man is not a sprite. This is a raster effect on plane ?
how to do it?
Image

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Re: Is it possible to 'scale' sprites?

Post by POLYGAMe » Wed Feb 10, 2016 5:41 pm

I tweeted Jon Burton who coded it and he said:

"very trick code for sure. Involving mirrored screens, palette swaps and massive code tables..."

Sounds like a raycasting engine, eh?

matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

Re: Is it possible to 'scale' sprites?

Post by matteus » Wed Feb 10, 2016 11:26 pm

Jon Burton is quoted as saying this in an interview that interests me :)
The title was released for Mega Drive and SNES in late 1994, with an expanded version released for the Mega CD shortly after. Burton comments that the CD format offered the company the chance to push their games further. “We loved technology and trying to achieve things on the hardware that no-one else could. On the Mega Drive we had full screen rotation and scaling, particle systems, 2D physics, 4096 colour displays, and a full screen Wolfenstein engine at 30fps. The Mega CD gave us more hardware to play with and we had one of the most advanced video play back engines of the time. Eurocom even licensed it from us for Mortal Kombat.”

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Re: Is it possible to 'scale' sprites?

Post by POLYGAMe » Thu Feb 11, 2016 5:49 am

Well he certainly backs himself! Haha

alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: Is it possible to 'scale' sprites?

Post by alko » Fri Feb 12, 2016 7:41 am

Could share code of sprite-scaling from gasega's wolfenstein3d ?
Image

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Re: Is it possible to 'scale' sprites?

Post by POLYGAMe » Fri Feb 12, 2016 9:19 pm

alko wrote:Could share code of sprite-scaling from gasega's wolfenstein3d ?
Wouldn't be much use to me as it would all be assembly, wouldn't it?

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Is it possible to 'scale' sprites?

Post by Sik » Sun Feb 21, 2016 4:37 pm

alko wrote:how about this scaling?
https://youtu.be/zpGdWYwDNkk?t=2209

scale too quickly.
Maybe head of Lawnmower Man is not a sprite. This is a raster effect on plane ?
how to do it?
Yeah it's one of the scroll planes, and mirrored horizontally at that.
Sik is pronounced as "seek", not as "sick".

Post Reply