lp:~aghuloum/scheme-libraries/ikarus-sdl
*** SDL Interface for Ikarus and the Worms Game ***
This is a very simple demo for how to write interactive graphical
programs in Ikarus. The demo is the single-player game worms (also
known as snake). It has pretty much no objective other than staying
alive and eating fruits. Three AI bots compete with you in the game
and each has a different playing strategy.
The real purpose of the demo is to show how such program can be
implemented in Ikarus, an implementation that does not provide any
foreign-
is simple: we write a simple program that encapsulates all the gory
details of the library we want to interface to, and we communicate
to this program through IO. The program listens for request from
its standard-input and responds by writing to its standard-output.
On the Scheme side, we start the program using process and send it
requests through the input and output ports that the process
procedure returns.
This method is pretty straight-forward and shields the programmer
from all the problems associated with writing FFI wrappers. The
programmer needs not care about how Ikarus is represented
internally, how the given library is implemented, and most
importantly, how the two systems would interact in many undesirable
ways.
This is just a demo. You're welcome to improve it as you please and
to adapt it to your needs. Enjoy.
- Get this branch:
- bzr branch lp:~aghuloum/scheme-libraries/ikarus-sdl