Proper methodological approach for a beginner dev?

Started by Dunderbolt, May 29, 2026, 03:33:29 AM

Previous topic - Next topic

Dunderbolt

This is less of a hard specific issue, and this is more on the work process. I'm a complete beginner, even with any kind of programming in general. I'm digging around with KFM as a base to figure out how to make everything work, but when I look to other characters as ref; I see multiple CNS files—I assume this is for organizational or engine limitations—and I repeatedly find myself completely lost.
Even with KFM I'm having trouble, but the #1 thing I learned is that when learning, you usually understand it better if you can relate it to something.

The workflow I'm seeing it as is the Sprites -> Constants/States file -> CMD States first -> CMD Definitions last

You 'wire' the states in the CNS file to the CMD states first, and then you do the CMD definitions last. Or do I have it backwards?

A lot of the tutorials I found only tells you what to put and not WHY. I've just started first day, and the closest I have to a computer background is copy and pasting some javascript into a website I made with HTML and CSS.

I'm sorry if this is too vague, please forgive me on this.



XGargoyle

On the engine state flow, you have it basically in the wrong order.

The logic flows in this direction:

The user inputs a command and then goes like like this:
1. Command is recognized in the CMD file, which points to a particular state number
2. The state number is executed in the CNS file, where it indicates the animation number to be played (what is displayed), the code to be performed (what it does), and the sounds (what is listened)
2A. The AIR file contains the animation in which specifies the sprites of the SFF to be used, the timing and the hitboxes
2B. The SFF file contains the sprites and the Palette info (either embedded in it as in sffv2, or linked to an external ACT file as in sffv1)
2C. The sounds are played from the SND file
2D. The code to be performed is defined in the CNS (sometimes using the ST extension), and it's a finite state machine (FSM) in which it initializes a state and run only the specific code until that state is finished. Once the state is finished, it goes to another state, and the cycle starts again with different code.
Also, there is another set of states (the negative ones -1, -2, and -3) which run in parallel to the main FSM states. These negative states are running all the time and only executed when the conditions match (for example, playing a sound every time the character hits the ground). These code could have been added to the main FSM instead, but sometimes it's easier to do it in a global way than having to put the same code in every different state.

Regarding the code, it's basically a set of sctrl and triggers: sctrl (State controllers) are WHAT needs to be done, while triggers define WHEN to do it.


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!

beterhans

Quote from: Dunderbolt on May 29, 2026, 03:33:29 AM
This is less of a hard specific issue, and this is more on the work process. I'm a complete beginner, even with any kind of programming in general. I'm digging around with KFM as a base to figure out how to make everything work, but when I look to other characters as ref; I see multiple CNS files—I assume this is for organizational or engine limitations—and I repeatedly find myself completely lost.
Even with KFM I'm having trouble, but the #1 thing I learned is that when learning, you usually understand it better if you can relate it to something.

The workflow I'm seeing it as is the Sprites -> Constants/States file -> CMD States first -> CMD Definitions last

You 'wire' the states in the CNS file to the CMD states first, and then you do the CMD definitions last. Or do I have it backwards?

A lot of the tutorials I found only tells you what to put and not WHY. I've just started first day, and the closest I have to a computer background is copy and pasting some javascript into a website I made with HTML and CSS.

I'm sorry if this is too vague, please forgive me on this.

I made this for beginner
it's a practical approach, instead of learn the theroy 1st

https://www.youtube.com/watch?v=HHYRkaqvFmk&list=PLdEQ2Uq3HHramsbW8raOnWdPLfgesBwpW