#Combat system
1 messages · Page 1 of 1 (latest)
google how to m1
this is a very complex thing
i think
never tried it myself
uh
you need to first detect when they m1
so
like
thats easy
events and stuff
then create a hitbox infront of them preferably from their HumanoidRootPart location
and play an animation
if another part in that hitbox's parent is a player then damage them
okay thats simpler than i thought actually
you gotta like, do slow and stagger and hitstun too, but thats not too much more
Are you asking how to add mobile support specifically, or how to make an entire combat system?
Entire combat system
** You are now Level 3! **
yeah it is, until you actually finish it and realize there are input delays
and then suddenly learn that maybe cloning tsb isn't as easy as it looks
oh right
The amount of misery and suffering I experienced from this sentence is astounding
Fighting network latency and client to server to client replication times it pisses me off so bad 
making a gun script was so brutal when theres insane input delay
since i have to chose between the game being half unplayable or exploitable
we have server authority now so you don't have to make your own rollback netcode now
True
I honestly don’t know how to feel about server authority
I still don't know what I'm doing

hang on
wait
so
uh
what is server authority?
because this gun script i wrote has brutal delays
google it
I'm still confused how to make m1s
google it
remote events 
@signal cave told u what to do soo
google genuinley gave me absolutley nothing
I guess you and I don’t use the same google? https://devforum.roblox.com/t/server-authority-how-to-begin/4139185
Hello 👋! Today, I’m here to teach you the basics of the new Server Authority system that Roblox has released out of Early Access and into Beta. In this tutorial, I will explain the core concepts behind Server Authority and Rollback Netcode and give you information on how to begin working with it on Roblox. Let’s begin. How to Enable Serv...
to be fair, google isn't very helpful if you're blind

I’ve known about server authority for a while but not how it reduces input lag, and still don’t see it
I figured it’s only an anti exploit measure
soooo @wary meadow question
** You are now Level 17! **
yes
aw
i mean i can’t tell you for sure but i highly highly doubt there’s any way to prevent that
So what's a remote event
always assume exploiters have full control over the client
gah
roblox docs
Okie
🚪
i used to exploit in like 2018 the amount of paranoia i have over client scripts lol
but back then filtering enabled didn’t exist either so
that's part of it, but imo that's not the primary benefit
ok way
wait
so
if i calculated the ray for a gun fire on the client
then re-calculated it on the server
well see that's the thing. It doesn't reduce input lag. it's still there. you can't reduce it, or remove it. but what you can do is either move it somewhere else, or hide it. server authority, or more specifically rollback netcode in general, does a bit of both.
would that work
How come? The way I go about hiding lag in general is just being vigilant about hitbox calculation and prediction and having a lot of effects like visual effects animations etc masking the delay from your input to the server receiving it, I’m aware there are other ways but not on their details
I mean yeah?
A bit unnecessary if anything imo
ya that's how it's done but on a much bigger scale. like if you lock the player in place during m1 animation you can guarantee a reliable hitbox
problem is with the shooter im making its a teleport-round-based rougelike instead of most normal shooters so i cant really moderate it
so it practically HAS to be unexploitable
but that's like saying you can get reliably raycast if you freeze the player for 0.2-ish seconds every time they shoot a gun, so obviously doesn't work everywhere
not possible, if people wanna exploit they will. all you can do is make it costly to the point where it wouldn’t be worth for them to exploit
it’s the same story with obfuscation and encryption, if someone wants to crack something they will, you can only focus on strengthening encryption
Yeah for sure but it’s not a sustainable way to just freeze players during attack in most cases
there is no security through obscurity 👍
Wdym?
it's a saying, google it. rule of thumb when it comes to cybersecurity
ya so what rollback netcode does is gives you free reign to move where the lag happens
In what way? Do you have any examples?
e.g in counterstrike you might find you'll sometimes get hit even when you're behind cover; only when you just moved there.
e.g say you have a shield that gives you invincibility when you click it; and another player shoots you. if you click your shield one frame after another player shoots you, your computer won't know that you got hit until [however long your ping is] later. your screen will show your shield activating, and then you randomly die.
this is PREFERABLE to clicking a gun and the shot happens latency later, or clicking your shield and it takes [latency] until it appears to activate on your screen
rollback netcode is what informs your client that you actually got hit
lag compensation is related but a bit different
lag compensation stops at the rollback stage, and basically decides if you hit the player where they were on the frame you actually shot, rather than where they actually are now, because the server doesn't know you fired a gun until [half latency] later
so there's this period of time where everything is in this awkward superposition state where all clients are guessing what happens on a particular frame until a few moments later when the details of what happened on that frame are received on the server and then propagated to your client.
*it's a big subject so you'll forgive me if i dont want to explain it every time some asks, it's not a beginner subject 😮💨 *
I appreciate your explanation for sure, it makes a lot of sense! Do you have any links to where I can read more about examples and usages? I’m pretty knowledgeable about how the networking in games like csgo are, well before their subtick system anyway, so I did appreciate that example as well! Is there something you do in your code to purposefully redirect the latency or is it automatically done, and you build your systems around that?
google clientside prediction
also if you're "knowledgeable" about csgo's netcode you should already know about this... ;o
roblox's server authority is the same model
I’m not super knowledgeable on the specifics but I know how things work in a nutshell, at a level where I myself know decently how things work, but not at a level good enough to explain it properly to others