- 最新
- 最多得票
- 最多評論
Hi Gamely,
In general, Entity Component Slices use reference counting to keep track of asset use. That reference count (as you may expect) is adjusted per every usage of the asset with the asset being unloaded at a ref count of 0. There are some legacy systems however where assets aren't freed until the level is unloaded. We hope to address this in a future version so keep your eyes peeled for that. Past that, I think implementing a pooling system would be a great idea depending on the quantity of slices you're spawning.
I would also recommend checking out the Multiplayer Sample included with Lumberyard. It's a good example of spawning a good number of a variety of slices. It does not use pooling so it may help you get an idea of bounds.
Please let us know if you have further questions here!
Thanks for your answer.
Hope to have some free time to test something live.
I will surely take a deep look at multiplayer sample.
I need to inspect the code as every single sentence makes more question arise.
I want to understand if the reference to a slice in spawn component make the slice and referenced resources load or not and if there a way to defer the loading and/or to preload to better control what is loaded at any time.
what about assets from server point of view?what get loaded in the server and how to lighten the server package to remove client only assets or load simplified version of some assets(es model with just collision, more compressed animation with less bones etc.
The idea here is always to maximize how much a single instance can manage to load less things , faster and more efficiently to not waste/trash memory and not degrade performances over time.It can be labeled as an early optimization, but even in the beginning is always better to make well informed choices so need to grasp all the engine fundamentals.
Also allocators are an insteresting subject I would love if you can document further.
On the subject of resource loading timing, we're actively looking at that. Presently you can try playing with AZ::Data::AssetFlags values to manipulate the timing of loads as it pertains to an instance of a slice. OBJECTSTREAM_QUEUE_LOAD should allow a slice to load while a loading asset is still being loaded while OBJECTSTREAM_PRE_LOAD should hold the slice until the loading asset finishes.
On the subject of assets from the server point of view, I will have to do some follow up to get a clearer answer. What I do know is that we have a NULL Renderer exactly so we don't waste resources rendering when there isn't anywhere to display to. You can also control what fields are synchronized over the network so you don't have to synchronize every field of an entity.
Can you let me know what you'd like to see in regards to allocators?
Thanks I will look at that flags.
About allocators I use to have few custom ones i use the most in my other project and I have just seen that there are just various ones in the engine, but there is no documentation and is still not clear to me how to make use of them.
However main priority is still the doxygen like documentation and github to make studing the source way more comfortable that stick to the pc and visual studio.
此貼文已關閉:已停用新增新答案、評論和投票功能。
相關內容
- 已提問 5 個月前