English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 29 February 2020, 21:29   #21
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,635
Quote:
Originally Posted by DanScott View Post
That''s not how Street Fighter game collision works though, and I wouldn't expect that method to produce desirable results.

Imagine that player 1 was kicking left, but they were stood just to the right of player 2, and were kicking into space, but their shoulder was intersecting with player 2 arm...


I don't see how that could happen could you provide a picture?
You could add more detail
Player 1 X= Y=
Player 2 X,Y
Player 1 Frame = 5 this Frame Width is Blah pixels Wide,High
Etc Etc
but then your nearly getting into Bounding boxes anyway, not that I'm against that and don't think it would be slow anyway but this way would probably be a bit quicker and easier or a mixture of the two, just Two large-ish bounding boxes per player with Sprite collision.

I don't think Blitz supports Hardware Sprite Collision anyway or iirc it was slow or something I remember someone ruling it out for another game based on speed.

Last edited by Retro1234; 29 February 2020 at 21:41.
Retro1234 is offline  
Old 29 February 2020, 22:43   #22
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 1,875
IIRC some Amiga games actually do use hardware collisions to see which sprites need to have their bounding boxes tested. I'm not too sure this actually ends up being all that much faster, but it's possible I suppose.
roondar is offline  
Old 29 February 2020, 23:56   #23
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,635
I'm still not sure we would need bounding boxes as we know a Hit has taken place we know the Move, frame and width and height of that frame, position of the character etc

anyway that is like a giant bounding box but we're relying more on the Sprite hardware collision we're just collecting the data from the collision that is there anyway to understand what collision has taken place.

again im not against bounding boxes etc this method is just simpler.
Retro1234 is offline  
Old 01 March 2020, 01:08   #24
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,421
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by DanScott View Post
That''s not how Street Fighter game collision works though, and I wouldn't expect that method to produce desirable results.

Imagine that player 1 was kicking left, but they were stood just to the right of player 2, and were kicking into space, but their shoulder was intersecting with player 2 arm...
SF2 ans SSF2 collisions and hitbox are fully handled by the 68000 in software in the CPS1 and CPS2 hardware.

All is script driven. Each fighters on screen has 1 state machine and the game logic is processed by the 68000 during a VBL while the chipset is displaying the backgrounds and sprites.
dlfrsilver is offline  
Old 01 March 2020, 13:30   #25
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 429
Quote:
I don't think Blitz supports Hardware Sprite Collision anyway or iirc it was slow or something I remember someone ruling it out for another game based on speed.
Blitz has a good set of commands for Sprite collisions: "Sprite vs Sprite", "Sprite vs Odd/Even color" and "Sprite vs Shape" are all supported. And "Sprite vs Sprite" and "Sprite vs Color" are super fast. But I think "Sprite vs Shape" does normal bounding box checks, and therefore it can be slower.

But on a game like SF2 sprite collisions aren't needed, and in fact, in some cases they wouldn't even work. Collision checks on SF2 are based on hitboxes, and not on pixel perfect collisions. Many moves can hit the other player even if the actual sprites don't overlap. For example in Ryu's "heavy punch" the hitbox extends some 8 to 16 pixels forwards from the actual fist.

So the collisions work something like this: Both Players have a hitbox, which varies in size depending on the animation frame. And in addition to this every combat move has an "attack hitbox" for the fist or foot part; a box that can "hurt" the other Player. And when an attack frame is displayed, we just do a simple "Player 1 fist hitbox" vs "Player 2 current frame hitbox" type of check. And if the hitboxes overlap, then we check what the other player was doing, was he Standing or Blocking, or something else. And that's it.

On SF2 the maximum amount of objects on screen is just 4 : two players and two fireballs. So collision checks would be done very quickly, and so would the AI, game logic, etc. Even the A500 would do all this in an instant, and the A1200 is 2 or 3 times faster.
Master484 is offline  
Old 01 March 2020, 15:01   #26
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 1,445
See here...


from this site:
https://dammit.typepad.com/blog/2010...-hitboxes.html

Quote:
Now as you play the game, hitboxes are superimposed on the sprites. Blue is the area that can be hit by the opponent, and red is the area that can hit the opponent. The green boxes are the areas that can never overlap and will cause characters to push each other.
Steril707 is offline  
Old 01 March 2020, 15:21   #27
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 1,875
That was a very interesting read, thanks!
roondar is offline  
Old 01 March 2020, 15:23   #28
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,635
Im not against Bounding Boxes and dont think they would be slow

all im saying is on a beat-em up you could do Sprite vs Sprite Collison or Mask Collison or just one large Bounding Box for the whole player.
then check
Has a hit taken place =Yes
Player 1 = Kicking
was player 2 = Blocking No
Player 1 Frame was = 6 and Width and Height of Frame is 128*54
Player 2 frame was = 1 and width etc etc
Retro1234 is offline  
Old 01 March 2020, 23:20   #29
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Sunny Bournemouth, UK
Posts: 617
Quote:
Originally Posted by Retro1234 View Post
Im not against Bounding Boxes and dont think they would be slow

all im saying is on a beat-em up you could do Sprite vs Sprite Collison or Mask Collison or just one large Bounding Box for the whole player.
then check
Has a hit taken place =Yes
Player 1 = Kicking
was player 2 = Blocking No
Player 1 Frame was = 6 and Width and Height of Frame is 128*54
Player 2 frame was = 1 and width etc etc
code it up, and see how it feels.

SF2 got it pretty much spot on though
DanScott is offline  
Old 01 March 2020, 23:41   #30
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,635
Hehe fair point, trust me it would work Honest
Retro1234 is offline  
Old 02 March 2020, 08:32   #31
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 1,445
Quote:
Originally Posted by Retro1234 View Post
Hehe fair point, trust me it would work Honest
I went for your approach on both my fighting games, and it feels over simplistic when playing.

