Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Scene Battle Flow Chart

Scene Battle Flow Chart

Description:
This tutorial was designed to not only show a detailed flow chart of what happens in the default battle scene, but describe every method, conditions and branches that happen in the battle.

If anything is incorrect, missing, etc., please let me know so I can fix it.
Flow Chart Image:
Link
Explanations:
Scene Battle Part 1
Methods
Method Name : main
What it does : This is the method called whenever you switch from scene to scene. Like all scenes, the main method sets up windows, spritesets, sprites, etc. Additionaly, in Scene_Battle, main sets up battle data such as the battle flags and enemy troop data. This method also calls upon start_phase1 (see Scene Battle Part II), then creates the main loop, which updates Input, Graphics, etc. data, and calls the update method every frame. Once this loop is broke, your windows and sprites are deleted, and post battle settings are set.

Method Name : judge
What it does : This method checks whether battle has ended in a victory, ended in defeat, or hasn't ended at all. It checks first if all the party members have been defeated, then if there are still enemy exist. If both party members haven't been defeated, and no members exist, it starts phase 5, the victory phase.

Method Name : battle_end
What it does : One of the last methods called in battle. It is called once it has been determined that battle ends in a win, loss, or escape. This clears up all battle settings, and returns to the map.

Method Name : setup_battle_event
What it does : This method simply sets up battle event interpreter that you set in the database under the troops tab. It is a semi-complex method to understand, but is solely responsible for setting up event command list as events do on the map.

Method Name : update (part 1)
What it does : Because of the way the flow chart is setup, this part of the update method actually doesn't do anything, because the conditional (1) is called first.

Method Name : update (part 2)
What it does : This part is responsible for updating the game, system and battle data and battle windows.

Method Name : update (part 3)
What it does : Once again, nothing is here because of the way I set up the flow chart. Just another branch conditional 4 to 5.

Method Name : update (part 4)
What it does : This next part decreases the wait count if one is set. However, if a wait count is set and greater than 0, the method ends processing here until next frame.

Method Name : update (part 5)
What it does : The final and most important part of the update method. Once all those annoying conditions, wait flags, etc. have been checked, we start branching off here into sub-sections of the battle. Depending on the @phase, this method branches into sub-methods for further processing.
Conditionals
Conditional ID :
What it does :
Branches
Branch ID :
What it does :

Scene Battle Part 2
Methods
Method Name :
What it does :
Conditionals
Conditional ID :
What it does :
Branches
Branch ID :
What it does :

Scene Battle Part 3
Methods
Method Name :
What it does :
Conditionals
Conditional ID :
What it does :
Branches
Branch ID :
What it does :

Scene Battle Part 4
Methods
Method Name :
What it does :
Conditionals
Conditional ID :
What it does :
Branches
Branch ID :
What it does :
(My computer is buggy. Will post all explanations soon.)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top