|
| 03 May 2015 11:12 PM |
| Lets say I have a table that holds 50,000 variables would there be lag when trying to edit/check the state of the variable? |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 03 May 2015 11:13 PM |
if u iterated through it
u'd probably want a delay every 1000-5000 iterations |
|
|
| Report Abuse |
|
|
|
| 03 May 2015 11:13 PM |
| Not when indexing, but yes when iterating without yielding. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 May 2015 11:14 PM |
Nope, Lua's main purpose was to be able to efficiently do this. Although why do you have a whole 50 thousand lol |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 May 2015 11:14 PM |
| Wow I got ninja'd pretty badly |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 May 2015 11:18 PM |
why do you have 50 thousand [2]
Save the plants! Plants > animals! |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 May 2015 03:23 PM |
I was thinking of a grid based hitbox for gui's that did not use loops to compair positions to see if something is there but I was unsure of the limitations of it
I made a game that had 2.5k variables in a table for a 50x50 grid (used a script to make the table for me) and just set the variable true for a hitbox and false for air http://www.roblox.com/games/197131891/Snake-Game |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 03:25 PM |
| Can tables even hold that many elements? o_o |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 03:28 PM |
Collision = { ["X0.0Y0.0"] = false, ["X0.02Y0.0"] = false, ["X0.04Y0.0"] = false, ["X0.06Y0.0"] = false, ... until ["X0.98Y0.98"] = false } This is what my table looks like |
|
|
| Report Abuse |
|
|