Vše, co je specifické pro danou hru (a není jen součástí enginu).
Všechna data, která jsou ve formátu podporovaném herním enginem.
Multimediální prvky, které jsou prezentovány hráči a chráněny copyrightem.
Super Mario (1985)
Giana Sisters (1987)
World of Warcraft (2004)
Order and Chaos 2 (2015)
Binární data
Bytecode
Textové soubory
Hybridní soubory
Zvuky a hudba
Obrázky / textury
Video
3D Modely
Herní Data
Levely, Mapy
Skripty
Poskytuje přístup ke všem zdrojům
Řídí životní cyklus každého zdroje
Garantuje, že vždy existuje pouze jedna kopie každého zdroje v paměti
Načítá požadované zdroje a uvolňuje ty, které už nejsou potřeba
Řeší streamování
1 | RES ResourceLoader::_load(const String &p_path, const String &p_original_path, |
2 | const String &p_type_hint, bool p_no_cache, Error *r_error, bool p_use_sub_threads, |
3 | float *r_progress) { |
4 | bool found = false; |
5 | |
6 | // Try all loaders and pick the first match for the type hint |
7 | for (int i = 0; i < loader_count; i++) { |
8 | if (!loader[i]->recognize_path(p_path, p_type_hint)) { |
9 | continue; |
10 | } |
11 | found = true; |
12 | RES res = loader[i]->load(p_path, p_original_path != String() ? |
13 | p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_no_cache); |
14 | if (res.is_null()) { |
15 | continue; |
16 | } |
17 | |
18 | return res; |
19 | } |
20 | |
21 | ERR_FAIL_COND_V_MSG(found, RES(), vformat("Failed loading resource: %s.", p_path)); |
22 | } |
1 | CameraTexture::~CameraTexture() { |
2 | if (_texture.is_valid()) { |
3 | RenderingServer::get_singleton()->free(_texture); |
4 | } |
5 | } |
6 | |
7 | void TextureStorage::texture_free(RID p_texture) { |
8 | Texture *t = texture_owner.get_or_null(p_texture); |
9 | t->cleanup(); |
10 | ... |
11 | texture_owner.free(p_texture); |
12 | } |
13 | |
14 | void PoolAllocator::free(ID p_mem) { |
15 | mt_lock(); |
16 | Entry *e = get_entry(p_mem); |
17 | bool index_found = find_entry_index(&entry_indices_pos, e); |
18 | ... |
19 | entry_count--; |
20 | free_mem += aligned(e->len); |
21 | e->clear(); |
22 | mt_unlock(); |
23 | } |
Level loading
Air locky
World streams
Shadow of the Tomb Raider (2018)
Wolfenstein II: The New Colossus (2018), render
Portal (2007)
Hellblade: Senua's Sacrifice (2017)
World of Warcraft (2004)
Jazz Jackrabbit 2 (1998)
1 | for (y = FTOT(viewY) - 5; y < ITOT(FTOI(viewY) + viewH) + 5; y++) { |
2 | for (x = FTOT(viewX) - 5; x < ITOT(FTOI(viewX) + canvasW) + 5; x++) { |
3 | if ((x >= 0) && (y >= 0) && (x < LW) && (y < LH) && |
4 | grid[y][x].event && (grid[y][x].event < 121) && |
5 | (eventSet[grid[y][x].event].difficulty <= game->getDifficulty())) { |
6 | while (event) { |
7 | if (event->isFrom(x, y)) break; |
8 | event = event->getNext(); |
9 | } |
10 | if (!event) { // event not found -> create it |
11 | switch (getEvent(x, y)->movement) { |
12 | case 28: |
13 | events = new JJ1Bridge(x, y); |
14 | break; |
15 | case 41: |
16 | events = new MedGuardian(x, y); |
17 | ... |
18 | } |
19 | } |
20 | } |
21 | } |
22 | } |
AIFF
WAV
MP3
OGG
JPEG
PNG
TGA
SVG
Another World (1991), in-game
The Last of Us, Part I (2022), in-game
Warcraft 3, in-game and cinematics
Warcraft 3 Reforged, cinematics
Typy
Formáty
Difúzní
Displacement
Normálová
Volumetrická
Dlaždicová
Sprite atlas
Sprite
Spritesheet
Sprite atlas
Billboard
Mesh
Materiály
Textury
Appr. mesh | Prec. mesh | CSG | Barvy | Materiály | Textury | Kamera | Světla | |
---|---|---|---|---|---|---|---|---|
STL | ||||||||
OBJ | ||||||||
FBX | ||||||||
DAE | ||||||||
3DS | ||||||||
STEP | ||||||||
X3D | ||||||||
BLEND | ||||||||
GLTF |
ZIP
zlib
Serializovaná data
Databáze
Save data
Local Storage
1 | let myStorage = window.localStorage; |
2 | |
3 | myStorage.setItem('player_state', player.stateId); |
4 | myStorage.removeItem('player_state'); |
5 | myStorage.clear(); |
IndexedDB
1 | await db.players.add({ |
2 | name: 'Warrior', |
3 | avatar: await getBlob('sprite_warrior.png'), |
4 | key_mapping: 'default' |
5 | }); |
1 | { |
2 | "player": { |
3 | "difficulty": "hard", |
4 | "scene": "mountains_02", |
5 | "posX" : 12, |
6 | "posY" : 56, |
7 | "inventory" : ["flashlight, lighter, candle"], |
8 | "stamina": 45, |
9 | "agility": 12 |
10 | } |
11 | } |
1 | // p_saveg.c::P_UnArchiveThinkers |
2 | while (1) { |
3 | tclass = *save_p++; |
4 | switch (tclass) { |
5 | case tc_mobj: |
6 | PADSAVEP(); |
7 | mobj = Z_Malloc (sizeof(*mobj), PU_LEVEL, NULL); |
8 | memcpy (mobj, save_p, sizeof(*mobj)); |
9 | save_p += sizeof(*mobj); |
10 | mobj->state = &states[(int)mobj->state]; |
11 | mobj->target = NULL; |
12 | if (mobj->player) { |
13 | mobj->player = &players[(int)mobj->player-1]; |
14 | mobj->player->mo = mobj; |
15 | } |
16 | P_SetThingPosition (mobj); |
17 | mobj->info = &mobjinfo[mobj->type]; |
18 | P_AddThinker (&mobj->thinker); |
Zelda (2004)
The Messenger (2018)
1 | <map version="1.0" orientation="orthogonal" renderorder="right-down" width="120" height="18" tilewidth="128" |
2 | tileheight="128" nextobjectid="1"> |
3 | <tileset firstgid="1" name="gameart2d-desert" tilewidth="128" tileheight="128" tilecount="40" columns="5"> |
4 | <image source="gameart2d-desert.png" width="640" height="1024"/> |
5 | <tile id="2"> |
6 | <properties> |
7 | <property name="type" type="int" value="1"/> |
8 | </properties> |
9 | </tile> |
10 | <tile id="7"> |
11 | <properties> |
12 | <property name="type" type="int" value="1"/> |
13 | </properties> |
14 | </tile> |
15 | </tileset> |
16 | <layer name="background" width="120" height="18"> |
17 | <data encoding="csv"> |
18 | 0,23,25,25,36,37,36,23,23,37,25,23,25,...... |
Tuhle hru si pamatuju, protože jsem si kvůli ní musel pořídit nový počítač.90% hráčů