|
| 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 |
|
|
|
| 09 Dec 2013 04:24 PM |
" (Flaming may be in this post)"
wut? |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 09 Dec 2013 06:10 PM |
| Sooo... I should use coroutines instead of RunService? |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2013 07:25 PM |
| I think you mean broroutines. They've saved so many of my scripts. |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2013 06:52 AM |
cuzroutines yoloroutines SWAGroutines!!!!!! |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2013 07:42 AM |
| I tend to avoid them and put everything in a single loop. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
 |
| 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
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 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
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 10 Dec 2013 12:26 PM |
| How would you suggest doing them then? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 10 Dec 2013 12:59 PM |
Now that.. actually is a lot better..
I feel somewhat disappointed with myself for this :c |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2013 01:01 PM |
| lol wtf were you doing before ? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 10 Dec 2013 03:31 PM |
^ So, local works like a private member?
EOS db 0x00 ;End of String Marker |
|
|
| Report Abuse |
|
|
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 |
|
|