Pointers for on-line multi-user stuff.

Bert Freudenberg bert at impara.de
Mon Nov 15 17:58:37 UTC 2004


Am 15.11.2004 um 09:41 schrieb Blake:

> On Sun, 14 Nov 2004 15:10:05 +0100, Bert Freudenberg <bert at impara.de> 
> wrote:
>
>> Am 14.11.2004 um 13:20 schrieb Blake:
>>
>>> OK, I want to use Squeak on my website and I have some questions:
>>>
>>> 1. Can I serve a squeaklet from Apache like I would a Java applet? 
>>> Or do I have to use KomHttpServer? I would like to be able to 
>>> integrate the applets I write into my regular web-pages but I don't 
>>> want to switch from Apache
>>
>> Apache is fine. Squeaklets are all client-side. For example, 
>> Squeakland.org runs Apache.
>
> OK. The stuff on squeakland takes the whole page, though, at least 
> everything I've seen.

That's only because the HTML tag specifies width and height as 1024x768.

> It's possible to embed the Squeak plug-in onto, say, an existing web 
> page?

Yes, of course. Just specify a smaller extent.

>>> 2. Are there examples of multi-user squeaklet apps? I'm looking at 
>>> building: A MUD-ish thing, a site-specific IM, maybe a poker game. 
>>> Any tips on where to start?
>>
>> I'm not aware of any freely available example (*). But it's basically 
>> the same like you would do with Java applets. The server can embed a 
>> few parameters in the HTML tag which Squeak can read. Then the 
>> squeaklet would open a connection to the game server and you're ready 
>> to go.
>
> OK, so how about a pointer to classes? I see something called "Ma 
> client server". Which is apparently a requirement for Magma, although 
> Magma requires an older version of Ma...<sigh>

We're using a plain Socket connection ... underneath our proxy-based 
distributed object system (similar to meta sends in Jasmine).

>> (*) We used Squeak to build a multiplayer action game running in the 
>> browser. But since we sold that to a local cable company, it's not 
>> public (you would have to relocate here and subscribe to their 
>> service).
>
> Where do you live? Germany? I like Germany.

:-)

> But--Well, I guess the real question is, is there a difference between 
> building a squeaklet and building a regular Squeak app? I mean, if my 
> task is about user-interaction and client-server, then maybe the only 
> thing I have to worry about is connecting to the server?

Yes, that's about it.

The only other issue might be packaging your app+contents. The file you 
are giving as SRC is simply filed in, unless it ends in .pr in which 
case it is loaded as project (which might be sufficient for smaller 
stuff). Fortunately, the file-in format is quite flexible, you can put 
anything in there. I'd probably try to build a SAR 
(http://minnow.cc.gatech.edu/squeak/2938) and prepend a bit of code to 
load it via #scanFrom: (look at #fileInAnnouncing: to see what I mean).

To not have to load the whole app each time we actually installed a new 
image with our game preinstalled in addition to the default Squeakland 
image. The HTML page can have an "IMAGE" parameter that the plugin uses 
to determine which image to run.

- Bert -




More information about the Squeak-dev mailing list