So, in my spare time I've been working on a fun little project. I play on 
MUSHes (sort of like a MUD only more for RolePlay than hack and slash) a 
lot and I've always wanted to do a web character generator. My vision on 
how this works is basically that I have 2 databases. One that CFMX 
interfaces with (secure) and the other that the mush interfaces with 
(insecure), something like this:

CFMX <-> Secure db <-> Insecure db <-> TinyMUSH 3.0 patchlevel 4#1

TinyMUSH has the ability to interface with MySQL, but because you can't 
specify a password for the mush to log into mysql with, I've decided that 
this is a 'hostile' zone because of that. Which is why I call it an 
insecure database. So, basically all the stats of a character will be 
placed into the secure db. The insecure db will be quick snapshots or a 
transportation layer for the mush to interface with.

I still had one problem though. The data will remain in the transportation 
layer until something kicks off within the MUSH itself. How else would that 
data get sucked into the game? I kept thinking about it and ... well, I had 
two options. One, every time staff made a change to a character on the web, 
they'd have to type a command (like +synch) on the actual game. That's 
stupid and tedious. I needed a robot or something to interface with the mush.

I called upon one of my best friends in Atlanta, Don Stauffer (goes by the 
old Mush name of Hyperion) who works for 
<http://www.air2web.com/>air2web.com. Great guy, loves java stuff. Came 
from a 'C' background (self taught) and he taught himself java because the 
demands were high for it. He now writes java api's for wireless protocols 
for air2web.com. I asked Don if he could make me a java api that would 
allow me to use CFMX to telnet into the mush, kick off a few commands and 
logoff.  He finished it today and gave me a robot.jar file. This thing is 
*great*. I was able to put the jar file into my 
"CfusionMX\wwwroot\WEB-INF\lib" directory, hiccup the server and ... write:

<cfobject type="java" name="newRobot" class="com.don.robot.Robot" 
action="create">
<cfscript>
myRobot = newRobot.getInstance();
myRobot.login(myserver_name,port,'Javabot',bot_password);
myRobot.command('page todd=Booya');
myRobot.command('page todd=Tired of this crap, logging off..');
myRobot.logoff();
</cfscript>

The in game results:
JavaBot has connected.
JavaBot pages: Booya
JavaBot pages: Tired of this crap, logging off..
JavaBot has disconnected.

Is this not cool or what?! :) :) Now, ColdFusion MX can seamlessly handle 
the web chargen of the game and handle the synchronization of actual game 
data within the game (as well as recieve feedback on whether something was 
successful or not!).  In fact, because of how much I can do with the 
javabot api, I'm beginning to wonder if I need the insecure database at 
all.. I can just have the JavaBot set all the game attributes on the player 
object as needed.  We'll see...

I realize that a lot of people are wanting to learn flash for remoting, 
etc. However, if you get a chance to explore with ColdFusion MX and Java. 
Do it. It's worth every penny to explore and have fun with the 
possibilities of using CFMX and Java together.  You can use java to enhance 
/ extend your CFMX experience. Even if it's for something stupid and 
trivial as a game. :)

Hope this inspires someone to have fun... =)

~Todd



----------
Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/
Team Macromedia Volunteer for ColdFusion
http://www.macromedia.com/support/forums/team_macromedia/
http://www.devmx.com/

----------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to