Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 28 Feb 2017 03:47 PM |
| So Im trying to make player abilities and they worked quite well before, but I switched to FE for security purposes and now there are alot of issues with user input. Such as lagging between input and seeing results of that input to the server. Would it be better to do things like checking hit detection back on client side and then send a command to the server to do damage to the target? Currently I just have the client sending button presses to the server and the server runs everything from there. |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2017 03:50 PM |
| Since requesting permission from a server takes longer than having the server take action itself, it would be faster to put a script in the brick to check for collision detection because the server runs the script, not the client. |
|
|
| Report Abuse |
|
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 28 Feb 2017 04:02 PM |
| Thats kinda what I have however it doesnt seem to be working especially well. The server doesnt seem to register the collision fast enough so there is a signifigant delay in damaging the object it hit. |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 28 Feb 2017 04:04 PM |
I didn't read your paragraph, so forgive me if I answer wrong.
The real uestion is, do you want the action to be client sided, or so everyone can see (Server Sided)?
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 28 Feb 2017 04:16 PM |
| For this specific Instance; What happens currently is when the player clicks the mouse button it activates a remote function on the server which then activates an animation on the player and two parts are created and sent out in the direction the player is facing about 5-10 studs, I dont know the exact length, In which these parts are given a .Touched event where if they hit a part called HitBox (located in things that should be damaged like other players and NPCs) and then if it passes certain checks it will damage a Value in them called Health. This value is equipped with a .Changed function that changes their healthbar. I just am trying to figure out the best way to go about this |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 28 Feb 2017 04:24 PM |
Perform on the server.
I don't know about the stats, but I'd fire it on the server tbh
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 28 Feb 2017 04:45 PM |
| thats what is already happening, so there must be something I need to change because there are lag discrepancies that you dont see on other games. |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 28 Feb 2017 06:05 PM |
Did you try perfoming it on the client?
ATR'er since 2013. |
|
|
| Report Abuse |
|
|