Tramway SDK v0.1.1
config.h
Go to the documentation of this file.
1// Tramway Drifting and Dungeon Exploration Simulator SDK Runtime
2
3// This is the configuration file for the library portion of the framework.
4// If you change anything in here, you'll need to recompile everything.
5
6#ifndef TRAM_SDK_CONFIG_H
7#define TRAM_SDK_CONFIG_H
8
9#include <cstdint>
10
11namespace tram {
12
13const uint32_t MAX_MATERIAL_TYPES = 20;
14const uint32_t MAX_VERTEX_FORMATS = 20;
15
16const uint32_t MAX_VERTEX_SHADERS = 20;
17const uint32_t MAX_FRAGMENT_SHADERS = 20;
18const uint32_t MAX_LINKED_SHADERS = 40;
19
20// Rate of fixed updates
21const float TICK_RATE = 1.0f / 60.0f;
22
23// Initial first person camera sensitivity
24const float CAMERA_MULTIPLIER = 1.0f / 8.0f;
25
26// +---------------------------------------------------------------------------+
27// | |
28// | PHYSICS |
29// | |
30// +---------------------------------------------------------------------------+
31
32const float PHYSICS_GROUND_PLANE = -9.0f;
33const float PHYSICS_GRAVITY = -9.8f;
34
35// +---------------------------------------------------------------------------+
36// | |
37// | RESOURCE LIMITS |
38// | |
39// +---------------------------------------------------------------------------+
40
41// These numbers determine how much memory will be allocated for each Resource
42// type.
43
44// Currently the Resource pools won't get automatically extended if they run out
45// of space, so essentially these numbers limit how many instances of a
46// Resource type it will be possible to create.
47
48const uint32_t RESOURCE_LIMIT_SOUND = 100;
49const uint32_t RESOURCE_LIMIT_MODEL = 100;
50const uint32_t RESOURCE_LIMIT_PATH = 100;
51const uint32_t RESOURCE_LIMIT_COLLISION_MODEL = 500;
52const uint32_t RESOURCE_LIMIT_MATERIAL = 500;
53const uint32_t RESOURCE_LIMIT_SPRITE = 500;
54const uint32_t RESOURCE_LIMIT_LIGHT_GRAPH = 250; // same as worldcell limit
55const uint32_t RESOURCE_LIMIT_SOUND_GRAPH = 250; // ditto
56
57// +---------------------------------------------------------------------------+
58// | |
59// | COMPONENT LIMITS |
60// | |
61// +---------------------------------------------------------------------------+
62
63// Same as for Resources.
64
65const uint32_t COMPONENT_LIMIT_ANIMATION = 50;
66const uint32_t COMPONENT_LIMIT_AUDIO = 150;
67const uint32_t COMPONENT_LIMIT_CONTROLLER = 25;
68const uint32_t COMPONENT_LIMIT_LIGHT = 250;
69const uint32_t COMPONENT_LIMIT_PARTICLE = 100;
70const uint32_t COMPONENT_LIMIT_PHYSICS = 500;
71const uint32_t COMPONENT_LIMIT_PLAYER = 5;
72const uint32_t COMPONENT_LIMIT_RENDER = 1000;
73const uint32_t COMPONENT_LIMIT_SPRITE = 100;
74const uint32_t COMPONENT_LIMIT_DECAL = 100;
75const uint32_t COMPONENT_LIMIT_TRIGGER = 50;
76
77// +---------------------------------------------------------------------------+
78// | |
79// | OTHER LIMITS |
80// | |
81// +---------------------------------------------------------------------------+
82
83// Limit for file path length, e.g. "data/textures/material001.png"
84const size_t PATH_LIMIT = 200;
85
86// Limit for system count
87const size_t SYSTEM_LIMIT = 128;
88
89// Limit for scriptable entity types
90const uint32_t SCRIPTABLE_ENTITY_TYPE_LIMIT = 50;
91
92// Limit for all entity types
93const uint32_t ENTITY_TYPE_LIMIT = 50;
94
95// Limits for Async system resoruce streaming requests
96const uint32_t RESOURCE_LOADER_QUEUE_LIMIT = 1000;
97const uint32_t RESOURCE_LOADER_REQUEST_LIMIT = 1750;
98
99// Limits for entities
100const uint32_t ENTITY_LIMIT = 5000;
101const uint32_t NAMED_ENTITY_LIMIT = 500;
102
103// Limit for total sum of characters that can be stored in all language strings
104const uint32_t LANUGAGE_STRING_CHARACTER_LIMIT = 10000;
105
106// Limit for the number of lanugage strings
107const uint32_t LANGUAGE_STRING_LIMIT = 500;
108
109// Limit for enqueued messages before dispatch
110const uint32_t MESSAGE_QUEUE_LIMIT = 500;
111
112// Limit for enqueued messages with a delay
113const uint32_t MESSAGE_PRIORITY_QUEUE_LIMIT = 250;
114
115// Limit for message data, in bytes
116const uint32_t MESSAGE_DATA_LIMIT = 2000;
117
118// Limit for message types
119const uint32_t MESSAGE_TYPE_LIMIT = 100;
120
121// Limit for signal types
122const uint32_t SIGNAL_TYPE_LIMIT = 100;
123
124const uint32_t WORLDCELL_TRANSITION_LIMIT = 250;
125const uint32_t KEYBOARDACTION_LIMIT = 100;
126
127// Limit for total sum of characters that can be stored in all names
128const uint32_t UID_CHARACTER_LIMIT = 20000;
129
130// Limit for the number of names
131const uint32_t UID_LIMIT = 2000
132;
133const uint32_t WORLDCELL_LIMIT = 250;
134
135const uint32_t RIGIDBODY_LIMIT = 500;
136
137// +---------------------------------------------------------------------------+
138// | |
139// | EXTENSION LIMITS |
140// | |
141// +---------------------------------------------------------------------------+
142
143
146}
147
148#endif // TRAM_SDK_CONFIG_H
Serialization, i.e.
const uint32_t COMPONENT_LIMIT_LIGHT
Definition: config.h:68
const uint32_t RESOURCE_LIMIT_COLLISION_MODEL
Definition: config.h:51
const uint32_t ENTITY_LIMIT
Definition: config.h:100
const uint32_t MESSAGE_QUEUE_LIMIT
Definition: config.h:110
const uint32_t WORLDCELL_TRANSITION_LIMIT
Definition: config.h:124
const uint32_t EXT_KITCHENSINK_SOUNDTABLE_LIMIT
Definition: config.h:145
const uint32_t COMPONENT_LIMIT_PARTICLE
Definition: config.h:69
const uint32_t RESOURCE_LIMIT_MATERIAL
Definition: config.h:52
const float CAMERA_MULTIPLIER
Definition: config.h:24
const uint32_t MESSAGE_PRIORITY_QUEUE_LIMIT
Definition: config.h:113
const uint32_t RESOURCE_LOADER_REQUEST_LIMIT
Definition: config.h:97
const uint32_t COMPONENT_LIMIT_DECAL
Definition: config.h:74
const uint32_t MESSAGE_DATA_LIMIT
Definition: config.h:116
const uint32_t RESOURCE_LIMIT_SOUND
Definition: config.h:48
const size_t PATH_LIMIT
Definition: config.h:84
const uint32_t COMPONENT_LIMIT_SPRITE
Definition: config.h:73
const float PHYSICS_GRAVITY
Definition: config.h:33
const uint32_t COMPONENT_LIMIT_CONTROLLER
Definition: config.h:67
const float TICK_RATE
Definition: config.h:21
const uint32_t NAMED_ENTITY_LIMIT
Definition: config.h:101
const uint32_t MAX_VERTEX_FORMATS
Definition: config.h:14
const uint32_t KEYBOARDACTION_LIMIT
Definition: config.h:125
const uint32_t COMPONENT_LIMIT_AUDIO
Definition: config.h:66
const uint32_t RESOURCE_LIMIT_MODEL
Definition: config.h:49
const uint32_t RESOURCE_LIMIT_SOUND_GRAPH
Definition: config.h:55
const uint32_t COMPONENT_LIMIT_PLAYER
Definition: config.h:71
const uint32_t MAX_MATERIAL_TYPES
Definition: config.h:13
const uint32_t LANUGAGE_STRING_CHARACTER_LIMIT
Definition: config.h:104
const uint32_t RIGIDBODY_LIMIT
Definition: config.h:135
const uint32_t SIGNAL_TYPE_LIMIT
Definition: config.h:122
const uint32_t ENTITY_TYPE_LIMIT
Definition: config.h:93
const size_t SYSTEM_LIMIT
Definition: config.h:87
const uint32_t RESOURCE_LIMIT_PATH
Definition: config.h:50
const uint32_t WORLDCELL_LIMIT
Definition: config.h:133
const uint32_t UID_CHARACTER_LIMIT
Definition: config.h:128
const uint32_t COMPONENT_LIMIT_TRIGGER
Definition: config.h:75
const uint32_t LANGUAGE_STRING_LIMIT
Definition: config.h:107
const uint32_t MAX_FRAGMENT_SHADERS
Definition: config.h:17
const uint32_t MESSAGE_TYPE_LIMIT
Definition: config.h:119
const uint32_t RESOURCE_LIMIT_LIGHT_GRAPH
Definition: config.h:54
const uint32_t RESOURCE_LIMIT_SPRITE
Definition: config.h:53
const uint32_t RESOURCE_LOADER_QUEUE_LIMIT
Definition: config.h:96
const uint32_t MAX_VERTEX_SHADERS
Definition: config.h:16
const float PHYSICS_GROUND_PLANE
Definition: config.h:32
const uint32_t COMPONENT_LIMIT_PHYSICS
Definition: config.h:70
const uint32_t COMPONENT_LIMIT_ANIMATION
Definition: config.h:65
const uint32_t EXT_KITCHENSINK_ANIMATIONTABLE_LIMIT
Definition: config.h:144
const uint32_t MAX_LINKED_SHADERS
Definition: config.h:18
const uint32_t UID_LIMIT
Definition: config.h:131
const uint32_t SCRIPTABLE_ENTITY_TYPE_LIMIT
Definition: config.h:90
const uint32_t COMPONENT_LIMIT_RENDER
Definition: config.h:72