YesNoOk
avatar

Documenting and updating our template (Read 6010 times)

Started by JustNoPoint, June 20, 2014, 09:25:19 pm
Documenting and updating our template
#1  June 20, 2014, 09:25:19 pm
  • ******
    • www.justnopoint.com/
I'd like to discuss what the best way to document Ryu for new creators and old alike would be.

Here is an example:
Spoiler, click to toggle visibilty

I am curious if each part of the code should be documented to explain what it does or means. As far as assuming people are familiar with the source of course. If you have never played a SF game we will not be discussing the parts that deeply!
Perhaps the coding should only be documented in a dedicated documentation thread to add links like this:
You will find this part in ryu.command
  • [Command]   
  • name = "x"     Name of the command. Could be changed to "Light Punch" or something but in this instance it'll stay "X"
  • command = x  Says that pressing x initiates the command
  • time = 1    You have 1 tick to complete this command

You will find the following lower down the ryu.command file under the [Statedef -1] area
  • ;Stand Light Punch
    anything after ";" is not read in MUGEN
  • [State -1, Stand Light Punch] 
    name of state
  • type = ChangeState 
    you are changing the state of the character
  • value = IfElse(P2BodyDist X > 12,200,205)
    Ryu has a near LP and a far LP, had he only had 1 LP you would have merely put value = 200
    IfElse means MUGEN will choose one, or the other depending on the following criteria
    P2BodyDist tells how far away the character is to Ryu. In this case if Ryu is greater than 12 pixels away from the opponent then hitting "x" initiates state 200, if less than 13 pixels away Ryu will initiate state 205 which is his Close Range Standing LP attack, the elbow
  • triggerall = command = "x" && command != "holddown" && statetype != a
    This triggers when the following all occur (are true)
    command = "name of move given earlier "x""
    && means "and" this means all these these listed must be true at the same time
    command != "holddown" does not work while holding down, which is the name of the command holding down (duh)
    &&  statetype  != A     means it cannot be done in the air
  • trigger1 = ctrl
    You must always have at least one trigger 1, you do NOT have to have triggerall, this means the move can only trigger if all the triggerall parameters are true and you also have control of your character

The following is found in basics.st

  • [Statedef 200]
      This is the default state number for a Standing Light Punch in MFG p SF
  • type    = S                       
    Stand     
  • movetype = A                 
    Attack   
  • physics = S                     
    Standing
  • juggle = 1                       
    I think this will be removed anyway as I'll have to code in a custom juggle system
  • velset = 0,0                    
    No velocity is set in either [x,y] directions
  • ctrl = 0                           
    0 means does not have control
  • anim = 200                    
    directs to animation 200 in the air
  • poweradd= 10               
     How much power is given from using the attack *note to self, I need to change these for Ryu for if he hits or misses
  • sprpriority = 2               
    Makes the sprites appear in front of priority 1(jumping) and 0(standing/crouching) sprites
  • faceP2 = 1                      
    1 makes the character face the opponent during this attack

I'm kind of thinking this would be the better way to approach this. Perhaps saving what I post on the forum as html as well so that I can add it to Ryu in a documentation folder. The old Mugen Code tag would be great right about now!

Comments? Suggestions?
Last Edit: June 20, 2014, 11:41:20 pm by Just No Point
Re: Documenting and updating our template
#2  June 22, 2014, 11:20:26 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
You are basically posting the content of Elecbyte's docs there... is it worth documenting every line?

I would document only the necessary parts, as in the specifics of the full game environment, but documenting that a semicolon is used to comment something out I find it ridiculous and a real waste of time/efforts

just my 2 cents
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Documenting and updating our template
#3  June 22, 2014, 01:40:53 pm
  • ******
    • www.justnopoint.com/
Semi colon thing is over doing it, yes. I just wanted something for each line of code :P

Keep in mind I'm hoping that this helps people that have never tried to code before participate. Some of this stuff I even missed when I was looking for more info on it because info is strung across all kinds of pages of DOCs. It is also a way for me to keep pushing this stuff in my own head. Because I'm rereading everything I'm linking to as well.

Anyway, it's not like I'm going to do this with every line of code. I'm thinking to do this with the rest of the LP code. And a few snippets of code from some other basics that get different lines of code added.

I might want to separate the documentation into the file names found in Ryu; IE Basics.st, ryu.command, constants.cns, etc and make a sticky post that harbors links to each part. Also giving a list on the standards being used in the sticky.

@Loona: You're just as ridiculous about this stuff as I am. You have any input?
Re: Documenting and updating our template
#4  July 11, 2014, 01:47:12 am
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
All that comes to mind right now is don't repeat comments in the same file - it's OK to be detailed early on, but after that just comment what's different from what was already commented.
Re: Documenting and updating our template
#5  July 11, 2014, 02:09:15 am
  • ******
    • www.justnopoint.com/
That's the plan.

This slowed down because there is a ton of stuff being added to the basic setup for all moves due to coding the config file. I should stick with my guns and wait till he's more complete to document.

Another thing I intend to do will be make a quick view on standards in the coding. For people familiar with coding it will explain what must be kept in what situations. Like the universal hitpauses I found for certain attacks, JZ's coding that is used to make the hit pause pause on a later frame than the one that connects, etc