Games with Squeak

Mikael Kindborg mikael.kindborg at gmail.com
Tue Nov 7 15:54:27 UTC 2006


Hi!

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 :)
>

Great, updated the SDL page on the swiki with this info, and made a
link from the game programming page:
http://minnow.cc.gatech.edu/squeak/5891

Anyone knows if previous work on SDL-bindings is available somewhere?
Would be useful as a reference.

>
> > 1. As an "add on" that bypasses the Display, and renders "on top of"
> > Morphic/Tweak. This is how I understand that Croquet works. Drawback
> > is you cannot use Morphic/Tweak but have to do your own UI system
> > (like the one in Croquet).
>
> This option is more simple for us (the developers of the SDL bindings :) ).
> So this is my first approach, develop the interfaces to interact with SDL.
>

I see, but it would be good to also  improve the speed of Morphic/Tweak.

The performance tests I did with Pygame shows that in terms of blit
speed, both between images/forms and to the display, we could have
something to learn from SDL. I am wondering if the generality of
BitBlt is what makes it perform less well than Pygame/SDL, or if other
aspects are involved.

For blitting between forms it could be worthwhile to continue the
development of NuBlt, and make a speedy blitter for specialised cases
of 32-bit forms and Form over and Form paint operations.

For high-end games Morphic/Tweak support might not be relevant, but I
wonder if the previous SDL-bindings where using SDL as the engine for
the VM, or if they were using your approach.

Also, with the Surface Plugin, it should be possible to use SDL
surfaces transparently as Forms in Squeak. Then again, OpenGL might be
a better option, as you and Bert discussed previously.

> > 2. As an integrated part of the VM, making Display and Forms use the
> > native display format. Then you could use Morphic/Tweak with the best
> > performance.
>
> I don't know is there is a performance gain in using SDL for this.
> SDL is only an "adapter" for the OS libraries (DirectX, OpenGL, etc).
> So I don't want to use SDL as the graphic engine for the VM.
>

Yes, in my tests, blitting to the display took the longest time, and
perhaps this is not possible to optimise without using a bitmap
organisation that matches the display surface (which is was SDL does).
But is should be possible to convert forms in the Squeak image to the
format of the display, e.g. on startup or on the fist use of the form
(or simply manually in the application code). This this approach can
be a promising one, given how well Pygame performs.

> My intentions are at first much much less ambitious: collect a series
> of packages for game development in Squeak, and put them together,
> with tutorials and examples.
>

Yes, we should get a collection of code examples.

> I started the SDL bindings because I didn't found the ones mentioned in:
> http://minnow.cc.gatech.edu/squeak/1833
>
> Regards,
> Diego,-
>

Best regards, Micke



More information about the Squeak-dev mailing list