squirrelについて書く前に

luaとかsquirrelといった組み込み用言語はhost systemに組み込めてナンボ、それでいて高速に動いてナンボなので、マスターした言語コレクションの一つに加えたいとかそういう人はあっちいってくれ。一番の問題は本体と組み込み言語のどこでそれぞれを切り分けるか、の設計にある。これはluaを使うにしても言えることだと思う。

以下squirrel掲示板に書いた恥ずかしい英文の丸写し

A part of joint between a lightweight language and a host system can take so many figure. And you must choose one among them. This is the designing problem. Looking simply, the problem seems where you should write a border line between a lightweight language and main system. all you must decide is in which actually the data is stored, and on which operation or calcuration is done.

Now about your rigid body. The main problem is in which data of regidbody instance is stored. in squirrel or in host? one factor can be concerned is frequency of access. I guess the evaluation of various forces or collision detection on every tick for each regid body is so cmplicated and heavy task and it must be on host system. The evaluation task must access heavily to regid body itself. So data of rigidbody instance will be decided to be on host system.

... like that. you'd better design which side to be placed through all interfaces and actual data around that rigid body system.

After that, if you should know actual code or technique to embed a data on the side it designed to be, I sure can advice you.