|
| 25 May 2016 11:08 PM |
I created 2 FE guns. They work well, but for some reason the bullets always seem to be created a bit later than they should.
In my main server script, I have a function to create the bullet in which I clone both a bullet and a mesh for the bullet and set their properties. Then, I call the function giving the position of the handle as the starting point, and can't figure out how to improve the creation being a bit delayed!
|
|
|
| Report Abuse |
|
|
|
| 25 May 2016 11:48 PM |
Use RenderStepped or something similar.
http://wiki.roblox.com/index.php?title=API:Class/RunService/RenderStepped |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 25 May 2016 11:51 PM |
Graphics has no idea what he's talking about.
Create the ray on the client and make a seperate one on the server that's invisible to the person who fired it.
What does renderstepped have to do with anything graphic wf |
|
|
| Report Abuse |
|
|
|
| 25 May 2016 11:52 PM |
@Iso
He's speaking of "gun latency".
"Latency is the amount of time a message takes to traverse a system. In a computer network, it is an expression of how much time it takes for a packet of data to get from one designated point to another. It is sometimes measured as the time required for a packet to be returned to its sender."
Latency = Time |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 25 May 2016 11:56 PM |
No, really? Do you think i'm an idiot?
using renderstepped is not going to help you tosser. He has to give the appearance of lack of lag by creating the ray on the client. |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:00 AM |
@Iso
He speaks of "the bullets being created a bit later".
Therefore, I have came to a conclusion based off that by assuming he wants the bullet to be created much faster?
Or he wants the bullets to be created later on (such as a delay between). |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 26 May 2016 12:01 AM |
| It's because he's creating them on the server. There isn't a need for a wait between clicking and firing the remoteevent |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:02 AM |
@Iso
Well, if he doesn't require a wait, that's why I have provided RenderStepped. In my experience, I have used this to make stuff work better, faster, and smoother than a average loop. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
|
| 26 May 2016 12:05 AM |
Wait so graphics is advising for a bullet to be shot every frame?????
I don't know much about renderstepped, but I do know it fires every frame. |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:08 AM |
@Iso
No need to be rude, let's have some maturity here. I don't see why you want me to "get out" when I have done nothing wrong. If you believe I have made a mistake, then it's normal, we are human, we make mistakes and we are not allowed to correct them, no? |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 26 May 2016 12:08 AM |
| I'm not mature when it comes to incompetence. |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:09 AM |
@Iso
Well, you require a lesson on maturity, especially when it comes to real-world situations. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 26 May 2016 12:11 AM |
| maturity is not necessary if you employ yourself m8 |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:14 AM |
@Iso
It is necessary, it's useful. It helps displaying the image for yourself, your personality, who you are. I believe I can see your image already by you telling me to "get out". Don't take this offensive, but I can see you are bit rude and mean by that. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
|
| 26 May 2016 12:20 AM |
@Iso
Thanks, however, I don't feel very heavily offended, especially from people who lack dignity. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 26 May 2016 12:21 AM |
i don't feel very offended. especially from those who lack intelligence. |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 12:24 AM |
@Iso
Doesn't it feel good to make claims, when you have no evidence to support it, therefore making your argument invalid? |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 May 2016 01:34 AM |
@forever
You must be very angered at yourself, I bet your one of those kids who gets bullied a lot. |
|
|
| Report Abuse |
|
|
sparker22
|
  |
| Joined: 11 Mar 2010 |
| Total Posts: 846 |
|
|
| 26 May 2016 01:40 AM |
By a bit later I'm pretty sure he means the time between clicking the trigger button and seeing the bullet being created is too great. The time in between should be near instant.
The server should be used to verify what you're doing. Sanity checks. The client should always simulate things to give the appearance that things are instant. So yes, a ray on the client and server would be ideal.
RenderStepped/Heartbeat (Heartbeat for fast calculations and renderstepped for visual things when Heartbeat gives artifacts) are for running code at a fast frequency. Such as smoothing out the transition from one value to another like animations. Renderstepped/Heartbeat has no use here for the creation of a bullet. |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 01:48 AM |
@spark
Thank you for a verification, I see where I have went wrong. I learned a bit from that. At least you where very considerate and polite about it unlike the previous posters. I had the conclusion of RenderStepped because he was talking about the bullet coming "a bit later". |
|
|
| Report Abuse |
|
|
|
| 26 May 2016 09:35 PM |
I'm working on creating a ray locally right now.
This is a very dumb question, but how do I make it so the client can not see the ray created by the server?
|
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 26 May 2016 09:38 PM |
@exo,
refer to this, as I actually made something similar today
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=189800059 |
|
|
| Report Abuse |
|
|