08-08-2006, 02:06 AM
Firstly, what is Mirage Source? Mirage Source is a ORPG Engine programmed in Visual Basic 6.0. In order to make best use of Mirage Source, you'll need a copy of Microsoft Visual Basic 6.0, here after referred to as "VB6".
VB6 will allow you to edit the source code, and compile it into a .exe application for other people to use. VB6 is considered "abandon ware" but we'll take no requests as to ware to download VB6 with bit-torrent or P2P sharing program, or any otherwise illegal methods of obtaining VB6. So, go to eBay.com or Amazon.com and purchase a new or used copy if you don't already own VB6.
Back to Mirage Source; Mirage consists of source code for two stand alone applications, a client, and a server. The client is the application that you will distribute to other players so that they can play your game. The server is the application that you'll run, from which the client connects to.
Changing The IP Address
Lets start by finding out your IP address. If your on a Local Area Network, you'll have to go to http://www.whatismyip.com to find you ip address. If not you could just type "ipconfig" into the command prompt.
Now that you've got your IP address, open up the client side project. Now open modConstants. The first thing you will see is this:
Basically, just change "127.0.0.1" to the IP address given to you by whatismyip.com or by the command prompt. If you're only testing your client, you can just keep 127.0.0.1 as your IP address, as that's your local address. You will need to change the IP to your actual IP if and when you wish distribute your client.
Connection Errors, and Port Fowarding
If you experience server down errors, and you've changed the IP address that the Client uses, it's most likely due to 1 of 2 things. The first and easiest is check to make sure Windows Firewall (or some third party firewall) isn't blocking the program. If your firewall is allowing the client and server to communicate, then you probably have a router. You need to access your router control panel (usually done by typing your lan address into your browser). Once you access the router control panel, you need to find the section for port forwarding (my personal router's port forwarding is under a link called "Access and Gaming"). Forward the port that your game will be using. The default port is 7000, so that's the port you should use, unless you changed it in the code (client and server side changes need to be made to change your port).
The Client in a Nutshell
___*modClientTCP - Communicates packets with the server.
___*modConstants - Contains public Constants used be the client.
___*modDataBase - Loads and Saves maps used by the client.
___*modDeclares - Contains Declarations
___*modDirectX - Loads Surfaces into your game screen.
___*modGameLogic - Game Logic?
___*modGlobals - Public Variables used by Client
___*modHandleData - Handles packets sent from the server.
___*modSound - Handles music and sound effects.
___*modText - Formats text used in client.
___*modTypes - Contains Types
The Server in a Nutshell
___*modServerTCP - Communicates packets with the server.
___*modConstants - Contains public Constants used be the server.
___*modDataBase - Loads and Saves maps, items, spells, shops, npcs, accounts, and classes.
___*modDeclares - Contains Declarations
___*modGenerals - General Server "Things"
___*modGameLogic - Game Logic?
___*modGlobals - Public Variables used by Client
___*modHandleData - Handles packets sent from the client
___*modText - Formats text sent to the client.
___*modTypes - Contains Types
That's it for now.
Community Leaders, and Mirage Source veterans, please contribute. Quote this, and make any changes you feel need be made, and reply. This is a nice skeleton of a what could be a pretty good guide for starters.
VB6 will allow you to edit the source code, and compile it into a .exe application for other people to use. VB6 is considered "abandon ware" but we'll take no requests as to ware to download VB6 with bit-torrent or P2P sharing program, or any otherwise illegal methods of obtaining VB6. So, go to eBay.com or Amazon.com and purchase a new or used copy if you don't already own VB6.
Back to Mirage Source; Mirage consists of source code for two stand alone applications, a client, and a server. The client is the application that you will distribute to other players so that they can play your game. The server is the application that you'll run, from which the client connects to.
Changing The IP Address
Lets start by finding out your IP address. If your on a Local Area Network, you'll have to go to http://www.whatismyip.com to find you ip address. If not you could just type "ipconfig" into the command prompt.
Now that you've got your IP address, open up the client side project. Now open modConstants. The first thing you will see is this:
Code:
' Winsock globals
Public Const GAME_IP = "127.0.0.1"
Public Const GAME_PORT = 7000
Basically, just change "127.0.0.1" to the IP address given to you by whatismyip.com or by the command prompt. If you're only testing your client, you can just keep 127.0.0.1 as your IP address, as that's your local address. You will need to change the IP to your actual IP if and when you wish distribute your client.
Connection Errors, and Port Fowarding
If you experience server down errors, and you've changed the IP address that the Client uses, it's most likely due to 1 of 2 things. The first and easiest is check to make sure Windows Firewall (or some third party firewall) isn't blocking the program. If your firewall is allowing the client and server to communicate, then you probably have a router. You need to access your router control panel (usually done by typing your lan address into your browser). Once you access the router control panel, you need to find the section for port forwarding (my personal router's port forwarding is under a link called "Access and Gaming"). Forward the port that your game will be using. The default port is 7000, so that's the port you should use, unless you changed it in the code (client and server side changes need to be made to change your port).
The Client in a Nutshell
___*modClientTCP - Communicates packets with the server.
___*modConstants - Contains public Constants used be the client.
___*modDataBase - Loads and Saves maps used by the client.
___*modDeclares - Contains Declarations
___*modDirectX - Loads Surfaces into your game screen.
___*modGameLogic - Game Logic?
___*modGlobals - Public Variables used by Client
___*modHandleData - Handles packets sent from the server.
___*modSound - Handles music and sound effects.
___*modText - Formats text used in client.
___*modTypes - Contains Types
The Server in a Nutshell
___*modServerTCP - Communicates packets with the server.
___*modConstants - Contains public Constants used be the server.
___*modDataBase - Loads and Saves maps, items, spells, shops, npcs, accounts, and classes.
___*modDeclares - Contains Declarations
___*modGenerals - General Server "Things"
___*modGameLogic - Game Logic?
___*modGlobals - Public Variables used by Client
___*modHandleData - Handles packets sent from the client
___*modText - Formats text sent to the client.
___*modTypes - Contains Types
That's it for now.
Community Leaders, and Mirage Source veterans, please contribute. Quote this, and make any changes you feel need be made, and reply. This is a nice skeleton of a what could be a pretty good guide for starters.