The whole purpose of Asset Bundles is to update game content without patching the game. I could simply patch the game frequently to add new assets to the Resources folder, or embedded in the game data, but I'm trying to avoid that so I can potentially target non-patchable platforms like mobile. My whole architecture is based on the ability to have game logic in assets using FSMs/Behavior Trees, so I can include them in Asset Bundles and update actual game logic without patching the game executable.Yes, I understood that. That's exactly what DataNode was designed for. If you watch that vid I linked, I add a new playable vehicle to the game without patching the game itself. The exported file is what you want it to be -- be it an entire model with all the necessary assets or the entire scene.
As far as assets referencing assets in other bundles, my understanding is that as long as each asset belongs to an asset bundle, a reference and dependency is used instead. For example, a texture in bundle A is used in a material on a mesh in bundle B, the second bundle will not embed the texture but instead have a reference to the texture in bundle a and there is then a dependency to bundle A added to bundle B, such that when bundle B is downloaded it also downloads bundle A. The system should work like this, and if it doesn't then it's a bug and will eventually get fixed, hopefully long before I launch my game.That sounds like it will get hairy quickly... bundles referencing other bundles? What happens when you update bundle A forgetting about all the other bundles that depend on it? Better design is to have self-contained modules that have everything they need inside them, and when loading check to see if the asset within has already been loaded from somewhere else, and if so -- simply skip loading it and reuse the existing one (which is what DataNode serialization does).
Can I dynamically add and remove prefabs from the TNManager.objects list for each channel I join? So, before joining a channel, I populate the objects list with one that is specific to the scene that will be loaded?The objects list isn't needed, and is only there as a legacy functionality. Just use the resource paths as if you were loading stuff via Resources.Load. TNet is designed in such a way that you can even place external assets (think My Documents/Your Game/Prefabs or something similar) and TNet will load them the same as if they were a part of the Resources folder. This includes textures (.png), text assets (.txt), binary assets (.bytes) and of course DataNode exports.
I should also say that I've been lurking for a while, and some time back you mentioned the idea of having sub channels within a channel that would allow you to join multiple sub channels to segregate messages. I can't remember the exact terminology you used, but the idea is that as you walk around in a scene, you could be joining and leaving channels based on your location so you only receive messages from objects within your vicinity. Now, to me this sounds like a great idea but I'm not sure how you'd handle "host" migration because at the moment I think you base the migration on the assumption that every player has all data synchronized, so a client can take over as "host" at any time. Anyhow, the concept sounded great - any progress on this?It's on the TODO list for the near future as I need this functionality for my next game. I expect it to be done within the next 2 months.
Yes, I understood that. That's exactly what DataNode was designed for. If you watch that vid I linked, I add a new playable vehicle to the game without patching the game itself. The exported file is what you want it to be -- be it an entire model with all the necessary assets or the entire scene.
That sounds like it will get hairy quickly... bundles referencing other bundles? What happens when you update bundle A forgetting about all the other bundles that depend on it? Better design is to have self-contained modules that have everything they need inside them, and when loading check to see if the asset within has already been loaded from somewhere else, and if so -- simply skip loading it and reuse the existing one (which is what DataNode serialization does).
The objects list isn't needed, and is only there as a legacy functionality. Just use the resource paths as if you were loading stuff via Resources.Load. TNet is designed in such a way that you can even place external assets (think My Documents/Your Game/Prefabs or something similar) and TNet will load them the same as if they were a part of the Resources folder. This includes textures (.png), text assets (.txt), binary assets (.bytes) and of course DataNode exports.
It's on the TODO list for the near future as I need this functionality for my next game. I expect it to be done within the next 2 months.
You have a list of players in the channel you're in via TNManager.players. In Windward when I want to do a /who on the channel, I simply call a broadcast RFC passing the ID of the channel. Clients check to see if the ID matches their channel, and if so -- send a response. Responses populate the list of players.