4
Define the level properties. See
5
http://castle-engine.sourceforge.net/creating_data_levels.php
6
for extensive documentation of available properties, in short:
8
- name: used to refer to this level from ObjectPascal code,
9
e.g. in SceneManager.Load(...)
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.
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.
21
- <prepare_resources> should list resources used by this level.
22
These resources will be prepared during SceneManaged.LoadLevel 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).
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).
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.
45
scene="example_level_final.x3dv"
47
placeholders="blender"
48
loading_image="loading_image.png"
51
<resource name="Knight"/>