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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Am I the only one opposed to using a lot of coroutines?

Previous Thread :: Next Thread 
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
09 Dec 2013 04:23 PM
I find that having multiple threads can really slow down a place, especially when not needed at all. What are your opinions of it? (Flaming may be in this post)
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
09 Dec 2013 04:24 PM
" (Flaming may be in this post)"

wut?
Report Abuse
sncplay42 is not online. sncplay42
Joined: 27 Nov 2008
Total Posts: 11891
09 Dec 2013 04:27 PM
If it's your scripts that are slowing the place at all, that's weird.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
09 Dec 2013 04:35 PM
[ Content Deleted ]
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
09 Dec 2013 06:10 PM
Sooo... I should use coroutines instead of RunService?
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
09 Dec 2013 07:25 PM
I think you mean broroutines. They've saved so many of my scripts.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
10 Dec 2013 06:52 AM
cuzroutines
yoloroutines
SWAGroutines!!!!!!
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
10 Dec 2013 07:42 AM
I tend to avoid them and put everything in a single loop.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
10 Dec 2013 07:44 AM
Truthfully though, what most people don't realize is that Events, when invoked, run on another thread.
Report Abuse
Leeav is not online. Leeav
Top 100 Poster
Joined: 07 Sep 2006
Total Posts: 1905
10 Dec 2013 08:22 AM
Not sure that they "slow down the place" but I just try to avoid them as much as possible to avoid ugly code. I find that it's a nuisance in that if I'm running a large script, Ill be forced to use several of them.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
10 Dec 2013 09:08 AM
[ Content Deleted ]
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
10 Dec 2013 10:48 AM
I never really have much use for Coroutines. I have used them for recording the mouse's moves but that's about it.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
10 Dec 2013 11:16 AM
[ Content Deleted ]
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
10 Dec 2013 12:26 PM
How would you suggest doing them then?
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
10 Dec 2013 12:53 PM
As far as I know, the threads don't actually speed anything up in ROBLOX, because they aren't....how to say....real? They run as one process so coroutines can make things cleaner but don't actually unlock processing power that wouldn't have been there without.


--
@Decompiler: Player:GetMouse().Move:connect(YourFunctionHere)
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
10 Dec 2013 12:59 PM
Now that.. actually is a lot better..

I feel somewhat disappointed with myself for this :c
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
10 Dec 2013 01:01 PM
lol wtf were you doing before ?
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
10 Dec 2013 01:09 PM
Using a loop inside of a coroutine to record the mouse's position.

But hey, that is what happens when I don't refer to the wiki.
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
10 Dec 2013 01:10 PM
well you could also just check the mouse position when you need it, instead of tracking its move event, that would be better in some cases
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
10 Dec 2013 01:13 PM
I guess so. I think it would be possible to trick the event system by moving your actual camera around instead of the mouse.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Dec 2013 02:05 PM
@Oysi: Do you mean if I did:

--ModuleScript
local hi = 'Whatever'

--Regular Script
require(ModuleScript)
print(hi)

It would say 'Whatever'?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
10 Dec 2013 03:22 PM
[ Content Deleted ]
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
10 Dec 2013 03:31 PM
^ So, local works like a private member?

EOS db 0x00 ;End of String Marker
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
10 Dec 2013 05:21 PM
I now no longer have an excuse to make obnoxious scripts that take forever to find stuff in o3o I should try separating my current project's game script into module scripts later.
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