Skip to content

DynamicAnimation

koschke edited this page Mar 21, 2021 · 6 revisions

Use case: Visualizing dynamic calls for only one version of a software

IMPORTANT NOTE: This page needs update to integrate JGL

Preparing the scene

You will find a Unity scene prepared for animating the dynamic calls of a single version of a software in Assets/Scenes/Dynamic.unity.

If you want to create your own scene, follow steps described next.

Preparations shared with non-animated code cities

Take the steps that are required for non-animated code cities for a single version of a software first.

Preparation specific this use case

Add an empty game object to the scene. Add a component SEEDynCity to this game object.

Configure the SEEDynCity

Select your game object in the hierarchy. Make your adjustments to the component SEEDynCity in the inspector that are described for software cities for static information of a single version.

In addition to that, you should select the directory in which your data files are located as Data path prefix. The meaning of GXL file and CSV file is described elsewhere. The only specific attribute you need to set is the path to the file containing the dynamic information as the attribute DYN file.

After you finished your settings, you can press the Load City button to create the city. Then you can start the game.

Playing the game in a DYN City

You can freely navigate within the scene as normal. To start the animation of the dynamic calls, hit the Enter key. Then press key + to move one step forward in time or key - to go one step back. To exit the animation, you simply press the Enter key again.

Key Effect
Enter toggle execution
+ one step forward
- one step back

Playing the game in a JGL City

There are two different modes: manual and automatic. In manual mode, the next line is executed on demand. In automatic mode, the execution continues until the last (or first) statement is reached or the mode is exited. To toggle between both modes, use key F. The inital mode is manual.

Controls in automatic mode:

Key Effect
I toggle automatic/manual execution mode
O toggle execution order (foward/backward)
arrow down half the execution speed
arrow up double the execution speed

Controls in manual mode:

Key Effect
I toggle automatic/manual execution mode
B execute until next breakpoint is reached
# execution is back to very first statement
< execute previous statement
> execute next statement