08 April 2019, 14:59 | #1 |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
SNES SF2 Dual PF Demo
Okay, so here is another AGA Street Fighter 2 tech demo. Originally I didn't plan to release this until it was "ready", meaning that there would be some real gameplay. But as usual, I ran out of motivation, and so the project has been sitting on my hard drive since 2017. And because in all likehood I'll never continue it, I thought that I might as well post it here, because people are once again talking about how to properly convert SF2 to Amiga, and at least this demo theoretically demostrates that one could do SF2 in AGA at 50 FPS, with background anims and parallax layers.
ADF with Blitz source code is in the attachment of this post. So, system requirement is basic A1200 with 2 MB of Chip RAM. You can scroll the screen with the joystick. All graphics are from the SNES version of Super SF2, because the size of the SNES characters are perfect for the AGA sprites. Technical info: - 64 pixel wide AGA sprites for the characters, so 4 characters can be drawn without any slowdown. - 3 parallax layers. - Game runs in 16+16 color dual playfield background, so this way we get two parallax layers. - Third parallax layer is created using copper effects (sky and sea) and blitted objects to the back playfield (the mountain and the island in the horizon) . - Characters are 100% sprites, so Blitter is 100% dedicated into drawing background animations only. All background anims are "Blocks" with no transparency, and they are drawn to pixel positions that are multiples of 16. This makes them super fast to draw. And the lack of transparency doesn't matter, because the Back Playfield always "shines through" the color 0 pixels of the Front PF. So this way we get free transparency. Also every Block draw automatically "clears" the block that was drawn to that spot previously, so there is no need for "background restore" or anything like that. And finally some coppers were added to the Front playfield: the light greens of the stone ground are copper generated, and so are some of the palm tree colors on the top. And all of this still easily runs at 50 FPS on a standard A1200. About half of the frame time still remains. --- Also here are some character recolors that I did for the SNES Super SF2: In the SNES version every character has an unique 16 color palette, which add up to 212 colors for all characters. But I managed to convert them all to a single 16 color palette, without any noticeable quality loss. So in theory, a very nice looking AGA conversion could be done, which would be graphically almost identical to the SNES version, if not even better, and it would run at 50 FPS. And memory wise too this is possible, all frames in both directions for two characters take about 1,2 Megs, so it's just an issue of fitting rest of the stuff into 800 kb, which should be totally possible. --- However, like I have said before, a project like this is a massive undertaking, and it is unlikely that a full conversion will ever be done. Only a small one level demo with some of the moves and some kind of simple AI opponent is realistically possible. But even something simple like this will take lots of time to accomplish. Graphical demos like this are realtively fast and fun to make, but when it comes to actual game coding, things suddenly get slow, hard and boring. This is also why I decided to release this demo; I got bored in programming actual gameplay, and was left with a useless Graphics demo. And back then I thought that later I would continue it, but clearly that isn't going to happen. So here it is, at least the concept is interesting, and hopefully the stuff in the source code is useful for someone. As always, you can freely use the code in your own projects, or even continue this project, if you want. |
08 April 2019, 15:23 | #2 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 4,886
|
Characters are dancing in the sky here but the visual result is amazing ! Even the movements are smooth.
Nice BB2 tech demo |
08 April 2019, 15:33 | #3 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,411
|
That's pretty good. Nice to see some AGA DPF love
|
08 April 2019, 18:30 | #4 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Really nice work!
The only thing about the palette is that you actually need two palettes per character, so you can have two players and distinguish them. |
08 April 2019, 19:17 | #5 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,774
|
Quote:
I guess that is the reason there are still so many Amiga demo coders around, and not that many game coders... |
|
09 April 2019, 12:05 | #6 | |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
So an easy way to solve this problem is not to allow the same character for both players. But also it is possible to switch character colors with a Blitz "Remap" command, and this way there can be two versions of the same character in memory, both having the same palette, but with different color usage. So for example if both players choose Ryu, one can have a blue outfit and the other one can be red. |
|
09 April 2019, 17:10 | #7 |
Moon 1969 = amiga 1985
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
|
you did a really good job with the colours.
|
10 April 2019, 17:00 | #8 |
Banned
Join Date: May 2018
Location: Toronto
Posts: 158
|
I think is often underestimated how much it takes to actually run a game behind something looking like this, especially Street fighter 2 turbo.
Like those Sonic demos that are not actually a game. Now turn it into a full game and tell me to shut up and I will be happy ;-) |
11 April 2019, 06:42 | #9 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
youtube video??
Congratulations. When you do a sprite sheet? Do you do 16x16 all the way down and link the sprites with a table or do you draw the complete sprite. (i.e a kick would be 64 pixels wide??). If AGA Dualpf is 16 colours on each playfield, what colour pens do the sprite colours use are they COLOUR32->COLOUR48. Downloading now. Great work. |
11 April 2019, 08:19 | #10 |
Registered User
Join Date: Sep 2004
Location: Poland
Posts: 1,302
|
@Master484
Is not possible to have different colorsets on AGA? It could be in this case individual 16 colour palette for every fighter. It not look bad now, but colors are washed out and inaccurate. To be exact, there is possibility to have different palette for even and odd sprites. While there are only 2 objects (and only sometimes projectiles), You can have individual 16c palette (or even two as in original game, for mirror matches) for every fighter. Edit: I'm almost sure that SNES version have similar trick and every fighter have about 16 different colors. In this case AGA version should look almost identical. I don't understand why you want 16 colours fixed palette for everything like in OCS/ECS... Last edited by Solo Kazuki; 11 April 2019 at 08:54. |
11 April 2019, 09:53 | #11 | |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,347
|
Quote:
I do think that the palette could be stretched a little however, if certain pens were allocated on the fly for different characters. for example, have 9 pens common to all fighters, and the remaining 6 pens split as 3 fighter-specific colours each. This would increase the palette across the range of fighters. |
|
11 April 2019, 11:04 | #12 |
Registered User
Join Date: Sep 2004
Location: Poland
Posts: 1,302
|
So how it could be done in Super Street Fighter II Turbo?
http://hol.abime.net/2215/screenshot [ Show youtube player ] [ Show youtube player ] [ Show youtube player ] [ Show youtube player ] [ Show youtube player ] I don't know how they do this, but game for sure have different palettes for fighters, at least some colours. And mind that You have six different colour sets of every fighter! Last edited by Solo Kazuki; 11 April 2019 at 11:38. |
11 April 2019, 12:19 | #13 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,347
|
Is it a case that it's not using sprites at all? Sprites could be used for the GUI elements, leaving the blitter to draw the characters. Perhaps it uses a custom dual playfield split, e.g. 5+3, so the players have 32 pens and the background 8? I'm just speculating...
Different colour sets for the same character are easy enough to do with the method I suggested of having a few pens that are dynamically set for each character. That lets you change the clothing colours very easily for example. |
11 April 2019, 12:57 | #14 |
Registered User
Join Date: Sep 2004
Location: Poland
Posts: 1,302
|
It's not that simple. It's rather not 5 + 3 bitplanes, because backgrounds for sure have more than 8 colors. Let's take this screenshot:
You have 2x blue (roof and rack) 2x red (sign) 2x grey (buldings, rooster and shirts) 4x brown/orange (many places including pavement) green (sign and below it on right) and white (many places). It's fast calculation without some more colors, e.g sky. So it's probably 4 bitplanes, not 3. Probably it's 4 bitplanes for background... and some trick because there are different palettes for players, it's rather not shared 4 bitplanes. Edit: counting colors, maybe each fighter have 8 independent colors, so it's maybe 4 + 2 + 2. Or some 4 bitplane palette based on some universal and some individual colors, similar for this what You propose with sprites. Last edited by Solo Kazuki; 11 April 2019 at 13:36. |
11 April 2019, 15:14 | #15 | ||||||
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
Quote:
But although the sheets are ready, there are no actual animation routines of any kind for the players. That sort of stuff would be added only if I decided to continue this project. Quote:
Quote:
--- Quote:
The sprite recolors that I posted are the first step into making the SNES graphics work on the Amiga. And because sprites are used for the characters, we are limited to 16 colors, so both fighters on screen have to use the same palette. But as Daedalus mentioned, it could be possible to arrange the colors so that there would be some common colors, which would be shared by all fighters, and some unique colors, which would be fighter specific. And the example of 9 common colors + 3 Fighter one colors + 3 Fighter two colors could be one way to make it work. It would certainly be nice to have some unique colors, and I'm sure that a palette system can be made which makes this possible. Quote:
In this case it's very easy to have different palettes for both fighters, because both have their own "palette space" of 16 colors. Last edited by Master484; 11 April 2019 at 15:22. |
||||||
11 April 2019, 23:48 | #16 |
CaptainM68K-SPS France
|
Ssf2t on a1200 use 128 colors. 64 for backgrounds and 64 for sprites.
The game opens 8 bpl. |
13 April 2019, 13:18 | #17 | |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
In the above screenshot the colors are used as follows: background has 32 colors, Balrog has 16 colors and Chun Li has 16 colors. And then the fighter portraits have their own 16 color palettes. This adds up to 96 colors. And the remaining 32 colors are used for the energy bars, score numbers, fighter names, and the timer. The letters and the timer numbers look like they could have copper gradients, but in this case I think the gradients are made by just using the remaining colors. --- This game looks so great in screenshots...in fact it looks almost better than the arcade, because on the smaller Amiga 320*256 screen the sprites appear to be bigger than in the arcade version. And I have been thinking about this...the background is 32 colors...So it could be split into a 16+16 dual PF, and it would still be 32 colors, but now with parallax. And then the AGA 64 pixel wide sprites could be used for the characters...two 16 color sprites could be used for one character, so they could be 128 pixel wide. But the problem is that for the arcade size sprites, 128 pixels is not enough for all frames. So there would be some sprite flicker during certain frames. And the unified 16 color sprite palette would still be a problem too. But if the AGA sprites can't handle it, then maybe things could be done like they're are in this game: just drop the color mode to 64: using 32 for backgrounds and 16+16 colors for the characters, and draw them with the blitter. And then boost BG colors with the copper, and use sprites to make the background animations or even some parallax. Together the sprites and copper would easily boost the 32 color background to 64 colors, and both players would have their own 16 color palette, meaning arcade perfect colors (they're 16c in the arcade too). But of course with the arcade GFX Chip RAM usage is the biggest problem. But I'm playing around with the arcade graphics, to see if it's somehow possible that enough frames could be squeezed in to make an acceptable game. Maybe, just maybe the A1200 could handle it...But this is all just speculation. |
|
13 April 2019, 14:47 | #18 |
CaptainM68K-SPS France
|
The huge sprites are build with 16x16 tiles, like on cps2.
|
14 April 2019, 16:54 | #19 |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 459
|
|
15 April 2019, 16:35 | #20 | ||
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
Quote:
Although dividing the BOBs to smaller pieces is the right way to do it, because it saves Chip RAM. But the number of pieces per animation frame should be as low as possible, so that the amount of Blitter operations needed to draw the characters stays as low as possible. If everything is in 16*16 pieces, then drawing one character needs something like 30 16*16 objects, which means that the Blitter needs to be started 30 times. Or actually 60 times because there are two players. Codetapper's site has all GFX from the Us Gold SF2: http://codetapper.com/amiga/rips/street-fighter-2/ Those graphics sheets are a good example of how to split big objects into smaller pieces in an "Amiga friendly" way. So one frame could be for example one 48*32 block and one 64*48 block. Only two Blitter operations needed. |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SNES mini | alexh | Retrogaming General Discussion | 36 | 08 January 2018 16:13 |
sf2 with cd32 pad support (whdload?) | turrican3 | support.Games | 10 | 03 September 2013 16:36 |
A600 dual kickstart, dual boot drive | TreacleWench | Hardware mods | 41 | 18 May 2012 12:02 |
Best SNES Platformers? | Fingerlickin_B | Retrogaming General Discussion | 39 | 02 February 2010 13:45 |
US Snes Games on UK Snes | Steve | Retrogaming General Discussion | 13 | 17 December 2001 22:48 |
|
|