English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 15 July 2019, 16:42   #101
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
Quote:
Originally Posted by Master484 View Post
Yes, this trick has been suggested before, and I think it might work.

Although in Blitz Basic both the Leg and Body parts would be Shape objects. And when a Shape is flipped with the "Flip" command, it stays that way.

And so this happens:

1. Player walks right.
2. We flip all leg Shapes to right.
3. All walking frames, both body and leg parts are now facing right.
4. Then fighters jump over each other and switch sides.
5. And now we need to flip all walking parts to left, both body and leg Shapes.

And so we end up with Flipping the full frames anyway.

Although now that I think about it, there is a workaround to this, and that is to have all frames stored in a Bitmap instead of Shapes, and then every frame we use GetaShape to grab the correct Leg and Body parts, and then Flip one of them.

But I think "GetaShape" is quite slow in real time use, and so is "XFlip".

It would work, but it would still be slow, thanks to the slowness of the Blitz commands involved.

But with a faster horizontal flipping routine this is certainly a good idea. And yes, this way the animation frames have hope of fitting into 1 MB.

Yes, that is the other way to make it fit.

Or maybe both mirroring and unpacking could be used at same time, as some people have mentioned in other threads.


Quote:
Originally Posted by Master484 View Post
Although now that I think about it, there is a workaround to this, and that is to have all frames stored in a Bitmap instead of Shapes, and then every frame we use GetaShape to grab the correct Leg and Body parts, and then Flip one of them.
If that is quicker than XFlip then that's just crazy

Shapes should be better because once there shapes and any unnecessary mask borders are gone the file size should be smaller
Retro1234 is offline  
Old 15 July 2019, 19:32   #102
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Sunny Bournemouth, UK
Posts: 652
Or don't use blitz basic
DanScott is offline  
Old 15 July 2019, 19:44   #103
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
Well Blitz can incorporate ASM but that's way beyond me.

usually when someone starts a thread with look i'm going to program this game and I've changed the palette I tend to think O god here we go etc but Master484 has gone further and proven a few things about Blitz being very capable when Bliting.

Also when people say such and such is not possible in Amos or Blitz I tend to think this seems like a challenge.

Last edited by Retro1234; 15 July 2019 at 19:58.
Retro1234 is offline  
Old 16 July 2019, 17:29   #104
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 440
Quote:
If that is quicker than XFlip then that's just crazy
Well, it would be one "GetaShape" and one "XFlip" per character, versus doing two "XFlips" per character.

But yes, I think that I once tested the speed of "GetaShape", and it was very slow when done in real time, so the idea that I posted might indeed be slower.

---

But memory wise it might still be better to have the animation frames in Bitmaps instead of Shapes. This is because the Bitmap doesn't have a transparency mask layer, which the Shapes have. And so I think Shapes will use more RAM than Bitmaps, although I haven't tested this.

So theoretically, we could have all moving game graphics stored in huge Bitmaps, and only have 1 Shape object, to which we constantly "grab" new graphics with "GetaShape", and then Blit.

But this would only work in theory, because as mentioned, "GetaShape" is a very slow command. But in turn based strategy games and such, this might be a good technique to save Chip RAM.
Master484 is offline  
Old 16 July 2019, 19:07   #105
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
Did you ever look at leathered code or have any idea what method he used to show the reverse of his Sprites(bobs).
Retro1234 is offline  
Old 18 July 2019, 15:03   #106
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 440
Quote:
Did you ever look at leathered code or have any idea what method he used to show the reverse of his Sprites(bobs).
Yes, I have taken a quick look at the Leathered's Final Fight project source code.

I think all Shapes in it were pre-flipped, so it had both the left and right versions in Chip RAM. Although I can't be 100 % sure, I have only quickly looked it through to see how the code looked like.

And it was of course an AGA project, and required 2 MB + lots of Fast RAM, so there was no actual need for real time mirroring.
Master484 is offline  
Old 18 July 2019, 16:06   #107
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
Thanks for all your replys I'm definitely interested in taking a more in depth look sometime.
Retro1234 is offline  
Old 11 July 2020, 16:53   #108
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 840
Do most amiga games use bobs over sprites with larger characters and is it impossible to make them run smoothly? Does shadow warriors use bobs?
trydowave is offline  
Old 11 July 2020, 19:20   #109
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 440
Quote:
Do most amiga games use bobs over sprites with larger characters and is it impossible to make them run smoothly?
When it comes to fighting games, then yes, bobs are almost always used. When combined together, the OCS sprites can only create one 64 pixel wide, 16 color character, so you are almost forced to use bobs to get two characters of that size to screen.

Large bobs are slow, and games that have them often run at 25 FPS, as demonstrated by Body Blows, Shadow Fighter, and others. Mortal Kombat 1 seems to use sprites for the other character (WinUAE visual debugger shows this), but despite this I think it too runs at 25 FPS.

Half of the slowness comes from the size of the bobs, and the other half comes from the need to mirror the bobs in real time, in order to fit all those animation frames into chip RAM, as has been discussed in this thread.

Of all A500 fighting games, only Elfmania runs at 50 FPS, and the reason for that could be that they somehow managed to avoid the real time mirroring thing, maybe by simply having less moves, so that both left and right versions fit in RAM at the same time.

