Games with Squeak

Bert Freudenberg bert at freudenbergs.de
Sun Nov 5 13:42:31 UTC 2006


Am 05.11.2006 um 12:27 schrieb Mikael Kindborg:

> Have also been experimenting with Tweak which is
> really nice, but as I understand it Tweak, like Morphic, uses standard
> Squeak Forms and Display to render graphics.

Tweak does not use Display directly. This allows for rendering to  
multiple display surfaces simultaneously, like when using Host  
Windows (a.k.a. Areithfa Ffenestri). Also, an experimental version of  
Tweak exists that uses Rome for rendering, although this also writes  
to Display in the end for now.

> What concerns me is the blit speed of Form and Display. Have searched
> the mailing list and the swiki and obviously there are lots of issues
> that have been up for discussion previously, like conversion between
> pixel formats, endianness, etc. Have seen mention of FXBlt,
> ExternalForm, and ExternalScreen, which seems to be in the Balloon3D
> package (which has been replaced by Croquet?).

No, FXBlt has been rolled into regular BitBlt. You can use BitBlt to  
render to any surface registered via SurfacePlugin. Like, RomePlugin  
registers Cairo surfaces that can be used as source or destination of  
BitBlt.

> I am confused about the current status of Squeak technologies for high
> speed graphics. From what I understand, Croquet is the most recent
> work in this area, based on OpenGL.

Yes, which also is a severe limitation for general use as there is  
one important platform lacking good general OpenGL support.

> I have found SDL to be a very good library, have been working with SDL
> in Python, using the Pygame library. It has good blitting performance
> (will post some performance tests later on, comparing Pygame to
> Squeak). Pygame/SDL uses bitmaps in the current format of the display
> screen, and I would like to look at how this could be done in Squeak.
>
> As I understand it, there are two ways of using libraries like OpenGL
> and SDL in Squeak:
>
> 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).

Actually, Tweak or Morphic run fine as an overlay inside an OpenGL  
window. That's how Plopp implements its UI, for example.

> 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.

Actually I think Forms are outdated now, you really want a vector  
graphics API. So what would be best IMHO is opening a host window and  
a canvas on its surface, then using canvas commands to draw onto it.  
I think we have almost all needed bits in place (Host Window Plugin,  
Rome Plugin), they just need to be integrated.

- Bert -



More information about the Squeak-dev mailing list