From: David Masover Date: 2010-02-08T11:22:54+09:00 Subject: Re: Honest opinion needed... On Sunday 07 February 2010 06:15:17 pm Bill Kelly wrote: > Schala Zeal wrote: > > The bottom line is would there be any negative impact if I were to embed > > a Ruby 1.9.1 scripting engine in my game, in contrast to Lua? > > For example, if you must maintain solid 60Hz, it can be quite a > challenge: > > As of Lua 5.1, the Garbage Collector is now incremental instead of > mark-and-sweep. It might be a bit heavyweight, but if your game is written in Java, JRuby would be a good fit. If not, you could consider embedding a Java interpreter... I'm pretty sure that's not a good idea, though. Another possibility would be to implement this hack: > Users wrote a number of addon solutions that performed > garbage collection as pre-defined ”safe” times, such as when entering > a city or exiting combat When incremental GC was introduced the > system seemed to be much smoother and caused less issues for users. Anytime you know it's safe, you could call GC.start -- I think that's what it's called. Probably the best optimization -- though the least pleasant -- is to keep your object graph small-ish, so each GC run takes less time.