iPhone + GameCenter + Bindings (scripting languages)

Hi,

I’m deloping SDL bindings and a graphics engine for the Scheme language as
part of a bigger project (http://schemespheres.org), with the Gambit
compiler.

Due to the iPhoneSetAnimationCallback method of solving the issue of
returning control to GameCenter, I’m having a fundamental problem with the
language interpreter.
In order for Gambit (the Scheme VM and interpreter) to work, I need to keep
the engine running, which generally means entering its own loop within the
main function. Generally that’s ok, since you build your own loop and call
the FFI functions as usual.

Is there a way to run the iPhoneSetAnimationCallback and make it compatible
with GameCenter without breaking from the interpreter’s loop?

This is an issue that I see happening in any other binding as well, since
the VM loop is a very common pattern, and I don’t see many interpreters
with the ability to stop and resume so their execution can be broken into
frame callbacks within SDL.

Best regards,

?lvaro Castro-Castilla

Between Apple and SDL updates, you shouldn’t need the iOS animation
callback method anymore. It’s still there because Apple doesn’t promise the
hack that we use will continue to work, but it does seem to now.

FYI, you’d have this problem even if SDL weren’t involved. Callback based
systems aren’t generally compatible with interpreters that take over the
frame loop.On Thu, Aug 7, 2014 at 4:27 AM, ?lvaro Castro-Castilla < alvaro.castro.castilla at gmail.com> wrote:

Hi,

I’m deloping SDL bindings and a graphics engine for the Scheme language as
part of a bigger project (http://schemespheres.org), with the Gambit
compiler.

Due to the iPhoneSetAnimationCallback method of solving the issue of
returning control to GameCenter, I’m having a fundamental problem with the
language interpreter.
In order for Gambit (the Scheme VM and interpreter) to work, I need to
keep the engine running, which generally means entering its own loop within
the main function. Generally that’s ok, since you build your own loop and
call the FFI functions as usual.

Is there a way to run the iPhoneSetAnimationCallback and make it
compatible with GameCenter without breaking from the interpreter’s loop?

This is an issue that I see happening in any other binding as well, since
the VM loop is a very common pattern, and I don’t see many interpreters
with the ability to stop and resume so their execution can be broken into
frame callbacks within SDL.

Best regards,

?lvaro Castro-Castilla


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Between Apple and SDL updates, you shouldn’t need the iOS animation
callback method anymore. It’s still there because Apple doesn’t promise the
hack that we use will continue to work, but it does seem to now.

FYI, you’d have this problem even if SDL weren’t involved. Callback based
systems aren’t generally compatible with interpreters that take over the
frame loop.

Thanks.
The Scheme system doesn’t need to take over the frame loop, I’ve figured
the right way to do it.

But, to make sure, you don’t need to use iPhoneSetAnimationCallback to
allow Game Center any more? If that’s the case, the iOS REDME should be
updated to reflect this.On Thu, Aug 7, 2014 at 11:55 PM, Sam Lantinga wrote:

But, to make sure, you don’t need to use iPhoneSetAnimationCallback to
allow Game Center any more? If that’s the case, the iOS REDME should be
updated to reflect this.

Yes, the bug is in the readme, game center works also with the SDL trick
that let you keep full control of the application main loop.–
Bye,
Gabry