Squeak SDL (was: Re: Games with Squeak)

Mikael Kindborg mikael.kindborg at gmail.com
Thu Nov 9 22:25:43 UTC 2006


Hi Diego,

On 11/6/06, Diego Fernandez <diegof79 at gmail.com> wrote:
>
> I've created a project in SqueakSource, with public Read&Write
> permissions, so we can share our "experiments" there:
>
> MCHttpRepository
>         location: 'http://www.squeaksource.com/GameDevTools'
>         user: ''
>         password: ''
>
> There you can get the pre-pre-pre-alpha version of the SDL bindings.
> They doesn't do anything useful yet, only Init, SetVideoMode and
> LoadBMP.
> I'm doing this in my spare time, so the advances are really slow, so
> if you want to help we can learn more about FFI, SDL Surfaces et. al.
> together :)

I have experimented a little with your SDL bindings and you have made
a very good foundation. I will learn FFI and help add more functions.
Did a very small example which I uploaded to the repository, it opens
a window and displays a BMP-file (stole code from the tests). I tried
to position the bitmap with a SDLRect but got a coercion error I did
not understand. Will be away over the weekend, will look at this more
next week hopefully, this is great fun!

I am a bit concerned about how event input should be handled. Since
SDL now runs in its own window, SDL events have to be handled.
wxSqueak has a special virtual machine as I understand it, would be
good if this could be avoided with SDL. From my point of view, a good
solution would be to make SDL render inside a Squeak window, and use
standard Squeak input handling. Like how OpenGL is used in Croquet
(guess it works this way). Browsed the SDL-docs quickly but did not
find any functions for making SDL render into an application supplied
window, but even if this is not supported, it should not be that hard
to add. What are your thoughts about this Diego?

With the surface plugin it should be possible to render graphics from
Squeak onto SDL surfaces, the example Andreas put on SVN should be a
good starting point:

http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins/ExampleSurfacePlugin/

I look forward to do some C programming! Has been 10 years now since I
did something serious in C.

Best, Micke



More information about the Squeak-dev mailing list