Matthew Parker
2008-03-04 05:34:23 UTC
Hi, I'm running larceny for x86 with the native compiler.
I have used the foreign interface to connect it to a module I have that
lets you control the artificial intelligence of a Quake 2 client (quake2
is a
first person shooter game). The module runs the game at 40 frames per
second, which doesn't use much CPU, and for every frame it does a
call-back into larceny and runs a scheme function that controls the AI.
I did this in chicken scheme and it worked very well, but I decided to
switch to larceny since chicken is quite slow in comparison. I've got it
all working
except I notice that every so often the game will freeze up for a split
second, noticably, and then resume its normal speed. Is this due to the
garbage collector? Is there any way to fix this by changing the gc
settings, or by running things in a thread?
Thank you,
Matt
I have used the foreign interface to connect it to a module I have that
lets you control the artificial intelligence of a Quake 2 client (quake2
is a
first person shooter game). The module runs the game at 40 frames per
second, which doesn't use much CPU, and for every frame it does a
call-back into larceny and runs a scheme function that controls the AI.
I did this in chicken scheme and it worked very well, but I decided to
switch to larceny since chicken is quite slow in comparison. I've got it
all working
except I notice that every so often the game will freeze up for a split
second, noticably, and then resume its normal speed. Is this due to the
garbage collector? Is there any way to fix this by changing the gc
settings, or by running things in a thread?
Thank you,
Matt