Making an online RPG in the Moo series V2
Author: | TheAlee
|
Submitted: | 22nd March, 2004
|
Views: | 5468
| Rated: |
|
|
Yo, here is my version 2 of my article, hopefully i will be able to make things more clear here. EXTENSIONS YOU WILL NEED - MOO CLICK/GAME. STRING PARSER. INI.
START OF FRAME - add delimiter in string parser ","
REGISTER ---
- Connect
- When Player presses the register button we make sure he hasn't put null in the feilds... USERNAME <> "" etc.
- if the person has put realy details in the feilds then we send (PLAYER SEND - "USERNAME, PASSWORD". on subchan eg. (1)
SERVER
- When server recieves this (On recieve on subchan 1 Set it as String parser text)( Set ini group to "USERNAME", set item to password and set text to "PASSWORD" ) then send REGISTERED CORRECTLY on subchan 2.
- IF PLAYER TRIES TO REGISTER NAME ALREADY TAKEN... (set ini group to "USERNAME" set item to "PASSWORD" If item password is NOT NULL (<> ""). then we send Please choose another username (subchan 2).
PLAYER
-IF recieve "PLEASE CHOOSE ANOTHER USERNAME" then you could restart the frame, or you could just do nothing.
- IF recieve "REGISTERED CORRECTLY" then goto login screen...
LOGIN --------
- Connect
- When player clicks login we send "USERNAME,PASSWORD" but make sure he hasn't sent nothing, otherwise we will log him in as no-one...
SERVER
- recieve USERNAME,PASSWORD login? set ini group to USERNAME set item to PASSWORD, is PASSWORD = to what the player just sent? if so, we send "CORRECT, LOGGING IN..." If not, we send "PLEASE TRY AGAIN"
PLAYER
- if we recieve "CORRECT..." then jump to your next frame. if not, then just display "PLEASE TRY AGAIN"...
GAME -----
- Connect
- Sign into channel (game)
- set name (USERNAME)
- user is here? create "OTHER USER" and set alt value A to their id (PCU_ID)
- user joins? create "OTHER USER" do above...
DEAD REKONING METHOD---
NOTE - you should change this method depending on your game type and how many people will use it, below is a bad dead rekoning system...
- PRESSED left,right,up,down SEND XPOS,YPOS,DIRECTION (on subchan 3) IF YOU ARE USING MOOCLICK MAKE SURE YOU DO CHANNEL>>SEND not PLAYER>>SEND
- recieved on subchan 3? ID Of sender is = to alt value A of "OTHER USER" (set XPOS of "OTHER USER" to XPOS on the message, do the same with YPOS and DIRECTION)
NOTE - Always remeber, when you recieve the above always make it the string parser's sorce string.
LOGGING OFF
- Player leaves? ID of leaving player is = to "OTHER USER" then destroy "OTHER USER".
that just about covers the main idea of a rpg, always remeber to make sure you say "ID is = to alt value a of "other user"" otherwise MMF/TGF won't know which "OTHER USER" to update positions on.
any questions? please PM me!
- Alee
|
|
TheAlee
Registered 27/02/2003
Points 250
|