![]() |
Genusis beginner guide. - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Genusis beginner guide. (/showthread.php?tid=995) |
Genusis beginner guide. - genusis - 09-06-2007 Ok I am going to cover or at least try to cover the stuff people don't understand when they first come here. The other one only covered ip address settings, the way the server connects to the client, and what it was coded from. I think that was all of it last time I looked. well here is the first part of the tutorial kind of lame but at least it goes into detail. Welcome to my beginner tutorial. I will introduce you to what each separate folder mirage source starts out with is for. there is 5 folders in the client side and 5 in the server side mattering on if you have an interface folder or not for the client. If you do there will be 6 folders , but I'll talk about them all. CLIENT SIDE: Gfx= this is the folder that holds all your games playing pictures like the character, the tiles they walk on, Spell animation, Spell icons, Item pictures and more. Logs= This is where your client stores its error information, and player chat information. This is truly not really needed, but that's up to you. Music=If you don't know what this is ill slap you so hard your children's children wont have babies, But if you don't this is the folder that holds the sounds in the game on on the client like the special clicking noises. Interface= This folder is for Menu animations and looks its where you store the pictures that make your client look unique, or could be used for really cool flash animation main menus and options {YAI BABY!}. Maps= This is where all of your map data gets stored. this is the maps that your person who's playing on the client gets saved for so loading is faster next time and helps save space for the server to load it for other users. Src= This is the folder that contains the source code this is the stuff you will be editing and the stuff i will be talking about in this long tutorial for beginners. SERVER: Accounts= This is where all the accounts your users and you make are stored. you can edit them randomly, make your character a god, and so on. Logs= See client logs definition. Data=This is your most important folder for your game. this makes your server the most important part, and it helps keep people from cheating because they can't get to it if you have the server. All what is in here is the data on everything except the maps, and charters. This folder contains information about your items what animations and how much damage spells do, and how much def armor adds and so on. Maps= this is the server side maps these are the maps that get saved and transferred to the client side maps if changed the client side maps get saved over. sorted by number usually. Src= This is the special source you have to have in order to start a game its involves what is in your game as what each thing can do giving everything limitations, and also is a safe guard to help stop people from cheating. --------Client/Server Frm's---------- frmserver and stuff like it are just forums filled with buttons and text that work along and slowly activate the code. by pressing exit you leave. by pressing play you go to the next on and so on. DirectX here is also used for showign animated pictures or the game screen of course on something like frmmirage. It also has loading bars and other things. but they can not run by them selves without just a bit of gamelogic code or any kind of code that tells and sets limitations. Re: Genusis beginner guide. - Robin - 09-06-2007 It would help if you knew how to spell >.> Or use Bold to set out the sections. Or knew what you were on about... But overall its an ok idea... just needs some more meat on it. Re: Genusis beginner guide. - genusis - 09-06-2007 correct me if i get something wrong please and thanks oh and once I'm finished mapping everything ill go back and do the bold and also spell check it,but first I'm trying to finish it. I was playing on doing it in the beginning sorry. -----------Client Side source------------- -------ModClientTcp------- This is the most important source of the client by my mind of thought. This is the part that reads the game ip address and games port to connect it to the server. Code: Sub TcpInit() it also destroying the connection if its invalid or no connection is detected. Code: Sub TcpDestroy() This folder has a buffer system built in that allows an almost equal buffer towards all the players. Code: Sub IncomingData(ByVal DataLength As Long) more data back. Code: Sub SendLogin(ByVal Name As String, ByVal Password As String) ----------ModConstants----------- mod constant holds all of the special paths , ip, port, character speeds, player/npc contants,directions,item,tile,character size, time, admin, and map constants. some examples. Code: ' Winsock globals --------ModDatabase--------- This is the mod that makes sure the files exist, It makes ,open, or over writes logs, saves the local maps, and revises the maps as well. example code. Code: Public Sub AddLog(ByVal Text As String) This mod just declares functions which run the game and client with otu them it probably would not run at all. example code Code: ' Sound declares --------ModDirectX--------- This is the first and second most important function to playing any game. it defines where everything should be placed and where it should stay as what color it is and stuff. also decides on certain variables like animations 2d and 3d. Sample Code: Public Sub InitDirectX() ----------ModGameLogic------------- This mod is an important mod as well it tells the functions of what everything on the client side does as well as something things from the server side which the server is also needed as well to communicate and restrict and allow the client to do what it wants. It controls Main functions as well as status's and sends them as a string or any variable you want it to send as. sample code Code: Public Sub BltFringeTile(ByVal x As Long, ByVal y As Long) ----------ModGlobals------------ This mod is used for certain variables. with out this the system would not know what or how much a certain thing is or how to read it as so it throws errors at you like my printing machine throws middle fingers. sample code Code: ' Used to check if in editor or not and variables for use in editor --------ModHandleData----------- kind of simulate to another thing but its more specific to what it sends. its calculate the amount of bits to send and what to send them as and such. It is the packet area for those who cant find the packets when your searching look here or ill have a monkey bit your arm off. sample code Code: ' ::::::::::::::::::::::::::: ---------ModSound--------- If you don't know what this is for you deserve a swift kick in the nutz. but it Ok some people cant hear but see so ill describe it anyways. this is the thing that plays and sends sound animations in the game. could be used to make your people magically talk instead of text. sample code. Code: Public Sub PlayMidi(Song As String) -----------ModText------------ Some people may think this is for special variables at first, but your wrong. this is the area that defines and transfers text though out the game from player to player to npc to player.Basically controls fonts color and stuff. sample code Code: Public Sub SetFont(ByVal Font As String, ByVal Size As Byte) just like modglobal but these are allot less important. these are the variable settings for the str def or anything you want in your game but they don't run the game it self. sample code. Code: Type PlayerInvRec Re: Genusis beginner guide. - William - 09-06-2007 Im sorry but I will not give it time to read it unless it uses code tags, and bold text for headings and such. Very hard to navigate through it now. Re: Genusis beginner guide. - genusis - 09-06-2007 --------SERVER SIDE----------- --------ModConstants-----------same as clients modconstants just with a few special constants in there for the server like the log constants. sample. Code: Public Const GAME_WEBSITE = "Http://www/miragesource.com" ---------ModDatabase-----------The servers database is a bit different it is something that is used to save and load everything, from the people to the map tiles and so on. It also give new special functions like getvar and putvar. sample codes. Code: Public Function GetVar(File As String, Header As String, Var As String) As ----------ModDeclares----------- This is a small part of the server even thou its has three or more functions that the server has to use. sample code Code: ' Text API -------ModGameLogic--------exact opposite of what client gamelogic does. instead of sending and receiving data it is used to promote and controlled variable objects in the game, to get them and to find them as well. sample codes. [code]Function FindOpenPlayerSlot() As Long Dim i As Long FindOpenPlayerSlot = 0 For i = 1 To MAX_PLAYERS If Not IsConnected(i) Then FindOpenPlayerSlot = i Exit Function End If Next i End Function Function GetPlayerDamage(ByVal Index As Long) As Long Dim WeaponSlot As Long GetPlayerDamage = 0 ' Check for subscript out of range If IsPlaying(Index) = False Or Index MAX_PLAYERS Then Exit Function End If GetPlayerDamage = Int(GetPlayerSTR(Index) / 2) If GetPlayerDamage 0 Then WeaponSlot = GetPlayerWeaponSlot(Index) GetPlayerDamage = GetPlayerDamage + Item(GetPlayerInvItemNum(Index, WeaponSlot)).Data2 Call SetPlayerInvItemDur(Index, WeaponSlot, GetPlayerInvItemDur(Index, WeaponSlot) - 1) If GetPlayerInvItemDur(Index, WeaponSlot) Re: Genusis beginner guide. - genusis - 09-06-2007 know I'm going to show you how to create your first character, make it a mod then make your first map. (Thanks to cruzn for given me the ideal and for going though and fixing my spelling errors when he gets the time.) first step is to start up your server, Then to start up your client. find the button or word that says create new account. second step create an account. first you create it using any name or letters/numbers you want to since its up to you. my example Code: user name bob password give third step is to edit your account. you open up your server folder and then open up accounts find your characters name and open that in word pad. In here you can change any of your stats to what you want but its no fun then. well GO TO ACCESS AND CHANGE IT TO 4 fourth step once edited save it. shut down your server and start it back up again. know enter the game and you will be the head admin. once here you go and create a character by selecting new character and then naming him and stuff. It will kick you out after it is done. just log back on and then select use character. once on the game it self type /admin to see if you where successful other wise you need to go back and do step 3 again. fifth step once it shows you a list of option type in /mapeditor and the map editor will appear. sixth step Ok know is the time you get to play around with the animations. you should be able to figure out what they do on your own from here. but once you are done and you want it to look the way you made it press send it will save your change of items or npcs. its not hard from there out everything else is really easy to understand how to use. Thanks for reading the map and admin setting guide I hope it at least helped you out. |