[Twisted-Python] Reality Servers

Chris.Hadgis at mincom.com Chris.Hadgis at mincom.com
Sun Sep 2 19:41:31 EDT 2001

On Wed, Aug 29, 2001 at 09:24:33AM +1000, Chris.Hadgis at mincom.com wrote:

!> (1) 'pull string' of the John Romero action figure results in the 
!> broadcast messages appearing twice. Calls to broadcastToPair() appear 
!> calls to broadcast() do not. I don't know why. I changed the function 
!> the John Romero messages actually appear now. I don't know why 
!> won't work from the 'pull string' function.
!Interesting.  I'll look into it.

I have some more information about this. I know where the problem is, but 
I don't know the solution. I know *a* solution, but not if it is the right 
one :)

If I 'pull string' when the figure is in the room, I get the messages 
once. If I take the figure and 'pull string', I get the messages twice.

This is because broadcastToPair() sends the message to all containers 
associated with the figure's current location. If I leave the figure where 
it is, the containers are 'Room'. But when I take the figure the 
containers are 'Guest' and 'Room'.

My proposed solution is to not include the location's containers in the 
container list. I am not sure of all of the effects of doing this. I know 
when I do this that I get the messages once whether I have taken the 
figure or not. I don't know how to test this with multiple players :( on 
Win98. And I don't know the code well enough to understand the logic 
behind it.

I also think the set of broadcast routines should be standardised, 
especially at this early stage. That way, there will be some standards for 
TRDemo and Inheritance as well as any future games. Some broadcast 
routines just call others.

I do have plans to port the more common IF examples to TR (Golden Skull, 
Alice In Wonderland) and perhaps the Greedy Gargoyle from PUB :) when I 
run out of things I wish to do to TR.

The 'drop' routine for the figure also needs some work. If I drop it when 
I don't have it, I get the message (the self squeaks). If I take it and 
drop it, I don't get the message. All that is needed is a test to see if 
the current location is a guest and broadcast the message then. I don't 
know why there is a call to InappropriateVerb after the message.

Hopefully I will get some more time later to sort this out.


This transmission is for the intended addressee only and is confidential
information.  If you have received this transmission in error, please
delete it and notify the sender.  The contents of this e-mail are the
opinion of the writer only and are not endorsed by the Mincom Group
of companies unless expressly stated otherwise.

More information about the Twisted-Python mailing list