It's kind of okay if you are doing something like Yie Ar Kung Fu, but a proper SF2 would feel completely gimped that way and not like Sf2.
Steril707 is offline  
Old 02 March 2020, 10:39   #32
rothers
Registered User

 
Join Date: Apr 2018
Location: UK
Posts: 75
Didn't Mortal Kombat just use the arcade code? I seem to remember reading an interview where they said the logic was just the arcade code.

SF2 is 68k isn't it? Has anyone done a commented decompile like they have for many other games? That would be the quickest route... run the arcade code and redo the graphics engine. Still a big task.
rothers is offline  
Old 02 March 2020, 13:57   #33
LongLifeA1200
Registered User

LongLifeA1200's Avatar
 
Join Date: Nov 2017
Location: Amiga Kingdom
Posts: 235
Ain't nothing easy on the Amiga, otherwise it would have been done ages ago.

Street Fighter 2, OutRun, Metal Slug... threads like these show up like a game of whack-a-mole but progress never seems to get past the theory.
LongLifeA1200 is offline  
Old 02 March 2020, 14:41   #34
LongLifeA1200
Registered User

LongLifeA1200's Avatar
 
Join Date: Nov 2017
Location: Amiga Kingdom
Posts: 235
Quote:
Originally Posted by Steril707 View Post
Seems there is some complaints, even for the arcade hit boxes.

Quote:
Originally Posted by DanScott View Post
SF2 got it pretty much spot on though
For which? Hit boxes on the arcade or the Amiga?

Quote:
Originally Posted by Retro1234 View Post
Im not against Bounding Boxes and dont think they would be slow

all im saying is on a beat-em up you could do Sprite vs Sprite Collison or Mask Collison or just one large Bounding Box for the whole player.
then check
Has a hit taken place =Yes
Player 1 = Kicking
was player 2 = Blocking No
Player 1 Frame was = 6 and Width and Height of Frame is 128*54
Player 2 frame was = 1 and width etc etc
I think it would be better to write your own.
"has foot connected with ass = check"
"then proceed with K.O."
Obviously, a single box isn't going to cut it, though. It would have major potential to cause "unfair" wins or loses.
LongLifeA1200 is offline  
Old 02 March 2020, 15:25   #35
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,635
Again I dont have anything against Bounding Boxes -but what I wrote would work - but mods please just delete my posts Thanks.
Retro1234 is offline  
Old 02 March 2020, 15:52   #36
lilalurl
Global Moderator
lilalurl's Avatar
 
Join Date: Aug 2001
Location: France
Age: 40
Posts: 3,135
Send a message via ICQ to lilalurl
Quote:
Originally Posted by Retro1234 View Post
but mods please just delete my posts Thanks.
All 4,553 of them? That would be quite a huge task.
lilalurl is offline  
Old 02 March 2020, 16:37   #37
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,759
As this is in the coders section here's how I would approach.

The hit boxes obviously work as that was how Capcom approached it, but to do it on the Amiga you're gonna need some sort of tool to apply those hit boxes to every frame and doing manually wouldn't be something I would be doing (cos it would be boring).

I'd probably approach it by writing an Amiga side or Python on Windows tool. For each 16 (or 32) colour sprite frame I would add a few extra bitplanes, one for the defence hit boxes, another for the attack hitboxes and another for the path bounds (to stop players walking over each other) - this way you could easily switch off the planes and develop the hitboxes using something like DPaint or PPaint.

I'd then write a tool to extract the coordinates of each hit box for each sprite frame from those extra planes.

I would also be inclined to just try and re-implement the script engine, I think that would be quite fun to do with a some good possibilities for game play.

Geezer
mcgeezer is offline  
Old 02 March 2020, 20:04   #38
saimon69
J.M.D - Bedroom Musician

 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 1,356
this seems another scenario for split body parts a la metro siege seems to me
saimon69 is offline  
Old 02 March 2020, 20:27   #39
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,759
Quote:
Originally Posted by saimon69 View Post
this seems another scenario for split body parts a la metro siege seems to me
That’s the easy bit though.
mcgeezer is offline  
Old 02 March 2020, 21:33   #40
Tsak
Pixelglass/Reimagine

Tsak's Avatar
 
Join Date: Jun 2012
Location: Athens
Posts: 566
For what's worth it, how we do it in Metro Siege is we use the collision rectangles option in the Spriter prototype tool (freely available in Erik's Scorpion repo btw). There we can setup as many boxes as we want per character and per animation frame (each frame consists of different body parts, however we still use hit boxes).

Every character has different moves with different lenghts and different body sizes. Also depending on the frame, their bodies and limbs may be in a different position, horizontal or vertical or angled. So you need to be able and carefully set those boxes manually directly on top of the artwork in each frame to make this work properly.

Last edited by Tsak; 03 March 2020 at 04:58.
Tsak 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
Super street fighter Turbo Amiga-CD32 Akuma? seiyaps5 support.Games 1 12 February 2020 03:54
Super Street Fighter 2 Turbo - The Greatest Amiga Gaming Casualty? CU_AMiGA support.Games 103 27 May 2019 17:54
Super Street Fighter 2 Amiga Cd32 GurjSagoo request.Old Rare Games 6 31 October 2009 13:13
street fighter stuntpup project.WHDLoad 5 30 August 2007 20:45
Street Fighter 2 Poster from Amiga Force Issue March 93 grape Retrogaming General Discussion 11 08 November 2005 22:25

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 01:29.


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