Skip to content

How is fight games programmed?

A kick or a punch consists of frames and one possible way to check for contact is to check if circles overlap. Circles on attack foot and circle on opponent head/stomach?

This is a simple and possible way to check for contact. Is there better way to solve the punch/contact moment?

Thanks in advace

0 points13 comments
Open on Reddit
About this post
Posted
Archived
Deleted on
Score
0 · 33% up
Kind
Text
ID
1js41nb

Author

6
posts
14
comments
4
media
View profile

14 comments

I'm pretty sure most fighting games just use hitboxes and hurtboxes (which is what you've described here, but knowing the standard term will help you look for more info)

11 points

Collision checks don't have to be circles, they can be polygons. And they don't even have to be the same frame to frame, they can change size and shape!

10 points

This was a useless reply

-13 points

Thank you! I'm trying to do the best with what your post is providing. If you want to answer the problem of "how do things collide?", which, I think is what you're asking, it's unclear, the answer is "use some form of collision shapes and primitives".

8 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.