Programmers Guide » History » Version 3

Jordi Rovira, 11/21/2016 07:42 PM

1 1 Jordi Rovira
<h1>Programmers Guide</h1>
2 2 Jordi Rovira
3 3 Jordi Rovira
4 2 Jordi Rovira
5 2 Jordi Rovira
<p>The system is structured as an Unreal plugin with two additional Unreal modules: one for the editor and one for the runtime. These modules use external libraries for the Mutable runtime, which is a standalonw library with no dependencies.</p>
6 2 Jordi Rovira
7 3 Jordi Rovira
<p><img alt="" data-rich-file-id="5" src="/system/rich/rich_files/rich_files/000/000/005/original/Mutable-Architecture-768x808.png" style="height: 606px; width: 576px;" /></p>
8 2 Jordi Rovira
9 3 Jordi Rovira
<h2>Folder Structure</h2>
10 2 Jordi Rovira
11 3 Jordi Rovira
<p><img alt="" data-rich-file-id="4" src="/system/rich/rich_files/rich_files/000/000/004/original/Mutable-Unreal-Folder-Structure-1.png" style="width: 520px; height: 509px;" />This is the basic folder structure of an Unrela Engine game that uses Mutable. The hierarchy only shows the relevant folders for Mutable source code.</p>
12 2 Jordi Rovira
13 2 Jordi Rovira
<p>The folder &ldquo;source&rdquo; is optional and it contains the source code of the standalone runtime and tools libraries. These are already included in the &ldquo;lib&rdquo; folder as precompiled binaries for each supported platform, with the required headers in the &ldquo;include&rdquo; folder. For the debug version, symbol pdb files are also included.</p>
14 2 Jordi Rovira
15 2 Jordi Rovira
<p>In case the source of the&nbsp;standalone libraries needs to be modified, a Visual Studio solution is included inside source-&gt;project-&gt;vs2015 to rebuild them. Both &ldquo;release&rdquo; and &ldquo;debug&rdquo; configurations should always be rebuilt to avoid desynchronising the binaries. After that the libraries and include files need to be updated using the script &ldquo;DeployFromSource.bat&rdquo; in the mutable folder.</p>
16 2 Jordi Rovira
17 2 Jordi Rovira
<p>The &ldquo;source&rdquo; folder may also contain the source code for the standalone tools for Mutable. These tools are not required for normal Mutable usage but they can be very helpful to&nbsp;debug and profile your project.</p>
18 2 Jordi Rovira
19 2 Jordi Rovira
20 2 Jordi Rovira
21 2 Jordi Rovira
<h3>Internal Design</h3>
22 2 Jordi Rovira
23 2 Jordi Rovira
<p>Mutable is designed around the concept of virtual machine. Customizable objects are decomposed in series of intructions that are optimised to build the instances on different situations. These instructions operate on mesh fragments, images and colours and they transform them by merging, blending, packaging texture coordinates etc.</p>
24 2 Jordi Rovira
25 2 Jordi Rovira
<p>The system relies heavily in a pre-process of the object graph that generates code for a virtual machine whose operations involve mesh fragments, images, etc. This object-construction code is then optimised for every use case of the model so that the optimal process to construct an instance is found.</p>
26 2 Jordi Rovira
27 2 Jordi Rovira
<p><img alt="" data-rich-file-id="6" src="/system/rich/rich_files/rich_files/000/000/006/original/img_56f55d6a9b7b6.png" /></p>
28 2 Jordi Rovira
29 2 Jordi Rovira
<p>Mutable standalone model debugger and profiler showing the virtual machine code, the set of constant data (image blocks and mesh fragments), a preview object and texture layout and a simulation of the parallel construction of a model with its memory usage.</p>