Slightly off topic, but I&#39;m guessing one way to get everything onto one state would be to append the name of the script to every common function call.<div><br></div><div>So like nautilusUpdate() or nautilus_update() instead of update()</div>
<div><br></div><div>This seems like it might be a major pain in the ass though?<br><br><div class="gmail_quote">On Sun, Jul 4, 2010 at 9:16 PM, Andrew Church <span dir="ltr">&lt;<a href="mailto:achurch%2Baquaria@achurch.org">achurch+aquaria@achurch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt;Having one lua_State per script rather than per entity would be huge memory<br>
&gt;savings!<br>
&gt;<br>
&gt;It doesn&#39;t seem like that&#39;d be much of a waste at that point. The waste is<br>
&gt;loading the same scripts multiple times.<br>
<br>
</div>Fair enough. (:  I was worried about the ~60k/state just from registering<br>
all the interface functions, but entityinclude by itself looks like it<br>
takes up 20k/instance, so that could cancel out the loss all on its own.<br>
I&#39;ve implemented the code for your suggestion locally, and I&#39;m working<br>
through the scripts now (which are going to be a gigantic commit, heh).<br>
<br>
On a tangent, and mostly out of curiosity:  What&#39;s the state of the<br>
ParticleEffectScript stuff in ScriptInterface.cpp?  It&#39;s all inactive<br>
as far as I can tell; I had to comment it out for the new Lua state<br>
code because I wasn&#39;t quite sure how it was intended to work.  Is it<br>
something that could be useful if I integrated it into the new code, or<br>
should I not worry about it?<br>
<div><div></div><div class="h5"><br>
  --Andrew Church<br>
    <a href="mailto:achurch@achurch.org">achurch@achurch.org</a><br>
    <a href="http://achurch.org/" target="_blank">http://achurch.org/</a><br>
_______________________________________________<br>
aquaria mailing list<br>
<a href="mailto:aquaria@icculus.org">aquaria@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/aquaria" target="_blank">http://icculus.org/mailman/listinfo/aquaria</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alec Holowka<br><a href="http://www.infiniteammo.ca">www.infiniteammo.ca</a><br><a href="http://www.bit-blot.com">www.bit-blot.com</a><br>
</div>