Raised This Month: $ Target: $400
 0% 

set_task & player loop.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 06-11-2014 , 19:24   set_task & player loop.
Reply With Quote #1

Lo

Im wondering what is more efficient when you need to do something frequent on each player.
The frequency is about every 20 seconds.

- Setting a global set_task then loop through all the players do code.
Doing one task still requires the CPU to check every cycle if it is time to do the task then cycle through all players.

- Seting a set task on ID, which could result to have 4 tasks being set at a given time, avoids using player loop.

This is a question without knowing what code the function will be handling so I'm expecting an answer excluding that.
I'm also wondering if get game time with a forward think would be more efficient instead, so if you got answers on that they are welc0me.
vamppa is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode