generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Fire Rates on Roblox

Previous Thread :: Next Thread 
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 10:55 AM
It just hit me that there can only be 2 realistic fire rates due to the way wait() works with FPS.

1800 RPM (1/30) is unrealistic in most cases.
900 RPM (2/30) is the first suitable fire rate.
600 RPM (3/30) is the second suitable fire rate.
450 RPM (4/30) is too slow in most cases.

So there you have it, whenever you see those fancy 0.090909, 0.10909 and other fire rate numbers with decimal places which never seem to end, it is all for nothing, because its going to fall into either 900RPM, or 600RPM anyway. (450RPM if the initial wait was below 0.133)
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
25 Jun 2013 10:56 AM
Yup...
Report Abuse
BrandonFireflower is not online. BrandonFireflower
Joined: 09 Feb 2010
Total Posts: 731
25 Jun 2013 10:57 AM
I hope you realize that there is an infinite amount of numbers in between 2/30 and 3/30.

You're also not thinking of things that aren't automatic.
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:05 AM
@BrandonFireflower
I hope that you realize that Roblox's wait system works hand in hand with the framerate, locked at 30fps.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2013 11:06 AM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
25 Jun 2013 11:07 AM
Fire is bahd, real bahd, it lag mee cuz of mai terribad grphiccarddd
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
25 Jun 2013 11:07 AM
oh, um, ^yup
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:15 AM
So what you are saying is that if I wanted my gun to shoot at 900RPM, which on a simulator with no lag would be every 2/30 of a second, I would have to take nothing of which you said into consideration.

Although the average computer doesn't play Roblox at 30fps perfectly, so I would have to see the time between the shots and deduct when suitable.
Timeline example - | being a shot, Underscore_ being wait, space being lag.
__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| When I would like the gun to shoot.
__ |__ |__ |__ |__ |__ |__ |__ |__ |__ |__ |__ |__ |__ |__ | When the gun actually shoots.
__ |__ |_ |__ |_ |__ |__ |_ |__ |_ |__ |__ |_ |__ |_ | Oysi's logic
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
25 Jun 2013 11:17 AM
Oysi is correct. Wait is not consistent.
Report Abuse
BrandonFireflower is not online. BrandonFireflower
Joined: 09 Feb 2010
Total Posts: 731
25 Jun 2013 11:19 AM
Quad, you have it alll wrong.

Oysi's method is the closest to when it actually shoots and it IS in fact properly spaced. Occasionally you'll get two bullets in one shot - not noticeable to the user, but accounts for the bullet that would not have been shot.
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:19 AM
The awkward moment when every single gun on Roblox is scripted using wait().
Report Abuse
BrandonFireflower is not online. BrandonFireflower
Joined: 09 Feb 2010
Total Posts: 731
25 Jun 2013 11:20 AM
You silly person, Oysi's method involves wait too!

You fail to comprehend the basics of one of the most basic methods that the basic engine offers you! Your less than basic mind can't handle the fact that wait returns the delta time! e.e
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:21 AM
And also, 2 bullets in 1 shot would completely ruin the idea of having a gun which fires at a certain speed anyway.

In projectile guns it would collide with a different projectile
In raycast guns, not as noticeable, although it would give a shotgun effect.
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:23 AM
Also, how about you stop being a snob just because your little friend helped explain your giberish to me?

I fully understand what oysi was saying, and you don't need to act like a know it all when in fact you can't achieve anything.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2013 11:29 AM
[ Content Deleted ]
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:31 AM
Thanks,
In that case, I don't think that the shooter could argue that he's shooting 1 less bullet per second. xD
Report Abuse
BrandonFireflower is not online. BrandonFireflower
Joined: 09 Feb 2010
Total Posts: 731
25 Jun 2013 11:43 AM
"And you wouldn't have several bullets per frame,"

That stems from when the delta time adds to the running total to be at least twice as much as the step time.

local stepTime=1/30
local totalTime=0
while true do
      totalTime=totalTime+wait()
      while totalTime>=stepTime do
            totalTime=totalTime-stepTime
            shoot()
      end
end

My comment about his lack of understanding is that all of our methods use wait().

"every single gun on Roblox is scripted using wait()."
Report Abuse
Oreology is not online. Oreology
Joined: 15 Sep 2012
Total Posts: 507
25 Jun 2013 11:48 AM
The graph is accurate? Isn't wait() subject to throttling meaning that it isn't consistent as in it would shoot at varyingly similar intervals and not waiting for a consistent amount of time?

No, it's not biology or psychology, it's oreology. The study of attraction.
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 11:52 AM
Brandon, what is getting on my nerves is your lack of understanding that not everyone uses the same vocabulary as yours. Of course everything works with wait(), but you can also see that most guns on Roblox don't harness the use of your useless chunk of code which you've just presented to us.
Report Abuse
BrandonFireflower is not online. BrandonFireflower
Joined: 09 Feb 2010
Total Posts: 731
25 Jun 2013 12:00 PM
"useless chunk of code"

That code produces the perfect fire rate that you want, it's not my problem if you think it's useless.

"Of course everything works with wait()"

Then don't imply this method doesn't.
Report Abuse
QuadFactor is not online. QuadFactor
Joined: 19 Apr 2011
Total Posts: 333
25 Jun 2013 12:02 PM
"Then don't imply this method doesn't"

Brandon, when you assume, you make a ***(ume) out of (***)u(me) and (***u)me
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
25 Jun 2013 12:30 PM
Just use tick(1/30)?
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
25 Jun 2013 12:40 PM
You can use coroutine.yield as the fastest way to "wait."
I recommend using a combination of tick and coroutine.yield to achieve a high and reliable frame count.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2013 12:41 PM
[ Content Deleted ]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image