| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <!-- |
| 4 | Define the level properties. See |
| 5 | https://castle-engine.io/creating_data_levels.php |
| 6 | for extensive documentation of available properties, in short: |
| 7 | |
| 8 | - name: used to refer to this level from ObjectPascal code, |
| 9 | e.g. in TLevel.Load(...) |
| 10 | |
| 11 | - type: indicates ObjectPascal class used to handle this level logic, |
| 12 | usually just 'Level' to use standard TLevelLogic class. |
| 13 | - scene: 3D model filename. |
| 14 | |
| 15 | - loading_image: Image to show under a progress bar when loading level. |
| 16 | You can show here anything you like (e.g. many games show a screenshot |
| 17 | from the level, sometimes blurred). You don't have to specify this image, |
| 18 | then progress background will simply show whatever was displayed |
| 19 | in the viewport when level loading started. |
| 20 | |
| 21 | - <prepare_resources> should list resources used by this level. |
| 22 | These resources will be prepared during TLevel.Load call. |
| 23 | "Resources" refers to creatures and items (and potentially other types |
| 24 | of resources you define in your game), although in this special case |
| 25 | you do not have to list items: all items are (by default) |
| 26 | always prepared before loading a level (because player can potentially |
| 27 | carry an item from one level and drop it on another level). |
| 28 | |
| 29 | So, practically: list here just creatures that are potentially used |
| 30 | on the level. This includes creatures initially present on the level |
| 31 | (placed there by placeholders), or added later on the level by any means |
| 32 | (e.g. by creating the creature and adding it to level by ObjectPascal code, |
| 33 | see TCreatureResource.CreateCreature method). |
| 34 | |
| 35 | It is not strictly necessary to list here all used creatures: |
| 36 | not listed creatures will be prepared "on demand" (when they appear |
| 37 | on level). But this "on demand" loading is somewhat bad for player, |
| 38 | as (s)he sees a progress bar in the middle of the game. |
| 39 | Keeping all possible creatures already prepared avoids this. |
| 40 | --> |
| 41 | |
| 42 | <level |
| 43 | name="example_level" |
| 44 | type="Level" |
| 45 | scene="example_level_final.x3dv" |
| 46 | title="Example Level" |
| 47 | placeholders="blender" |
| 48 | loading_image="loading_image.png" |
| 49 | > |
| 50 | <prepare_resources> |
| 51 | <resource name="Knight"/> |
| 52 | </prepare_resources> |
| 53 | </level> |