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,098
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: 386
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,098
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: 375
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,098
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 Yesterday, 15:03   #106
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 375
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 Yesterday, 16:06   #107
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,098
Thanks for all your replys I'm definitely interested in taking a more in depth look sometime.
Retro1234 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 22:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07485 seconds with 15 queries