Introduction
Most humans do make mistakes espceially in coding thus the code not working as intended. In large behaviors and codes it will be hard to find where the errors is.
How it works
1. the diagnosis variable is created to collect some bug info. The diagnosis variable is just another variable you create except you use it for diagnosis.
2. the diagnosis instruction to collect data is placed where the bug likely be.
3. Data is collected via the variable / attribute (design mode).
For example: diagnosis = this.ids_nxny[0-x][0-y];
4. the collected diagnosis data is displayed via drawings.
in some cases, no diagnosis vairable is needed. For example, the set boundary that renders and kills actors in any so-called endless scenes https://stencyl-nator.blogspot.com/p/endless-scenes.html The boundaries are named initile_xmin, initile_xmax, intile_ymax, initile_ymin
Diagnosis drawing help to detect and determine where the flaw is thus helps the developer fix faster. it is mainly used for large behaviors with possible errors which are difficult to located such as components of pathfinding.
this picture can also be found here. Stencyl-nator: pathfinding part 1: tile data to perimeter data (incomplete) (stencyl-nator.blogspot.com)
For example, this is the drawings of few lines of the perimeter data which will be used for pathfinding. to see whether the lines are placed between the restricted area and walkable area.
The diag_cam_x and the diag_cam_y applies when the scene is larger than the screen just like any scene in SAS: Zombie Assault 4 .
another possible example is the next step of the example which is processing and calculating path with the obtained perimeter data which is drawing the waypoints in actor behavior.
No comments:
Post a Comment