Quote:
Does shadow warriors use bobs?
Yes, both Shadow Warriors and Shadow Fighter use bobs.
Master484 is offline  
Old 11 July 2020, 20:06   #110
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 840
thanks for the response. whats the story with fightin spirit aga? does that still use bobs as the game looks like its running at 50fps compared to the ocs 25fps
trydowave is offline  
Old 12 July 2020, 17:12   #111
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 440
Quote:
thanks for the response. whats the story with fightin spirit aga? does that still use bobs as the game looks like its running at 50fps compared to the ocs 25fps
Fighting Spirit AGA is indeed 50 FPS and uses bobs for the characters.

But on AGA it's much easier to make any game to run at 50 FPS, even without using sprites.

On A1200 the larger AGA 32-bit display data fetch modes allow you to draw more stuff with the Blitter per frame (about 50 % more if I remember right).

Also it has four times more Chip RAM, (2 megs compared to the half meg of the A500), so you don't need to mirror the bobs anymore. And even if you still had to do that, the CPU of the A1200 can do that and all other stuff too at least 2 times faster than the A500.

---

If you want to know how different games are made, then you can use the WinUAE visual debugger, which is activated in this way:

When a game is running, press Shift + F12. A window with lots of stuff opens, and in the bottom of that window there is a text field. Write "v-2" to it, and press return. And then close the window. And now you'll have a small screen that shows how DMA time is used. Pink lines are sprite channels, yellow is copper activity, cyan lines are blitter activity, gray is CPU and the long dark blue strips are time eaten by the display itself. And make sure to have the "Cycle exact" emulation turned ON, otherwise it won't show all data.



For example in this Elfmania screenshot we can see that the score displays and the foreground objects are sprites, and that the sky colors come from the copper, and other stuff.

This is an easy way to see which games actually use the Amiga hardware, and in which way. For example every single bad arcade port (Rolling Thunder, Black Tiger, etc) all show only gray colors, which means that they only use the CPU to do stuff.
Attached Thumbnails
Click image for larger version

Name:	ElfmaniaScreenDebugger.png
Views:	309
Size:	59.1 KB
ID:	68112  
Master484 is offline  
Old 14 July 2020, 02:19   #112
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 840
thanks for the info regarding winuae.

and wow... thats interesting. i had no idea those bad ports werent using any of the amigas graphics capabilities.
trydowave is offline  
Old 14 July 2020, 09:25   #113
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 43
Posts: 8,500
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by Master484 View Post
This is an easy way to see which games actually use the Amiga hardware, and in which way. For example every single bad arcade port (Rolling Thunder, Black Tiger, etc) all show only gray colors, which means that they only use the CPU to do stuff.
this is so evident. I did a check quite a while ago, and i discovered that they used the combo CPU+some hardware reg to do what the Atari ST is doing with its CPU alone. You bet it won't go far :/
dlfrsilver is offline  
Old 07 August 2020, 11:29   #114
vulture
Registered User
 
Join Date: Oct 2007
Location: Athens , Greece
Posts: 1,173
@Master484

I believe I've checked both OCS and AGA versions of Shadow Fighter with winuae and they're updating at 50 fps.
vulture is offline  
Old 07 August 2020, 13:11   #115
alain.treesong
Aghnar
 
Join Date: Jan 2019
Location: France
Posts: 31
I think Shadow Fighter uses the probably only way to do a good SF2 on the Amiga (500) : the dual playfield mode (perhaps it had been said in a previous message).

Interesting for the speed (no background to save) and for the memory because the characters are only drawn with 3 bitplanes. Of course the graphist(s) has to be able to draw the 2 fighters with only 7 colors...
It is possible as it is shown in Shadow Fighter. Impressive work for this game in a technical and visual point of view. It is really the SF2 of the Amiga (OCS)

Hmm I will test that... with Amos (because I like difficult challenge) :-)
alain.treesong is offline  
Old 07 August 2020, 13:53   #116
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 440
Quote:
I believe I've checked both OCS and AGA versions of Shadow Fighter with winuae and they're updating at 50 fps.
In Shadow Fighter OCS the scrolling seems to move at 50 FPS, but characters update at 25 FPS. Haven't tried the AGA version though.

You can check this by moving the "Refresh" slider in the WinUAE "Display" menu. In Shadow Fighter, when the slider is moved between the first and second spot, you can see no difference in the smoothness of how the characters move. Which means that the BOBs update at 25 FPS.

If you try this same thing in a "real" 50 FPS game like Elfmania, you'll instantly notice a difference between the first two "Refresh" settings; the second slider position will "skip" half of the BOB updates, causing a very clear drop in the smoothness of the character movement.

Quote:
I think Shadow Fighter uses the probably only way to do a good SF2 on the Amiga (500) : the dual playfield mode
Indeed, for memory and speed, this is probably the best option.
Master484 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Street Fighter 2 for CPC !! dlfrsilver Retrogaming General Discussion 140 09 April 2017 20:12
Street Fighter 2 weirdreams Retrogaming General Discussion 4 20 June 2012 23:15
Street Fighter 2 credits dlfrsilver HOL contributions 8 20 October 2010 12:46
Street Fighter 3 gfx found. Thorham project.Sprites 1 22 September 2009 13:13
street fighter stuntpup project.WHDLoad 5 30 August 2007 20:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08812 seconds with 16 queries