Bank / Pacman / Script Request

0 views
Skip to first unread message

Elliot Conte

unread,
Jul 20, 2011, 7:45:21 PM7/20/11
to emerso...@googlegroups.com
This video demonstrates how a couple systems can be combined to provide some useful functionality.

http://www.youtube.com/watch?v=gld5LzsRlUA

The clocktower is the bank.  Clicking on it and pressing enter will open up a bank interface for the user to create an account or log into a new account.  The bank interface supports the following:

Trading money, services or objects (although object ownership not defined does not provide a very useful function.  The bank simply makes a queryable record of the exchange, the same with services).
For trading, the trade can be synchronous or asynchronous.  The user who did not initiate the trade is presented with a GUI describing the trade and allowing the user to accept or reject the trade.  
The user's account balance is then immediately adjusted on their bank GUI.

Giving of those same things.  This does not require approval of the other user.

Logging out (as well as logging in and account creation).

Registering of an object as owned by an entity.

Most of these can be done easily through the GUI, however they are all supported through programmatic interaction with the bank as well. In the video you see both kinds of interaction.  The user clicks on the bank and manually enters in account information.  The pacman server on the other hand programmatically creates an account, checks if the user is indeed logged in with the provided username, opens a trade window with the user and then checks to see if the trade is successful.  The user manually clicks to agree on the fee of 10 neo shekels to play pacman.  

Programmatic interaction with the bank can be through manual message sending or through a class instance that wraps message sending for several useful bank functionalities (this class is used by the GUI).

Most of the bank operations return back through messages success or error and also accept callbacks functions to perform when these results are returned.  

So basically in the video the pacmanServer uses the bank to charge the user.  The pacmanServer does not have to know the user's password or information other than their account name.  It first asks the user to provide a bank account name, it then checks with the bank to verify that the user is indeed logged into that account.  If so the pacmanServer then sends a trade request for 10 neo shekels to the user.  If the bank sends back a trade approved message then the pacmanServer opens up a game of 3D pacman for the user to play.  The video shows this. 

The video does not demonstrate logging in and out of the bank account.  Error messages displayed when users try to log into an account with an incorrect password, when they are already logged into another account or another user is already logged into that account, or when they try to create an account when one of the same name already exists.  The bank system is fairly robust and even handles logging out for users when they disconnect from the space server.  It is actually quite easy to interact with it programmatically and I highly recommend it for games or other applications.  I can send you the files necessary to run a bank or just show you how to programmatically interact with the bank.  I have not yet written up a thorough description of all the message interaction the bank supports but it is pretty straightforward.  
Reply all
Reply to author
Forward
0 new messages