Gw Temp

Menu

Tutorial - 'Online Games with Toolkit' by Guest

An item about RPG Toolkit posted on

Blurb

A guide to help start you up with making online games in RPG Toolkit

Body

Before you read this, please keep in mind this is a really hard thing to do, and I myself am still trying to get it down. Don't get too frustrated if you don't understand it, cause it can be damned hard.
_______________________________________________
Making an online game with the Toolkit, or any platform or language, is MUCH harder than you would think. Most people think that you can just set the plugin in the toolkit and click a check box that says "Online Game" or something. But it's not that easy. We really wish it was, but it isn't. This little turorial won't explain every part about making multiplayer boards, because that would just be way too damn much.
First you need the plugin. Head over to http://mrgoldsoft.mysticsoftware.net, go to the Plugins section and get the Mutliplayer plugin. Make sure to read the readme good, and do exactly like it says.
Once you get it set up, you should make a new testing game, just to play around with.
After that, you can open the Program Editor and start with your online stuff. The plugin comes with a Server program, so make sure you run that before you start. When you connect with the plugin, you need an IP address. To find out what yours is, go to Start> Run> Type "Command". When that comes up, you should just be able to type "ipconfig" and it will say IP Address....................#######" When you run the server, the Port! is 100. So if your IP was 67.1.46.38, your connection command should look something like this.

#wsconnect("67.1.36.38","100")

Now on to the hard part...ugh.
This plugin is set up in a somewhat confusing way. You define a method. When the client recieves data, it sends it to that mehtod, and runs it. Yeah. Already confused, eh? Well, that method can be a number of things. This example will just show you how to make an MWIN display text sent, then allow you to send text back, making a simple chat room. Your method must have nothing more than a simple #command(literal_variable$)...

<---Methods.prg--->
#method Recive(data$)
{
#mwin(data$)
#wait()
#prompt("Please send a message back!",message$)
#wssend(message$)
}
<--- End of Methods.prg -->

It's pretty simple, there. You should also set an activation key to run something like this:

<--- Send.prg --->
#prompt("Type a message.",send$)
#wssend(send$)
<--- End of Send.prg --->

And there you go. You have a simple, two way chat room.

But now you'll probably want to get mutliplayer boards. Well, that'll be for you to work out. But really all you have to do is get a players location, send it. When another computer recieves it, make a multitasking item walk to that location.

Good Luck!