This article ends the series. We will see an example on how to create a basic application without modifying the C++ code of the template Data Driven Application.

Table of Contents
Kigs framework proposes a template for Data Driven Applications. Data Driven Applications allow you to navigate between different screens (called Sequences) using mainly XML and/or Lua files. However, the Kigs framework remains a C++ framework and the development of a complete and complex application will probably require the writing of part of the code in C++.
Here is an example of a more complex Data Driven Application based on the Kigs framework:
Fun with YouTube Data API v3 (Public Data) and Kigs Framework

See Kigs framework GitHub Getting Started Wiki page for details.
To generate a new Data Driven Application, go to kigs/projects folder and launch (double click) CreateNewDDProject.vbs script. Enter a project name in the dialog box and click OK. Add your project to the CMakeFile.txt, then go to kigs/scripts and launch one of the scripts to generate the desired platform solution.
A default new Data Driven Application created with the CreateNewDDProject.vbs contains some asset files (data) in kigs/projects/YourProjectName/Ressources folder. A Ressource manager called at build time will process the ressources in this folder based on the rules from the AssetManagerRules.json file.
The main files are:
- AppInit.xml: Contains main window / screen information
- LaunchScreen.xml: contains the first launched screen (default is a Kigs Logo with fade in/out)
- Screen_Main.xml: contains the second launched screen (default is a blue screen)
kigs/projects/YourProjectName/Headers folder contains two header files:
- KigsApplication.h: some defines you generally don't have to edit
- YourProjectName.h: declaration of the application class
kigs/projects/YourProjectName/Sources folder contains only one file:
- YourProjectName.cpp: definition of the application class
After adding new files to Headers or Sources folder, use the scripts in kigs/scripts to generate again the desired platform solution.
If you want to add some assets to your application, you probably want to add them in the Ressources/toPack folder, so they will be packed in a kpkg archive file and moved to the assets folder.
When the application is launched, a GlobalConfig file is searched and if available, imported. The global config file name is first search for current platform using: GlobalConfig + platform name + .xml.
i.e.,: GlobalConfigWin32.xml, GlobalConfigAndroid.xml ...
If not found, "GlobalConfig.xml" is searched.
This file can be used to create application wide instances. This file is not mandatory. There's no GlobalConfig file in Sample8 example.
AppInit.xml file is mandatory. It is used to initialize Window
and RenderingScreen
.
Here is the AppInit.xml file used for Sample8
:
="1.0"
<Inst N="Sample8" Type="Window">
<Attr N="Position" V="[-1,-1]"/>
<Attr N="Size" V="[1280,800]"/>
<Attr N="FullScreen" V="false"/>
<Attr N="ShowMouseCursor" V="true"/>
<Inst N="theRenderingScreen" Type="RenderingScreen">
<Attr N="Size" V="[0,0]"/>
<Attr N="DesignSize" V="[1280,800]"/>
<Attr N="BitsPerZ" V="32"/>
<Attr N="Brightness" V="0"/>
<Attr N="BackDropColor" V="[0.0,0.0,0.0]"/>
<Attr N="VSync" V="true"/>
</Inst>
<Attr T="string" N="LocalizationInitFile" V="InitLoc.json" Dyn="true"/>
</Inst>
Some options can be set through dynamic attributes on Window
instance:
<Attr T="string" N="FirstSequenceFile" V="FirstSequence.xml" Dyn="true"/>
XML File containing the first sequence to launch (default is "LaunchScreen.xml").
Bundle file can be used to indicate the path of a file using its name (not detailed here).
<Attr T="string" N="BundleFileName" V="files.bundle" Dyn="true"/>
File used to init FilePathManager
(not detailed here).
<Attr T="string" N="FilePathManagerInitFile" V="FilePathManager.json" Dyn="true"/>
Initialization file for localization manager (not detailed here, but Sample8
manages some localizations).
<Attr T="string" N="LocalizationInitFile" V="Localization.json" Dyn="true"/>
Load given package file (not detailed here).
<Attr T="string" N="PackageFileName" V="package.kpkg" Dyn="true"/>
Sequences can be seen as different sections of the application. A video game application for example, can have a splash screen, then an introduction screen, then a menu screen giving access to a parameter screen, the game itself and a credit screen... Each of those will be a sequence (or several sequences) in a Kigs Data Driven application.
Simple sequence can only be defined by a UI2DLayer
. Here is the default splash screen:
="1.0"
<Inst N="UILayer" T="UI2DLayer">
<Attr N="Size" V="[1280,800]"/>
<Attr N="Priority" V="0"/>
<Attr N="RenderingScreen" V="RenderingScreen:theRenderingScreen"/>
<Inst N="Interface" T="UIItem">
<Attr N="Size" V="[1280,800]"/>
<Attr N="Opacity" V="0.0"/>
<Attr N="Dock" V="[0.500000,0.50000]"/>
<Attr N="Anchor" V="[0.500000,0.50000]"/>
<Inst N="Logo" T="UIImage">
<Attr N="TextureName" V="Logo.png"/>
<Attr N="Size" V="[1280,800]"/>
<Attr N="Priority" V="50"/>
<Attr N="Dock" V="[0.500000,0.50000]"/>
<Attr N="Anchor" V="[0.500000,0.50000]"/>
<Attr N="KeepRatio" V="false"/>
</Inst>
</Inst>
<Inst N="FadeIn_Launcher" T="CoreSequenceLauncher">
<Attr N="StartOnFirstUpdate" V="true"/>
<Attr N="Sequence">
<
A node with an attached spot light is animated:
<Ref P="Node3D:Light" DontAddAsSon="true">
<Upgrd N="PivotUp"/>
<Attr N="IsGlobal" V="true"/>
<Attr N="PivotAxis" V="[0.000000,0.000000,1.000000]"/>
<Inst Name="animateLightPos" Type="CoreSequenceLauncher">
<Attr N="Sequence"><
When compiled in Debug or ReleaseTools mode, an embedded instance inspector / editor is available by pressing CTRL + F1 keys.

You can inspect all CoreModifiable
instances in the application, search them using the Hierarchy / Filter text input.
For example, go to the online Sample8 version, press CTRL+F1, then in the Filter input type "button", then click on "camup_btn
" in the list and look at all the button attributes in the "Attributes
" window. You can then play with the size, position, color... of the button.
Find all the sample code from this wiki section in Sample8 project (browse the code).
- Kigs Framework Introduction (1/8) - Overview
- Kigs Framework Introduction (2/8) - CoreModifiable
- Kigs Framework Introduction (3/8) - Attributes
- Kigs Framework Introduction (4/8) - Methods
- Kigs Framework Introduction (5/8) - CoreItem
- Kigs Framework Introduction (6/8) - Signal, Slot, Notification
- Kigs Framework Introduction (7/8) - Lua Binding
- Kigs Framework Introduction (8/8) - Data Driven Application
- 17th June, 2020: Initial version
- 1st March, 2023: Article updated after framework refactory