hi devforum im trying to figure out how combat games on roblox have that clean knockback. I also wanna figure out how they handle players landing on the floor, skidding, landing on walls and causing debree–some good examples are those undertale themed games on roblox.
What i did in a recent project of mine was handle collision-heavy movement manually by storing a velocity vector, gravity constants, etc and I would simulate the physics at a set interval. This method was used on NPC’s in a single player combo-based game and it was pretty performant. If you’d like I can attach some footage.
Imagine this, all the characters in Workspace are just a figment of your imagination. They don’t exist on the server physically; they’re just simulated on each client individually.
This is how you could potentially achieve knockback and other physical functions at the full framerate without nasty replication and Network Ownership. However, it is very difficult to implement, because you’d essentially be doing all the replication yourself through unreliable remote events.
This is the link to the showcase. The “freezing” you might see is just hitstop on some attacks.
And what I’m showing at the end are some of the methods such as :Reflect() which i used to have enemies skid off surfaces. The method allows you to bounce objects off of any surface, even sloped or vertical surfaces (i should’ve shown that in the video.) All the movements of the objects were simulated using the simulation controller I showed, no roblox physics were needed for that.