basic_concepts.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
  5. <meta property="article:modified_time" content="2025-11-27T16:23:47+00:00" /><meta property="og:title" content="Basic Concepts" />
  6. <meta property="og:type" content="website" />
  7. <meta property="og:url" content="https://docs.crownengine.org/html/latest/getting_started/basic_concepts.html" />
  8. <meta property="og:site_name" content="Crown 0.60.0 Manual" />
  9. <meta property="og:description" content="This page describes basic concepts and terminology commonly used when working with Crown. Project: A project in Crown is a folder that contains all the resources that describe your game. Resources are plain-text files (with some exceptions) identified by their relative path (t..." />
  10. <meta name="description" content="This page describes basic concepts and terminology commonly used when working with Crown. Project: A project in Crown is a folder that contains all the resources that describe your game. Resources are plain-text files (with some exceptions) identified by their relative path (t..." />
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  12. <title>Basic Concepts &mdash; Crown 0.60.0 Manual 0.60.0 documentation</title>
  13. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  14. <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  15. <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
  16. <link rel="shortcut icon" href="../_static/org.crownengine.Crown.svg"/>
  17. <link rel="canonical" href="https://docs.crownengine.org/html/latest/getting_started/basic_concepts.html" />
  18. <!--[if lt IE 9]>
  19. <script src="../_static/js/html5shiv.min.js"></script>
  20. <![endif]-->
  21. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  22. <script src="../_static/jquery.js"></script>
  23. <script src="../_static/underscore.js"></script>
  24. <script src="../_static/doctools.js"></script>
  25. <script src="../_static/js/theme.js"></script>
  26. <link rel="index" title="Index" href="../genindex.html" />
  27. <link rel="search" title="Search" href="../search.html" />
  28. <link rel="copyright" title="Copyright" href="../copyright.html" />
  29. <link rel="next" title="Importing Resources" href="../importing_resources/index.html" />
  30. <link rel="prev" title="Level Editor" href="level_editor.html" />
  31. </head>
  32. <body class="wy-body-for-nav">
  33. <div class="wy-grid-for-nav">
  34. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  35. <div class="wy-side-scroll">
  36. <div class="wy-side-nav-search" >
  37. <a href="../index.html">
  38. <img src="../_static/org.crownengine.Crown.svg" class="logo" alt="Logo"/>
  39. </a>
  40. <div class="version">
  41. Crown 0.60.0 Manual
  42. </div>
  43. <div role="search">
  44. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  45. <input type="text" name="q" placeholder="Search docs" />
  46. <input type="hidden" name="check_keywords" value="yes" />
  47. <input type="hidden" name="area" value="default" />
  48. </form>
  49. </div>
  50. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  51. <ul class="current">
  52. <li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
  53. <li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
  54. <li class="toctree-l1"><a class="reference internal" href="../installing_crown/index.html">Installing Crown</a></li>
  55. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Getting Started</a><ul class="current">
  56. <li class="toctree-l2"><a class="reference internal" href="create_new_project.html">Creating a new project</a></li>
  57. <li class="toctree-l2"><a class="reference internal" href="import_existing_project.html">Importing an existing project</a></li>
  58. <li class="toctree-l2"><a class="reference internal" href="level_editor.html">Level Editor</a></li>
  59. <li class="toctree-l2 current"><a class="current reference internal" href="#">Basic Concepts</a><ul>
  60. <li class="toctree-l3"><a class="reference internal" href="#project">Project</a></li>
  61. <li class="toctree-l3"><a class="reference internal" href="#resource-paths-and-names">Resource paths and names</a></li>
  62. <li class="toctree-l3"><a class="reference internal" href="#unit-and-components">Unit and Components</a></li>
  63. <li class="toctree-l3"><a class="reference internal" href="#unit-prefab">Unit Prefab</a></li>
  64. <li class="toctree-l3"><a class="reference internal" href="#world">World</a></li>
  65. <li class="toctree-l3"><a class="reference internal" href="#level">Level</a></li>
  66. </ul>
  67. </li>
  68. </ul>
  69. </li>
  70. <li class="toctree-l1"><a class="reference internal" href="../importing_resources/index.html">Importing Resources</a></li>
  71. <li class="toctree-l1"><a class="reference internal" href="../gameplay/index.html">Writing Gameplay</a></li>
  72. <li class="toctree-l1"><a class="reference internal" href="../deploying/index.html">Deploying</a></li>
  73. <li class="toctree-l1"><a class="reference internal" href="../reference/index.html">Reference</a></li>
  74. <li class="toctree-l1"><a class="reference internal" href="../lua_api.html">Lua API reference</a></li>
  75. <li class="toctree-l1"><a class="reference internal" href="../glossary.html">Glossary</a></li>
  76. <li class="toctree-l1"><a class="reference internal" href="../copyright.html">License</a></li>
  77. <li class="toctree-l1"><a class="reference internal" href="../hackers/index.html">Hackers</a></li>
  78. </ul>
  79. </div>
  80. </div>
  81. </nav>
  82. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  83. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  84. <a href="../index.html">Crown 0.60.0 Manual</a>
  85. </nav>
  86. <div class="wy-nav-content">
  87. <div class="rst-content">
  88. <div role="navigation" aria-label="Page navigation">
  89. <ul class="wy-breadcrumbs">
  90. <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
  91. <li><a href="index.html">Getting Started</a> &raquo;</li>
  92. <li>Basic Concepts</li>
  93. <li class="wy-breadcrumbs-aside">
  94. <a href="../_sources/getting_started/basic_concepts.rst.txt" rel="nofollow"> View page source</a>
  95. </li>
  96. </ul>
  97. <hr/>
  98. </div>
  99. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  100. <div itemprop="articleBody">
  101. <section id="basic-concepts">
  102. <h1>Basic Concepts<a class="headerlink" href="#basic-concepts" title="Permalink to this headline">¶</a></h1>
  103. <p>This page describes basic concepts and terminology commonly used when working
  104. with Crown.</p>
  105. <section id="project">
  106. <span id="id1"></span><h2>Project<a class="headerlink" href="#project" title="Permalink to this headline">¶</a></h2>
  107. <p>A project in Crown is a folder that contains all the resources that describe
  108. your game. Resources are plain-text files (with some exceptions) identified
  109. by their relative path (to the project’s root).</p>
  110. <p>You are free to organize resources in a project however you like. However, to
  111. avoid confusion it is recommended to put units in their own folder because
  112. they often consist of multiple files (e.g. a resource for a tree may consist
  113. of a <code class="docutils literal notranslate"><span class="pre">tree.unit</span></code>, <code class="docutils literal notranslate"><span class="pre">tree.material</span></code> and <code class="docutils literal notranslate"><span class="pre">tree.lua</span></code> files).</p>
  114. </section>
  115. <section id="resource-paths-and-names">
  116. <h2>Resource paths and names<a class="headerlink" href="#resource-paths-and-names" title="Permalink to this headline">¶</a></h2>
  117. <p>All paths in Crown are unix-style (forward slashes). Only canonical/normalized
  118. paths are allowed.</p>
  119. <p>Resources in a project are identified by their relative path to the project’s
  120. folder, without extension.</p>
  121. <p>For example, to refer to the unit named “units/player/player.unit” you will
  122. use the string “units/player/player”.</p>
  123. </section>
  124. <section id="unit-and-components">
  125. <h2>Unit and Components<a class="headerlink" href="#unit-and-components" title="Permalink to this headline">¶</a></h2>
  126. <p>Units are the fundamental building blocks in Crown. Units can be used to
  127. represent any object that exists in a game world - a character, a tree, a
  128. vehicle, a light etc.</p>
  129. <p>By default, units are empty. You add functionality to a Unit by adding
  130. Components to it. No component is mandatory, units can be just empty IDs.</p>
  131. <p>Crown includes a number of predefined components, some examples are:</p>
  132. <ul class="simple">
  133. <li><p><code class="docutils literal notranslate"><span class="pre">Transform</span></code> - specifies a position, rotation and scale in the world</p></li>
  134. <li><p><code class="docutils literal notranslate"><span class="pre">MeshRenderer</span></code> - draws a 3D mesh</p></li>
  135. <li><p><code class="docutils literal notranslate"><span class="pre">Actor</span></code> - specifies physics properties for a collider, such as mass, filter etc.</p></li>
  136. <li><p><code class="docutils literal notranslate"><span class="pre">Script</span></code> - adds logic via a Lua script</p></li>
  137. <li><p><code class="docutils literal notranslate"><span class="pre">Light</span></code>, <code class="docutils literal notranslate"><span class="pre">Camera</span></code>, <code class="docutils literal notranslate"><span class="pre">Fog</span></code>, <code class="docutils literal notranslate"><span class="pre">Bloom</span></code> etc.</p></li>
  138. </ul>
  139. <p>Components can be added or removed at any time in the editor or at runtime.</p>
  140. <p>Units support parent-child relationships, allowing complex hierarchies of
  141. objects to be built from many smaller units (e.g. a car with wheels, body,
  142. lights etc.).</p>
  143. </section>
  144. <section id="unit-prefab">
  145. <h2>Unit Prefab<a class="headerlink" href="#unit-prefab" title="Permalink to this headline">¶</a></h2>
  146. <p>Units can be saved to disk as a <em>.unit</em> resource, creating a prefab. Other
  147. units can then reference this prefab, instantly inheriting all of its
  148. components and hierarchy. Changes to a prefab are automatically propagated to
  149. every instance of that prefab.</p>
  150. <p>Unit Prefabs are created by saving existing units inside
  151. the <a class="reference internal" href="level_editor.html#level-editor"><span class="std std-ref">Level Editor</span></a>, or, more commonly, by importing them from
  152. a <a class="reference internal" href="../importing_resources/importing_meshes.html#importing-meshes"><span class="std std-ref">meshes</span></a> or <a class="reference internal" href="../importing_resources/importing_sprites.html#importing-sprites"><span class="std std-ref">sprites</span></a>.</p>
  153. </section>
  154. <section id="world">
  155. <h2>World<a class="headerlink" href="#world" title="Permalink to this headline">¶</a></h2>
  156. <p>A World is the runtime container that holds Units and other objects and
  157. advances the game simulation. When a World is running it:</p>
  158. <ul class="simple">
  159. <li><p>updates animations/audio/particles;</p></li>
  160. <li><p>steps physics and handles collisions;</p></li>
  161. <li><p>dispatches logic events to script components;</p></li>
  162. <li><p>renders the visible scene;</p></li>
  163. <li><p>etc.</p></li>
  164. </ul>
  165. <p>A World can be populated manually via code or automatically by loading Level
  166. resources into it.</p>
  167. <p>A game always has at least one active world. Multiple worlds can exist
  168. simultaneously (for example, one for the main game and one for a UI overlay),
  169. though this is uncommon.</p>
  170. </section>
  171. <section id="level">
  172. <h2>Level<a class="headerlink" href="#level" title="Permalink to this headline">¶</a></h2>
  173. <p>A Level (<em>.level</em> resource) is a saved collection of units, sounds and other
  174. objects.</p>
  175. <p>Levels are authored in the <a class="reference internal" href="level_editor.html#level-editor"><span class="std std-ref">Level Editor</span></a>. A world can load any number of levels
  176. at the same time, enabling complex multi-layered scenes.</p>
  177. </section>
  178. </section>
  179. </div>
  180. </div>
  181. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  182. <a href="level_editor.html" class="btn btn-neutral float-left" title="Level Editor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  183. <a href="../importing_resources/index.html" class="btn btn-neutral float-right" title="Importing Resources" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  184. </div>
  185. <hr/>
  186. <div role="contentinfo">
  187. <p>&#169; <a href="../copyright.html">Copyright</a> Except where otherwise noted, content on this page is licensed under a CC-BY-SA 4.0 Int. License.
  188. <span class="lastupdated">Last updated on Nov 27, 2025.
  189. </span></p>
  190. </div>
  191. Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
  192. <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
  193. provided by <a href="https://readthedocs.org">Read the Docs</a>.
  194. </footer>
  195. </div>
  196. </div>
  197. </section>
  198. </div>
  199. <script>
  200. jQuery(function () {
  201. SphinxRtdTheme.Navigation.enable(true);
  202. });
  203. </script>
  204. <!-- Theme Analytics -->
  205. <script async src="https://www.googletagmanager.com/gtag/js?id=G-XNVGCMNDZH"></script>
  206. <script>
  207. window.dataLayer = window.dataLayer || [];
  208. function gtag(){dataLayer.push(arguments);}
  209. gtag('js', new Date());
  210. gtag('config', 'G-XNVGCMNDZH', {
  211. 'anonymize_ip': true,
  212. });
  213. </script>
  214. </body>
  215. </html>