Subj : Several Baja questions
To   : Evan Elias
From : Digital Man
Date : Tue Aug 15 2000 07:05 pm

RE: Several Baja questions
BY: Evan Elias to All on Tue Aug 15 2000 09:59 pm

> I've been tinkering with the idea of porting my game DoorMUD to baja, sort o
> anyway.  It would work by having an external "server" program (ie, a standar
> EXE written w/ C++, that isn't a door) running in the background while playe
> are in the game.  A Baja "client" module would communicate with the server,
> using files for input and output.  I think this might have the potential to
> very efficient, since only one copy of the server would need to be running a
> any time.  So if 5 users were in the game, only 1 DOS program would be
> running, instead of 5.

Or perhaps even easier (but perhaps not quite as efficient), create a 32-bit
WinSock/telnet version. This could be Synchronet-specific (getting the socket
handle from XTRN.DAT) or better yet, DOOR32.SYS compatible (which is supported
by Synchronet, Mystic and EleBBS at the moment). This would still be a
single-instance per user, but the fact that it was 32-bit and used sockets
directly would improve the performance dramatically.

> However, I have a few Baja questions before I can get started on this:
>
> 1. How fast/efficient are the Baja file manipulation routines?

Only slightly slower than a native 32-bit application.

> When
> file-sharing is used, is it compatible with C's sopen function?

Yes.

> 2. How do I open files in binary mode?  Or is that the default for baja's
> fopen?

I believe (I don't have the docs in front of me), it only supports binary mode.

> 3. Which system variable stores the node number?

I believe it's _node_num (check DOCS\BAJA.DOC).

>  (I wasn't sure if
> _USERON.NUMBER was the node number or the account number)

That is the account/user number.

> 4. What happens when a user hangs up?  Does the module just quit?

Yes, unless the OFFLINE Baja function has been called.

> That woul
> be very bad for me, since the MUD needs to perform routines so that the play
> is no longer listed as online... is there a way to set a certain subroutine
> be called in case of a hang-up?

You can use the OFFLINE Baja function and check for disconnection manually I
think (_sys_status bit ON_REMOTE).

Rob

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net