#archived-dots
1 messages ยท Page 168 of 1
@glossy summit https://github.com/DOTS-Discord/Unity-DOTS-Discord/wiki/Installing-DOTS-Package-in-Unity-2020.1
You can use com.unity.entities if you dont want the hybrid rendering stuff
hello guys, I have a system that has two jobs inside it. both jobs writes to rotation component but their query are completely different. When I combine both jobhandles, ecs says "the job1 writes to the same component(rotation) as job2, it is not allowed.". As far as I know, they can write to their rotation components and there is no race condition. What should I do? Would seperating the system into two different systems work?
If you are sure then you can use something like โ.WithDisableParallelForRestriction(typeof(Rotation))โ in your lambda @sick agate
I think you make the jobhandles be dependent of each other when scheduling? passing the dependencies of the first job to the second etc?
you could probably use 2 separate system too yeah
The ScreenMainTag component is defined in the Assembly-CSharp assembly, but that assembly is not referenced by the current build configuration. Either add it as a reference, or ensure that the conversion process that is adding that component does not run..
Guys I have used [GenerateAuthoringComponent] to create ScreenMainTag.
Does anyone know what assembly reference I am missing
Hey,
Not exactly dots, but unity job system...
Any idea how to sort TransformAccessArray in a job and have result available in the main thread after the job is done?
I tried Array.Sort but TransformAccessArray is not a subclass of System.Array...
isn't the idea that the transform access handles the application of the transform changes for you?
not sure if that's correct, but if so, maybe you can pass something else to get the results and order them? like additionally passing a float3 native array that you use to store result positions etc?
What are you trying to do ?
@minor sluice I can pass in floats and order those I guess, but then I need mapping to get original transforms back.
@opaque ledge I have list of colliders (could be in thousands) and I need <8 "closest" transforms as a result. I had sort + slice on main thread but it's becoming an issue. So I wanted to put at least sorting into a job for a start.
Also "closest" is not really closest, but some kind of a score I calculate.
@minor sluice I combine both jobs dependencies and then pass it to Dependency
but if you have the transforms already in order at the start of the operation, and you want to do something with an output, wouldn't that mean that you just apply the same index on the same index?
and maybe instead of sorting colliders it would be possible to sort the indices?
although not really sure tbh
or sort on all the arrays you need at once perhaps, applying the same steps in the same job?
hmmm
and not sure how you'd do it if you operate on regular transforms, it would be easier if that operation was on Translation/Rotation componentData etc
I'll try to pass in NativeArray<KeyValuePair<float, int>> and sort it... Is KeyValuePair blittable?
any struct that consists only of blittable types should be blittable itself
so not sure, but I'd assume it
TransformAccessArray is not for that tho, why do you need it ?
I answered @opaque ledge a bit higher
@dusky wind some perf thoughts.
- try not allocating new temp/tempJob each update, instead use a list as a field and ResizeUnitialized in case it changed.
- check the ASM in burst inspector to see if its vectorizing, you may need to remove that HasComponent branch
- you're making a value copy of the component rather than calculating the hash in place, that will be slowing it down.
@mint iron check the latest commit to the repo
Already addressed a lot of these
It's slower due to using NativeMultiHashMap
But due to not being padded with either zeros or uninitialized memory
It's consistent now
oh, yeah that looks a lot better!
is the Parent component a shared component?
The ScreenMainTag component is defined in the Assembly-CSharp assembly, but that assembly is not referenced by the current build configuration. Either add it as a reference, or ensure that the conversion process that is adding that component does not run..
Guys I have used [GenerateAuthoringComponent] to create ScreenMainTag.
Does anyone know what assembly reference I am missing
@random marlin I wonder if you're looking at the problem too directly
What would happen if you say, tagged each of the colliders with a tag component, then ran a likely guess radius sphere collision check again, but with a smaller radius and just looking for that tag
If that tag doesn't come up in the collection, enlarge it and try again
Then have a system that cleans up the tag later
Also, I'm thinking there might be some way to access the AABB volumes that you could leverage
@deft stump it shouldn't be
@dusky wind I'm just making sure. since Unity doesn't define if their out of the box components are shared or not
Pretty sure you can just check the interfaces a struct implements
To see where it can be used
Why does burst not like it when I access a static readonly field in another class from inside a job
@solid flume because you can't access "reference data" from Burst
If you want to burst the whole thing, you need to copy the reference data in before
yep
because static nativearrays are supremely annoying to dispose of
If it's in a system, the easy way is just declare a variable that's local, and set it. Not that difficult
Its not really memory efficient though
Depends on what you consider efficiency to be...
Fair enough
@violet cosmos not sure exactly what you mean, but this algo with enlarging the collider might work and it will be easier to maintain than the job parallelism
I'll give it a try
@random marlin That's the easy hack, (you're just indirectly reading into AABB) but my intuition says reading directly from the the AABB system is going to yield the largest gains
yeah, the list with thousands of items could be drastically reduced
So last night tried importing MegaCity into 2020.1. Errors abound. Freed space again and trying into 2019.4LTS
I don't believe you'll be able to straight up import it unless you go back many editor & package versions - I think there's quite a lot of fixing required.
MegaCity is Unity Companion license. So, theoretically we could take this project on to update it to 0.14 ECS best practices, latest packages and publicly share/work on it
Isnt there a community build that aims to bring it upto date?
@deft stump If you know of such a thing, I would love to have a link
Hrmmm i was just passing through the interwebs, might be wrong or im drunk.
I'll search for it
I'm really only interested in how they did the prefab/scene streaming, and any workflow tools, after watching a talk
I really despise the cop-out that "texture and asset streaming for ECS, well... It's out of the scope of this talk". That's like.... The whole damn thing any video game that isn't a single scene game, don't just ignore it!
well I can't find it (probably was drunk)
let's make it a community project.
keep megacity upto date with the latest packages
XD
might be worth tagging Topher on Monday as I know this was previously discussed and Unity might be working on it
@deft stump Really depends on the utility I see, and if it's really something usable
It's a huge project, it's a 7gb compressed archive, that expands to 22gb
It takes over a half an hour to import on my laptop's 6 core i7 and a really fast SSD
yah, took me a few minutes to find it, not just videos of it
@amber flicker I really think Unity needs to pick at least one sample repo, and update it in line with ECS/DOTS releases. Just one. Then, they know the pain points and conversion processes, and can document those and breaking changes as well with the release. I'd wait a week extra between releases for that
I agree. I think Unity agree. I think there's been a lot of good intention but not much delivered. Some of the simple samples have been kept well up-to-date - I think the DOTS shooter is supposed to be the one that shows networking, physics etc and maintained.. but all those things are still so much in flux. Still a bit early I think.
Even if it's just a toy project... It doesn't matter but you can see the diffs between branches
And be like "Ohhh! This is how they migrated A to A.2"
it's also funny that before, every unity guy says that they should look at the angry bots demo for proper code implementations of x,y,z.
If they can't do that, how can they expect the community to do it? Without any information
Especially those of us working to build real things, not just more toys
Have you checked out the pinned samples? I think they're alright. They don't show what 'a really nice conversion workflow' looks like for instance.. but it doesn't really exist yet. I think they quite well illustrate what does exists and is reasonably settled.
After watching the talk, I think MegaCity's conversion/streaming/pipeline is the closest to what I need
That's what I need right now.... that workflow and in-Unity pipeline
Once I get some reference code from MegaCity, I'm going to work on a pipeline that organizes GameObject prefabs into something that is serialized into ECS in editor. Per prefab would be cool, and there's hints MegaCity is doing that, but I can hack around with per-scene.
Then, I'm going to be making a PrefabWorld, where pre-converted entity prefabs are streamed into and automatically marked up, and is the single source of instancing, and are ref checked (and tagged) for disposal. Kind of like a lightweight version of Addressables.
The stream-direct-to-world, like how we have tools for the current GO workflow, is just not going to happen. Proved that out yesterday
I dunno. To me it just sounds like a subscene containing all the Prefabs.
^ i second this idea. that's what it feels like to me too
If you have a game that's a well organized list, and all hand made beforehand... There's not much problem. I'm working on proc gen, and many things are combinations of others in a prefab hierarchy
Like, lets say you're making Crash Bandicoot ECS. Sure, just author the scene, break it into chunks, load on the fly and dispose. But... What about prefabs referenced in SubScene1 vs SubScene22? MegaCity has some handling for that.
From my understanding you want either a) a way of loading serialized content from disc and instantiating fast (i.e. MegaCity - although everything's static there, they don't instantiate prefabs really afaik), b) same as a) but some runtime combinatoric use of prefabs or c) runtime mesh generation - not much can be serialized. Which approach are you going for?
But, what if you're me? Scenes don't exist, they're proc generated at runtime? I could organize them into "BuildingBlocksDesert" and "BuildingBlocksValley" and load those. But, what do I do when I don't need them, or I have multiple different environments and need to stream out the resources for Valley when i transition into Desert? That needs to be managed, because right now there's zero of that
They instantiate prefabs in megacity. Each building is a scene, made of a number of prefabs. They also manage shared prefabs across sub-scenes.
I'm not really following. You have many many Prefabs. These are pre-authored and serialized? You have so many that you don't want them to be loaded all the time. Presumably then these prefabs should be grouped and placed in subscenes which are loaded depending what area you're in or something?
Yes, exactly.
The issue is: pre-authored and serialized, there's no way to reference to pre-serialized version without custom tooling or if they're stored in a saved subscene
So... in my head.. you make your prefab traditionally (gameobjects). You have a 'Valley' subscene, you drag the prefab in. You load the Valley prefab subscene when in the Valley. Profit?
Yes, and when I don't need Valley?
Those need to be managed a tagged. What does that?
Where does Valley go before I need it?
Where do I get "new" Valley instances if I need them at runtime?
well if they are geographical, then I'd say look at the LOD stuff (I haven't looked into it) and that may do it automatically for you. If they're conceptual categories rather than spatial then you need your own logic I assume.
LOD isn't automatic either, another thing I think again, covered in MegaCity. They did separate scenes per LOD, IIRC
From the talk, MegaCity is structured as a few hundred buildings, with a SubScene per building. Each building has LOD sub-scenes. Those are laid out in the master scene as a collection of SubScenes, at very specific positions known ahead of time, then just magically automatically serialized: An advantage I don't have (set positions)
I don't see why you can't do that.
It's proc gen, I don't know where things are
are 'Valley' prefabs spatially associated with the Valley or not?
No
so yes, you will need to write your own logic
have you watched the tutorial codemonkey did about subscene streaming? It's fairly simple?
yes, for him. He quite literally just copied and pasted in the editor ๐
Everything was laid out beforehand, and he didn't have to worry about loading from disk, serialization, etc
Any SubScene prefab set in my game, would just look like this:
Just an instance of the prefab, pre-serialized laid out and tagged with metadata. Then, the proc gen goes through and starts placing instances of those into the runtime scene
sounds fairly straight-forward? ๐
haha, PrefabWorld is my current line of thinking. It's honestly not that hard, I just want to see what Unity did in MegaCity, especially about organizing prefabs, and how they did the background file streaming over many frames. There's also assistance code in there for tagging and management of instances
@violet cosmos btw, is there a license in that megacity zip file?
Yes, it's Unity Companion License, we can modify and redistribute https://unity3d.com/legal/licenses/Unity_Companion_License
You can't, it's too big. But! We can update the scripts and upload those
hrmmmm
Also, @amber flicker Check out that MegaCity video I linked. Even though MegaCity, everything was statically placed, they still did something similar to my line of thinking. It takes them 45 minutes to explain just asset streaming in MegaCity, which just proves that for ECS it's a bit more.... complicated hehe
What's nice about this though, is when I make it... If I do it right, it's a generalized resource I can use across all of my current and future projects. It's work flow
This thing I'm building.... I'll have so many in-house tools when it's done
I already have a few, and am thinking about how to convert my in-house VR rig into ECS and Unity.Physics
Yea, watched the video. The complicated part is referencing unloaded entities in other subscenes. I don't think you need to worry about that? You probably want to do your procgen in a World, start it when the subscenes are loaded and copy the entities back to the default World when it's done? I'm not sure there's much workflow stuff to be built but I could well be wrong.
Yes, I need to worry about that. The Valley to Desert transition I mentioned. Why am I holding on to junk I don't need?
Level to Boss. Doors closed, player can't exit. Why do I still have flowers and rocks and whatever else in memory?
If you don't need it then call valley_prefab_subscene.Unload()? I don't really follow your issue but anyway... best of luck, it sounds fun to work on
Yes, that's the straightforward way. Again, something needs to manage that, streaming it in and gracefully out, and make sure no references exist.
yea... I guess I see that as the day-job... custom logic... part of making a specific game/thing and not workflow stuff but perhaps if you plan to make many procgen games all using the same logic then sure ๐
okay. so I just discovered this now.
but I think GO components can be used as a query in Entities.ForEach
they can ๐
huh
downside is that its slow, but probably still faster than working with MBs though
Well, I have an interesting line of thinking for how I want to make proc gen, based on this: https://marian42.de/article/wfc/
But, if I can't do that then I might do hand made tile-sets with proc gen decoration, which is easier to author but, a bit repetitive
Infinite procedurally generated city with the Wave Function Collapse algorithm - Personal blog about programming, game development and space ships.
so it's probably under the hybrid workflow
You can also have IComponentData that is a type class to reference reference data, but again.... comes with caveats
Still importing MegaCity. This entire time we've been chatting about streaming ๐
Hmmm. Same error. The type or namespace name 'PlayerLoop' does not exist in the namespace 'UnityEngine.Experimental'
I couldn't find that package
tried removing the Expremintal part?
haha, ๐คฆโโ๏ธ now I feel dumb
Oh, that's in the packages, need to update those
so which namespace is the CompanionLink ICD a part of?
oh
great
it's private
wth unity
btw, it's under the Entities namespace but its internal and not public. and I wanted to get into the GO part of the companion link
You can just do GameObject in the ForEach statement as an arg, if you added the GameObject specifically as a Hybrid component
as a query?
Okay, back to 2020.1 for MegaCity and trying to update the packages. Hybrid Renderer 0.0.1 is what's in MegaCity haha
@coarse turtle That's pretty cool actually
Any Component will work like that? Even custom ones?
@coarse turtle that's the GO component, right?
all hybrid components need to inherit UnityEngine.Object @violet cosmos and yes SpriteRenderer is a MonoBehaviour component @deft stump
Ahhh, you know... now AddHybridComponent as part of the GO conversion lifecycle is making sense! It's not just for things that aren't in ECS yet, but for.... anything
Here's the authoring component
That should really be added to Recipes on the wiki
I didn't know that, I thought it was just for some built in types. At least, that's only how I've seen it being used
well it is Hybrid ECS. (the naming makes sense now)
And I guess, unity also expects us to use as much as Pure ECS components as possible
yeah for somethings that just don't have the tooling or complete conversion yet, using a companion link is helpful to keep a decent high level workflow
and I was really prepping on making an sprite-animation system using ECS
Looking at old ECS.... The new patterns are so much better with so much less boilerplate
you still can, it's pretty much a linear animation table with timings (I'm just tinkering with ik rigging atm)
@violet cosmos are you going to update it to the new packages?
Not sure I want to take that on just yet
I'm so behind where I want to be because I've been struggling with hybrid ECS workflow to accomplish my goals
tfw, your game could have been halfway, or even decently finished, if you didn't try to learn ecs.
XD
But, I might ahve to do something because I can't see their SO's and prefabs correctly
haha, this game I'm working on? Nooo. It's a beast
I really think once I build in some tooling, I'll be able to leverage ECS better
my game is only just an anime gacha game ffs! why do I want to leverage it with ECS!?
I have technical requirements.... Really, what I'm hoping for is to reduce the player loop to as minimal as possible so I can cram in a custom lighting solution
Stupid, but this whole thing stems from: Can I find a way to not use light maps?
whats wrong with lightmaps?
They work if you have a game where everything has a place known ahead of time
https://youtu.be/KbxiGH6igBk - Look at all the work they did, just to get hand made tile sets working on mobile with Unity, light maps and light probes
Now, if I can free up the CPU, I'm 90% positive I can come up with a custom lighting solution that doesn't rely on light maps
Also, referring back to the waveform collapse article... Light maps are inherently incompatible when levels are built like this: https://marian42.de/article/wfc/wfc.mp4
some thoughts on that, it's possible (also depends on the platform you're running on) - what I did was a lot of optimization on the vertices loaded to the GPU, chunk based rendering, lods when necessary, deferred some stuff to the CPU like culling because I was GPU bound (eod it's balancing between GPU load and CPU load)
@violet cosmos 7GB turned into 17GB hahaha
@coarse turtle What about... when you rotate it? Then you have to have a lightmap for every possible angle. Or what if you want to position it someplace "low" with a lot of overhang? Then it needs to have a dark/light and 4 angles.
And that's assuming that everything only rotates on Y, and by 90.
oh forgot to mention - i wasn't using lightmaps - just realtime lighting
Ahh, yah that's what I'm trying to get to: Where I can do more realtime lighting on the Quest
I need to open up more CPU budget to try out things though
quest can get GPU bound very quickly depending on the # of vertices and draw calls per eye (so even if the CPU finishes quickly, the GPU can take a longer time to finish processing everything)
Yah, I'm trying to avoid pixel lighting
@coarse turtle we for sure need to add that AddHybridCompnent thing to the wiki, super interesting
But also, the more time I can give the GPU, the better. If I reduce CPU time, I can start the draw earlier
See, MegaCity has this folder called /StreamingData/EntityCache, with a bunch of files called guid_0.entity. I can assume these are serialized entities as prefabs
I need to figure out how they did that
@coarse turtle if you post up the full code for that addHybridComponent , the managed ICD and they System I'll paste it in a wiki article right now
there's no managed ICD for the hybrid component (those 2 images are pretty much the minimum you need)
oh, sorry, I meant the IConvertGameEntity
I'm just being lazy and didn't want to retype it all hahah
sure let me just add it to the wiki
kk thanks!
@violet cosmos let me know your findings on how they streamed the subscenes on a separate thread over multiple frames on MegaCity if you come across anything.
This video is talking about how they did it with two async functions "Load Shared Components" and "Load Entities" then deserializing...
Yah, and some of that is hidden magic in ECS
Hmmm
I'm trying to figure out what is actually happening
alright, I'll try pushing the megacity demo on a private repo one-by-one, file-by-file
Apparently that all happens in a "staging" world... is that a world they created specifically or is that nomenclature for like the "conversion world"? More like a utility world that always exists?
@violet cosmos yeah I looked at some of the megacity code to try to figure out my issue with subscene loading by proximity, because they targeted the proximity of the subscene directly somehow, which seems impossible now (because they always extend their "bounds" to include the origin instead of just the geometry in the subscene).
aren't subscenes already loaded in a seperate world by default
Yes, some of what they're talking about is in ECS now. I'm looking through the serialization
Yeah this vid is from 2 years ago so I'm just trying to figure out if they're referring to an existing utility world or explicitly if they mean they created a seperate world
btw the reason subscenes are so fast is because they are in an already memory ready format, 'deserializing' here means literally copying the entire component buffer to memory, don't need to parse or convert anything
The basic premise is that all those structural changes that cause a main thread sync (e.g. entityManager.X) can happen on a background thread if you create a completely self-contained world. So by creating a new World, you can do a bunch of stuff without interrupting any of the currently running entities & systems. Once the entities are loaded and processed (remapped ids etc) you can then memcpy them straight back into the main World. Which is how subscenes are loaded by default.
Interesting
Exactly, it's an interesting concept
gamertorrahod also suggested such a method instead of using ECB
I noticed the subscene loading function is called "LoadSubsceneAsync" - would it ideal to run that on a "schedule" so it's not on the main thread?
Is that the point of that? haha
I'd assume the point was you could call that directly. The nice thing about DOD is your systems won't try and process the entities until they exist which works really nice for this kind of async load.
Systems only run in the World they've been added to. So your 'MoveToEnemySystem' or whatever you have won't be running in the loading Worlds.
Yeah I haven't experimented with creating extra worlds and stuff yet, I probably should just because it'd be good for learning
I think for right now... I'm going to work with entity scenes as groups of data to stream into a PrefabWorld. But... I really think there's a way to reference serialized hybrid prefab instances directly, so then I can maybe assign them to Addressables and load them more specifically
Some of the logic is captured in SerializeUtilityHybrid and EditorEntityScenes
you've got such a weird setup ๐
sounds like you're doing everything possible to avoid doing it the unity way
@hollow sorrel If I told you that you can't load one texture in Unity to draw... You have to make a new Scene, put the texture on a quad in that scene, and then add some Components to the quad.... Then, either for each texture you need to hand make a new Scene or you can group a bunch of textures in a scene....
You'd be like: WTF, I just need the pixels for my menu!
Oh, and you can assign it by reference. You have to load the scene, to extract the texture, then you can do the thing
making a new scene for one texture sounds crazy
Yes! Why does making a new scene for a prefab that I want to load single seem sane?
I don't want 5 prefabs, or 100. I just need the one.
you don't need a scene to load one prefab
but it sounds like a lot of your issues are coming from hybrid components
i'd stop trying to shoehorn those into a mold that doesn't fit and just seperate them
have your simulation run fully ecs and use hybrid for rendering only (i assume that's why you're using hybrid)
as in your subscene loads simulation entities, your simulation entity might have a mesh id on it, then you load your mesh prefab and instantiate it in the world with a copygameobjectwhateverthename component to make it follow your entity's position
Then I'm writing systems and linking components, as well as custom scripts and setup and initialization
That's what Hybrid does
that seems like it woudl work well (scorr's solutino), then your legacy assets can just be loaded/unloaded as needed with the existing addressables setup.
So, either way I'm writing a ton of tooling
The benefit of Hybrid in my mind is that Unity is going to keep extending it, where if I write my own Hybrid I'll have to maintain every part
@tardy spoke k added (https://github.com/DOTS-Discord/Unity-DOTS-Discord/wiki/Adding-Hybrid-Components)
if i had a dollar every time i expected unity to not completely change something in ECS ๐
Yes, and I do expect them to change it... But I imagine the general workflow to be similar: You author prefabs, convert those to entities at editor time, and load those in at runtime
If I write my own Hybrid system, not only do I need to make ECS changes to systems and structure and whatnot, I also need to maintain a full hybrid system. It's a much larger surface area than managing importing and instantiating
Then I'm writing systems and linking components, as well as custom scripts and setup and initialization
yes but i feel like you're coming up with overcomplicated tooling that ends up being just as much work if not more (like with the whole interface reflection thing)
i feel like you're a smart person who's coming up with solutions that are very complicated but then you end up with other issues because they're not really compatible with the rest of unity's tooling ๐
That's what I'm working on, really: streaming in, linking, cleanup. It's not that difficult, it's just the tooling isn't present the same as we expect with the MB/Prefab workflow, but.... there's no reason it can't be
@hollow sorrel I'm trying to make it compatible! that's the point haha
Hmmm, is the CPU choking at 1 million entities normal? UpdateDynamicRenderBatches is taking the most time (44 ms)
rendering 1mil dynamic entities? yes..
static
Ah if they're static I think you should be able to improve that. I haven't messed with it and they've been changing it a bit I believe. Are they marked as static and in a subscene?
Yeah, they're marked as static
Not in a subscene though, how would I go about adding them to a subscene?
If at the moment you're adding the 'Convert To Entity' component, you basically want to remove those, select your gameobjects, rick-click and choose 'create subscene from selection'. It may be a bit more involved depending on how far down the rabbit hole you've gone of trying to use convert and inject etc.
I'm using GameObjectConversionUtility.ConvertGameObjectHierarchy(gameobjectPrefab, settings);
everything is getting spawned in
I tried that path at runtime. takes 2 seconds to load the prefab (which is a particlesystem and sphere as a child) and convert
When I load a scene that has that converted to an entity, at least the whole process drops to 50ms, which is the same as loading the prefab using Addressables in a pure Monobheaviour setup
What I'm working on, and need to just stop chatting about, is managing that
@glossy summit I think you can try adding the 'Static Optimize Entity' monobehaviour to your prefab. I can't guarantee it will help but it's worth a go.
@glossy summit If you right click on the scene, you can add a new subscene. Pick it's location. Then, it's kind of scene loading as normal
if you have hybrid components, they create game objects so its doing the same work + additional work for ECS, so it makes sense it would be slower.
For you guys not using Hybrid, how are you authoring your things in game? Like, how do you make a car with moving wheels, all the config, creating versions of that car...
putting a prefab in a subscene, and configuring it. Note HybridRenderer was a terrible name, because its not hybrid at all. I think when people say Hybrid theyre generally referring to setups with interop with old GO/MB rendering system.
So you have one subscene per car?
Yah, sticky points there. Little things like audio, particles
the car has audio & particles now? ๐ How about fluid physics for the oil level
you could put heaps of cars into a subscene, wheels, spoilers. But they dont currently have a nice way for it to be converted into an EntityPrefab. They just get converted into instantiated entities when the subscene loads because right now they assume that everything you put into a sub-scene is like, environment or unique objects not a template you wanna instantiate.
Exactly
pretty great workflow for something more than 2 years being worked on
right, but you can hide them and add a prefab component ๐
trying to circumvent the github 100MB push limit is hard
if Benjamin's simply complaining the current workflow isn't ideal I think we'd all agree?
git add individual files and then commit and push, man megacity is mega
That's my complaint, yes. I've used the word "workflow" dozens of times in this conversation. It's just the tools lacking, so... Going to make those, because I need them
whats super annoying is that they have all that LiveLink junk, so if you add a PrefabComponent, then move the isntantiated entities around with the source game object int he subscene, it also moves every single copy haha
Feel free. Just do it knowing Unity has a team of people working on the same thing.
That's why I'm working on the "managing" side of it
Feel free. Just do it knowing Unity has a team of people working on the same thing.
@amber flicker i know haha. but hey, we might need to dissect it for dspgraph ๐
Unity can change the underlying implementation, but it just get plugged into generic management
Surface area there is much smaller
its honestly impressive stuff is still like this after all this time
Wait, so how would I go about Instantiating an entity in a subscene?
My belief is that ecs workflow is a priority for Unity yet we haven't seen much in that regard for the past couple of years likely because it is actually quite complicated to deliver an equivalent workflow we'd expect. It's also probably hard to ship without all the pieces (like editor code) coming together. A lot of stuff (like live editing components) seems to mostly just be waiting to be enabled. A lot is also probably being rewritten given the new .enabled states etc. By all means go for it, it's just my opinion that you might not want to spend too much of your life on it (especially in the timeframe of the next few months). I also think to make it really nice you want the editor to support an entity prefab natively. If you're just talking about making things work for your game, of course - that's what we're all doing.
entitas was able to create a hybrid system that did work. Code is public, it isnt even hard
i just think that its not a focus whatsoever
Hmm, is there an easy way to show a List<Array> in a custom editor? Just how it works by default in the regular inspector?
Just trying to remove/add fields based on an enum.
either that, or unity codebase is a clusterfuck truly beyond any measure and doing anything is super hard
I expect to see progress in the next 6 months.. I'll be disappointed if I don't ยฏ_(ใ)_/ยฏ
ive been checking the evolution since the start, calling it a dissapointment is selling it short
@amber flicker Yes, that's why I elected this path rather than writing a whole other linking path. Every game has some sort of custom way to manage streaming in resources, how they're referenced, allocated, deallocated, etc anyways, correct?
Well, if you read books like the mythical man month, the more complex your software becomes the slower it becomes to work on, and adding more people doesn't necessarily help (and can even slow things down).
I think Unity's huge shift towards "packages" etc indicates that they're well aware of this issue and trying to create smaller discrete systems so progress doesn't basically grind to a halt
editor support is not much ahead of what it was on day 1
in fact, its regressed
unity tiny version 2 actually did have a working ecs editor, but that got completely scrapped
in favor of conversion workflow... which is a huge hack and barly works
Does Tiny's editor not exist anymore at all?
@tardy spoke i consider packages a truly spectacular failure
because they are incompatible with each other on tiny versions
so its a nightmare to keep track of exactly the exact version for each thing
you can try to compile unity ECS samples to check
at this point, i expect unreal to actually have a workable ECS before unity does
I've noticed some problems with the package system in the form of "This package works, and this package works, but they don't seem to work together".
there are a few leaks around that point into an ECS editor
and well
my own badly implemented hacked ECS on top of unreal actually works better than what unity has right now
With the package manager you almost still want a turn-key versioning system like, instead of installing all the ECS stuff seperately, just be like "give me every ECS package that is KNOWN to work together and is the most recent"
so if i want ecs, i can run unreal and write the ECS myself, and it would work better
There's lots of ECS systems that are more complete. We're here for the Burst and Jobs and cache streaming ๐
unreal already has job system (taskgraph), they dont have Burst, but they have ISPC which is somewhat equivalent
tho i havent tried the ISPC thing just yet
biggest problem they have is the huge bottleneck on actually updating unreal engine side stuff
from a job system (inspired by unity ecs) i wrote myself, in unreal
notice the "Copy Transform To Actor" taking literally half of the frame
@tardy spoke that's how it works. The issue is when you install entities 0.14 that requires platforms 0.8, then install 'experimental build package 0.9' or something that requires platforms 0.9. Since 2020.1 I think they introduced a better resolution handler for when that situation occurs, makes sure the latest required is installed. It still wouldn't fix compile errors existing between e.g. entities 0.14 and platforms 0.9 but it helped with the overall mess that was before I think. It's also why they're trying to hide some of the packages - so you don't see entities 0.14 requires platforms package and install platforms package 0.10 first for example. I'm turning into a Unity apologist ๐ฅด
they don't need burst, everything is already compiled to skip the IL middle-man which is what gives the perf increase. The asm from C++ is just as good. Maybe burst is easy for some SIMD stuff not sure im not a C++ guy.
@mint iron not quite, Burst is faster than cpp
Burst is more equivalent to the ISPC thing
tho much better integrated/smoother to use
the reason is that Cpp is... bullshit
aliasing rules and other undefined behavior crap prevents the compiler from properly optimizing stuff. In burst, they use the knowledge they have from the native container rules for better optimization
ahh okay, i read the perf comparison thread on the forum and it seemed to be pretty much within the same zone. +/- like 5-10%
for example, NativeArray is faster than nativelist, because native array is guaranteed to never move (it wont resize), so you can cache some stuff and go ham with the memcopys and vectorization
@amber flicker I'm on your side, I'm under no illusion that with software as big as Unity there is any free lunch anywhere to be found. Packages have drawbacks, and not using packages has drawbacks, haha. Implementing ECS smoothly in a big OOP system is probably immensely difficult, considering they have to keep all the OOP workflow stuff intact.
I'm in no position to judge 'em. I can't even figure out how to make a custom editor work like the default inspector. ๐คทโโ๏ธ
@mint iron main thing burst (and ispc) have, is that they are a lot more reliable than cpp compilers. Its a bit more... known, what they will optimize
Use UI Builder if you can. So much nicer to work with.
in cpp is very easy to change some minor thing and then the compiler flips its shit and no longer vectorizes anything
or does all vector accesses through vector operator[] instead of direct pointer
that sounds like a nightmare
@amber flicker thanks, I'll look into it... I definitely don't want to spend this much time just on how the inspector displays.
I find it on the custom editor by default seems to be as such a low level, as I think people would mostly want to change how the info is displayed rather than the actual functionality. You should be able to change the appearance of how an array is displayed without having to reprogram how the array is ACTUALLY displayed, haha.
Maybe that's why they made UI builder... I shall go find out!
the most minor things can make the compiler stop vectorizing anything
specially msvc
i have some projects where i made a rasterizer (cpu renderer), and it was impossible to convince the compiler to vectorize any of my inner loops
@tardy spoke my guess is you'll be instantly more comfy with the uss (css-like) separation of style and content in UIToolkit
Perfect! Yeah, I'm a killer on CSS. That's exactly what I was hoping for - an approach along those lines would be more modern.
let me give you an example @mint iron
NOT VECTORIZED
and this is about as dumbass of a loop as you can get
@tardy spoke it's pretty good (though not as feature-rich as the traditional stuff) - text fields can't have rich text for example. If you don't already have a link: https://www.youtube.com/watch?v=t4tfgI1XvGs
also not vectorized
lol, yeah thats pretty atrocious if it cant do basic loops
but it does unroll the loop a few times
Thanks! Watching now. Haha I just need some pretty easy stuff, just trying to make a couple fields read only and stuff like that and don't want to spend a zillion hours figuring out the tradition customer editor until I need something a little more elaborate
and yeah could use propertyDrawers, etc
one other approach is Odin (asset store) - it makes some things like that, adding a button etc super easy.
Odin is really great, i would use it for closed source projects
wish Unity had bought that instead of Bolt myself
Wow no shit
Did you know, if you load a subscene, it attempts to get every SceneSystem in every World to feed the entities into that?
I assume Odin works with ScriptableObjects, etc? Does it tend to break anything or is just all positives? Hahah
{
var sceneSystem = world.GetExistingSystem<SceneSystem>();
if (sceneSystem != null)
{
var sceneEntity = sceneSystem.LoadSceneAsync(_SceneGUID, loadParams);
sceneSystem.EntityManager.AddComponentObject(sceneEntity, this);
_AddedSceneGUID = _SceneGUID;
}
}```
@tardy spoke imo hands-down best written asset out there. Very actively maintained, very fast and very considered. Main downside is making a nice editor that you can only share with others who have a license.
I've decided to integrate Odin Inspector into any in-house components. It's just too useful
Right. unless they're on your collaborate team or something hahah
If you're paying someone to collab, you can pay a few bucks for another license
Then I think they get access to all the project's licensed stuff
most asset store stuff is per seat (including Odin)
Except that Unity Collaborate... doesn't work...
^
@amber flicker I think it bypasses per seat restrictions?
there's no enforcement of Unity assets in general
it'll work, it's just not legal ๐
you can share the assets you bought from the assetstore.
most studios would make a generic account, and use that to buy stuff.
and git push it to everyone.
lol
pretty useful tho ๐
A smart move for Unity would probably be to take the highest rated store assets with most purchases and buy them and stuff them into Unity.
You reduce your asset store profit but probably just get more game devs in general on your platform.
they've done it a few times... to mixed results... latest bolt incident for example
bolt was the only good purchase imo
I think that was more a keeping up with the Jones' thing. Unreal has visual scripting, and that really appeals to "new" game devs to hook them on a platform, potentially.
probably not the place for this discussion - my fault for bringing it up ๐
so the only thing i need to push is the vehicles, environments, and the prefabs.
So, SceneSystem is just a fancy wrapper around SceneManager.LoadSceneAsync, and SubScene is just a way to identify and cram SubScenes into every world, along with the editor tools for interactive editing
So, Unity themselves just deferred unique hybrid entity serialization into Scene
There's other things in there like the metadata for the scene and whatnot, I'm not saying that it's just a dumb class, but.... It's not really geared towards single components. It's geared towards mimicking what we would use additive scene loading in the traditional sense
The scene reference tracker and the code to stream from the loading world into the target world is interesting stuff though
Easy to implement?
@violet cosmos are you just checking out megacity or is the plan still to do the project to update it to modern ECS?
Yusss
@tardy spoke So, what I learned about MegaCity is much of the talk, was implemented in ECS as SubScene
I'm looking through the entity scene loading code now and I can hear the presenter's voice in my head for the talking points I was curious about as I see this or that method ๐
oh man the entities cache from all the subscenes is huge
1.5GB
but the textures takes the cake, 15GB
Unfortunately.... In MegaCity, they're using SceneData components to load scenes, but that was deprecated in 0.1x? and I'm not seeing how scenes are loaded now
Ahhh, gotcha. So in that case, the sceneEntity is the "parent" scene
That's just from my stuff, that's not official Unity stuff or anything so take it with a grain of salt, may not be done correctly haha
wasn't megacity built with entities 0.0 or something
My game streams the loading of subscenes but I dunno if it's doing it "correctly".
i'll applaud if you manage to get it up to 0.14 ๐
Lol, there may be a reason they haven't updated it. Could be a big task.
the issue is... Where you do get the sub scene guid?
I'll invite you guys to so we could make it to 0.14 together
@violet cosmos entities.ForEach(Subscene subscene) ?
I'm actually curiuos where the start point is. Where do you call LoadScene("sceneName")
[Serializable]
public class SubSceneReference
{
public static implicit operator Hash128( SubSceneReference reference ) => reference.SceneReference;
#if UNITY_EDITOR
[SerializeField] SceneAsset sceneAsset;
public void AssignReference( )
{
this.SceneReference =
new GUID( AssetDatabase.AssetPathToGUID( AssetDatabase.GetAssetPath( sceneAsset ) ) );
}
#endif
public Hash128 SceneReference;
}
That's what i use to reference subscenes
SceneAsset just references an object with a property drawer that only takes scenes
@north bay I'm looking through ECS 0.14 and SubSceneReference doesn't exist. There's SceneLoadRequest
Oh, derp sorry
I derped out, my bad
But, I'm still curious... What's the ingress point to load a subscene?
Got it, it is SceneSystem.LoadSceneAsync
with the scene guid
Ye the whole think is kinda confusing
Yah, calling directly into the system is a bit quirky
So is cramming that subscene into all worlds
One interesting issue with world streaming that maybe you guys will have some insight on -
If you do a grid based Subscene system (each Subscene is a "tile") and the character stands at the corner of any of the grid, they're loading 4X as many "subscenes" as they may be at other parts of the game.
Any optimizations around that? The only one I can see is to make the subscenes as small as possible, but that's not super easy when it comes to constructing the world, etc.
Make choke points that are closer to the center of the edge
Make the corners not so useful to move
Ah, so circumvent it in the design of the level
I have my world map in blender and I can cut it up with a script into any size I want, I'm just not sure what initial size to start with and it'll be painful to change later haha
and by painful I mean potentially insurmountably difficult to change.
i think it's fine to just accept that, it is a possible scenario in the game to stand at corners so you don't wanna cut corners and not show certain tiles
Well, it's wide open terrain, 20km squared, and to have a big rock or castle at all intersections may be suspicious... also they would be huge because you can see 100m in any direction (or whatever I set the fog at), so they'd have to be huge rocks haha
One thing to do is possibly just... don't cut it up just now. Work on the huge world, and cut it up as part of a pre-build process
Make GameObjects that contain where you think sections might cut
i think it's probably fine, your bottleneck here will likely be gpu not cpu and things outside your view will be frustum culled anyway
however you should optimize your game for the worst case scenario
if your game can have 9 tiles loaded at the same time, run your local testing with 9 tiles loaded at all times and ensure it is fast enough
You can disable those sections and move and combine them easily
Another option might be to use a world streaming library, and let that do the in-editor work, but you override the export into SubScene
Interesting, but the world is so big one of the appeal of having it pre-cut into subscenes is literally just to work on sections of it at a time.
For example if I add JUST trees to the world, I'm probably looking at 100,000+ objects. It's likely it'll become impossible to work on a world that large at some point with so many objects.
fwiw I'd be assuming you have e.g. 30+ tiles loaded at once (rather than 9) - tiles/subscenes should be roughly at the scale you want to LOD (ala buildings in MegaCity) and you want to stream in and out relatively manageable slices rather than half of your visible world (so this also depends on how fast your player can move for example)
@hollow sorrel luckily my terrain is low poly so I'm thinking frustum culling may be my friend here, since i have an opaque fog as a set distance. Not sure how entity's frustum culling works yet though? Is it implemented/automatic or is that a manual process? I was looking in the stats gizmo on play and it looked like frustum culling was working because I noticed the rendered triangles changing as I rotated the character, but that could just be me not understanding something as well, haha.
yes frustum culling is automatic
tho i think hybrid renderer intentionally bypasses the automatic one so they can do their own culling in a system so that's a possibility too
Excellent, then it might just be "ok" anyway with the low poly terrain. Plus I have no lighting or textures (all vertex colors) so that terrain is fairly cheaply rendered I believe.
I'm on URP
so... hopefully it supports the culling and everything works lol
ye
@tardy spoke not sure how big your streaming tiles are or how fast your character moves but they cover a little bit on this in one of the spiderman postmortems
https://youtu.be/KDhKyIZd3O8?t=1001
Awesome! Perfect!
ooo
its a really good talk
well worth watching the whole thing
also considering mike acton came from insomniac and was their lead guy afaik, theres obvious overlap and you can see some of what I assume he was steering the company towards with data orientated design in their own engine work
I'm just lucky I have a set fog distance that is completely opaque, haha. makes it waaaaay easier
Then the plan is to jsut use z-rendering depths for things like far away mountains, but not sure how that's going to work (because I can't use camera stacking, etc... VR hates that stuff).
ohyea forgot you're doing vr, in which case you'll def be gpu bottlenecked, worry about cpu later ๐
Hence no lights or textures. ๐
On my initials tests I realized Oculus Quest has zero balls and can barely process anything, let alone at 72 fps
OK, I'm starting to understand why they used Scenes....
The writer serializes the whole current EntityManager, writing all the archetypes and everything into the header of the scene. So, instead of allowing the archetypes to be implicit and auto generated, they're declaring them as part of the internal file. So, right now ECS only operates serialization on the World level
It's just dumping the archetypes and data, not one entity and it's components
In that case, a Scene is the only logical way to structure it, and treat it as a distinct group. An entity and it's assigned components is just coming along for the ride with the ArchetypeChunk serialization/deserialization
That's also why it's necessitating an import world, and you'd need one per SubScene being loaded at the moment, otherwise things will get hairy until the process is complete and moved
maybe it would have been faster if I uploaded this on gitlab instead of github
I think you should have just uploaded the source code changes
Let Unity host the binary, and then someone downloads the GitHub which is just source and text file changes to merge in with copy and paste
(including package reference version updates in the project config)
Also.... Wow, if you load two different SubScenes at the same time I think there will be bugs
public static unsafe void DeserializeWorld()
which sets member properties as part of it's process
So. I can't do SubScene loading unless I'm very careful to only load one at a time (or it forces serial), which means I will have to group things
Some kind of weird queue system?
That's also why in the talk they mentioned it's on the main thread
ArgumentException( $"DeserializeWorld can only be used on completely empty EntityManager.
Yah, definitely all of this is MegaCity, code snippets from a prototype moved in, rather than API built to work with
That's why we don't have per-hybrid prefabs. It wasn't built for normal workflows, it was built to work on one specific class of problem for one specific prototype
Does a nativearray of classes play well with jobs/burst?
I wanna implement an octree that plays well with jobs
not with classes, no - they're 'managed'
there is one already i think, tho i couldnt make it work because i have no idea how octree works
I know there exist octrees, but I wanna make my own
Don't learn anything from copying code
@solid flume Once you put in any reference data, it's not going to play well with burst. Even one.
Annoying
Guess I'll just make it with structs and add a property for everything so its mutable
Burst is about optimizing instructions for data that is ready for cache, and taking your code and replacing it with best guesses for optimized instructions on the target chipset
Once you throw reference data in there, it really does gunk up that works
I really wish Unity would give us a roadmap for DOTS, like... what's coming up. Considering they have releases every month or two, it can't be that hard to share it publicly, right?
there's one scheduled soon
don't think they have any intention of making those kinds of promises / intentions transparent
^ yes please
there's a larger 'general direction of DOTS' roadmap/post expected soon - hoping that clears some things up
or maybe enable/disable components. hopefully its in the next release
Has anyone got hybrid renderer v2 to work? im using 2020.1.0f1, but I can't find RenderMesh or update the GhostAuthringComponent to include/remove these from the server
@prisma anchor Are you using an SRP?
HDRP
when you convert the entity, it doesn't have those components?
And what version of ECS/Hybrid are you on?
0.11.0-preview.7 for entities. It says here: https://docs.unity3d.com/Packages/com.unity.rendering.hybrid@0.8/manual/index.html
that hybrid v2 should be here if you have hdrp
Right?
@deft stump I would like an "enable/disable" systems toggle like how you can toggle a game object on/off in the inspector (before hitting play). Would be nice.
I know you can do it in ent debugger in runtime
but I often try a couple approaches with a system and i have to comment the whole first system out to try the rewrite
@prisma anchor I would say first... make a copy of the project, and try to update Hybrid to the latest. IIRC they did fix some rendering issues in newer versions
@violet cosmos kk, its on source control. thanks
Does anyone know of a highly performant mechanism for saving "snapshots" of individual frames, that could be rolled back to and resumed? Assuming full determinism elsewhere.
I think if you're going down the Hybrid path, it's worthwhile to always spot check latest. It's in super flux, but that also means lots and lots of bug fixes and improvements. And you'll have to pay that penalty bit by bit or in a huge annoying chunk
@whole bronze Copy the World into a new one. I think someone here was doing that for physics rollback
I forget who though
Any code snippets or blog posts you could provide? I'm kinda new to DOTS. (Then again, who isn't, since it's in preview.)
Hadn't considered using worlds for that purpose though. I'll definitely check it out.
Don't have that, but maybe the person working on that physics thing can chime in if they see it
@whole bronze make a new World
Then use EntityManager.CopyAndReplaceEntitiesFrom
To copy your world into that one
Neat. Wasn't aware that function existed.
Assuming the world does not have automatically running systems
It can be kept as a snapshot long term
Just use the same method to copy from the snapshot into the original world when you need to restore it
Yeah that works perfectly for my use case. Thanks.
Worlds are really cheap, right?
to make no
Especially Worlds with zero or few systems
ho with 0 systems yes
What about with a few systems?
but we talkin about conversion worlds 
the SceneSystem's companion SceneSectionStreamingSystem create 5 worlds. If I was to use those in a separate World, to have it's own scene loading, it would make 5 additional ones too. But, I think those are mostly empty staging worlds, and purposefully empty because the SubScene loading demands the EntityManager be empty in the staging world
I guess creating 5 more nearly empty worlds isn't so bad if people are out there making a World per physics step for rewind
Unity assumes you'd only want one scene loader, but they give you no affordance to target which World a loaded scene will go into
i saw a forum thread somewhere about how to load subscenes into a specific world :S i don't have the link sadly, but its apparently possible.
That may have existed before, but not now. The SceneSystem loads it into the current World it's attached to
Maybe you could trick it by putting a system on the staging world, but then you'd have to try and filter
There's a few minor changes that would have made multiple much easier...
- Separating out the Editor logic
- Adding LoadParameters.TargetWorld
- Making SceneSectionStreamingSystem public ๐
- Using GetOrCreate<SceneSectionStreamingSystem> in SceneSystem rather than assuming (then it's fine it's not public)
- Allowing you to name and control SceneSectionStreamingSystem settings so there's not duplicate conversion/staging worlds all over
But really.... This does a lot of great stuff, just not so well put together as an API to use. It's very square in what it does
Interesting....
public enum SceneLoadFlags
...stuff
/// <summary>
/// Temporary flag to indicate that the scene is a GameObject based scene. Once addressables are in place, this information will be stored there.
/// </summary>
LoadAsGOScene = 512,
you can always put Entities in Assets and fix it yourself for the timebeing while it's bstill trash 
Oh, I'm working off a local package, because it's easier to dig through. It's super tempting to modify it but I'm trying to avoid it as much as I can
But, I'm still having trouble where to get that GUID for the subscene now that SceneData is deprecated
Oh, well even more dumb. The "way to get it" is to add a SubScene MonoBehaviour to some GO in your current scene. Then drag a .scene file into the SubScene property. So, then it just exists as a normal sub scene in the editor. Still doesn't help me load things on the fly, unless I save that as a prefab with a SubScene, and then load that, which then can get the GUID to load the Scene
Who designed this?
Also, FYI SubScene is unique per GO
Well, I do get that it's useful for a full in editor game though
I'm actually not upset at it, I'm just upset it doesn't do what I need because it was so narrow focused and small changes could have been made to extend the functionality
I am at intermediate level in unity oops flow but just starting out in project tiny
Can you please say what things should I know
Thanks in advance
the one stupid modification that I want is ecb stopping to throw on components with entity
just cause MuH BaD PrAcTiCe
Dunno much about Tiny, but here is a good place to start for DOTS in general.
@wheat stump https://github.com/DOTS-Discord/Unity-DOTS-Discord/wiki
The wiki on that GitHub ๐
woops.
@violet cosmos yeah in my workflow the subscenes are GO's, that's how I get the GUID. I would have no clue how to get it if the subscenes were generated in code, haha.
Also Odin rules hard
No, I get it now why it's just the GUID.... It's about authoring in place and breaking down big levels into small ones. MegaCity use case
It's not like regular scenes where you can just load that. Without SubScene pointing to it in your MainScene, it's almost useless
With SubScene, it's actually a piece of cake
See, now you're on the path ๐
Yeah, I just anticipated authoring the editor windows would be a lot harder than it was, hahah.
My recommendation is to make a bunch of test versions that are easy to instantiate, make sure it works
If you have Odin Inspector you can make it a snap
Yeah, it looks more complex than it is. I'm sticking to just show dialog and go to location pretty much for now. Gotta see how I'm going to be able to store all the progress for the quests as well.
Yeah test quests for sure.
Also I might be able to make a quest "tester" that kind of just "plays" the quest back in the editor so you can make sure the instructions flow and makes sense.
Yeah I bought Odin. It's already paid for itself. I had this pretty much done with custom editors but it took way, way, longer, so I already know this is going to save ... literally probably DAYS of time.
Odin is great, you won't regret it. They also have a Discord
ecb stopping to throw on components with entity
@zinc plinth
this sounds like something i had to deal with last night
or maybe i misunderstood, what's your problem?
If you SetComponent from ecb with a component that has a Entity field, it will throw just out of bad practice cuz the entity could be already deleted
Which is the fucking stupidest thing ever
oh yee i ran into this same thing last night
Thanks @tardy spoke
I really want to edit Entities in assets just for this
mine actually crashed entire unity every time instead of just throwing an error, dunno if that's what you meant
which is absurd
but
it's sorta by design (not the crashing part)
Is there a way to query another EntityManager?
@violet cosmos yes - keep a reference to it or its world
@hollow sorrel editor shouldnโt crash if you have jobs debugger on I think. It might if youโre on an alpha but generally if that happens is because burst and debugger off I think
@amber flicker I just don't see how to form the query ... I have a reference to the World and EM
@zinc plinth is this if you try to do eg โecb.SetComponentData(entity, new MyICD(){ value = someEntity}โ?
any type that has a Entity field
@violet cosmos donโt understand the issue - just entityManager.CreateEntityQuery etc as usual?
public static void SetComponent<T>(this EntityCommandBuffer ecb, Entity e, T component) where T : class, IComponentData
{
ecb.EnforceSingleThreadOwnership();
ecb.AssertDidNotPlayback();
ecb.m_Data->m_MainThreadChain.m_CanBurstPlayback = false;
AddEntityComponentCommandFromMainThread(ecb.m_Data, ecb.MainThreadSortKey, ECBCommand.SetManagedComponentData, e, component);
}
internal static void AddEntityComponentCommandFromMainThread<T>(EntityCommandBufferData* ecbd, int sortKey, ECBCommand op, Entity e, T component) where T : class, IComponentData
{
var typeIndex = TypeManager.GetTypeIndex<T>();
var sizeNeeded = EntityCommandBufferData.Align(sizeof(EntityManagedComponentCommand), 8);
#if ENABLE_UNITY_COLLECTIONS_CHECKS
if (TypeManager.GetTypeInfo<T>().HasEntities)
throw new System.ArgumentException("EntityCommandBuffer.AddComponentData does not support managed components with Entity fields.");
#endif
@amber flicker Thanks!
i was typing up a very detailed explanation but come to think of it mine only crashed in a very specific situation that i doubt you had the same, what were you doing that made setcomponentdata throw an error?
just set a component with an entity field ? that's what I just said
yo
it's not bad practice
read the code
what line are you referring to
there is one throw in this code snippet
EntityCommandBuffer.AddComponentData does not support managed components with Entity fields.
oh
you're using managed components
1/4
internal void AddEntitySharedComponentCommand<T>(EntityCommandBufferChain* chain, int sortKey, ECBCommand op, Entity e, int hashCode, object boxedObject)
where T : struct
{
var typeIndex = TypeManager.GetTypeIndex<T>();
var sizeNeeded = Align(sizeof(EntitySharedComponentCommand), 8);
#if ENABLE_UNITY_COLLECTIONS_CHECKS
if (TypeManager.GetTypeInfo<T>().HasEntities)
throw new System.ArgumentException("EntityCommandBuffer.AddSharedComponentData does not support shared components with Entity fields.");
#endif```
ho right it was for a shared component
yea that makes sense
it doesn't, you can make that command still from the EntityManager
either give us the option or don't
ecb remaps entity fields so that you can reference an entity in an ecb before it playbacks
when you do ecb.createentity the entity will have id -1, -2, etc, but you can still reference that -1 and unity will check your ecb component fields and turn that -1 into a real entity id when it playbacks
so i'm not entirely sure why that doesn't work with managed components but maybe they can't guarantee that you don't change the entity id while it hasn't played back yet
but it should work on already created entities
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
conversionSystem.AddHybridComponent(GetComponent<ParticleSystem>());
conversionSystem.AddHybridComponent(GetComponent<ParticleSystemRenderer>());
dstManager.AddComponentData(entity, new PrefabToEntity { PrefabReference = entity });
}
So, while I see the PrefabToEntity component on my entity in the editor world, when it's saved to a subscene and then deserialized, I'm not seeing that come through. What would be the reason for this? (PrefabToEntity is marked as Serializable)
In fact, in this case none of the hybrid things are coming through when the scene is loaded ๐ฆ
The parent, child and mesh and things are coming through. Just not anything "hybrid"
๐คฆโโ๏ธ
If the MonoBehaviour that implements IConvertGameObjectToEntity is in a namespace, the serialization or deserialization just ignores it ๐
The IComponentData can be in a namespace, just not the MonoBehaviour
Something like this for ECS would be bomb.
With the mods to start simple and then explore certain aspects/concepts.
@violet cosmos I added HDRP and Hybrid renderer v2, now I get a ton of errors in unity i.e : 'ShaderConfig' does not contain a definition for 's_ProbeVolumesEvaluationMode'
did you also configure the project to use Hybrid V2?
I thought you had those already
Yea, I installed hybrid renderer package 0.8.0-preview...
Then HDRP, then added the #define
(I'm doing something wrong) lol
Don't worry man, we're all up to our ears in "wtf are we doing?" and drowning in it. Someone needs to open the documentation drain
I'm just going to switch to URP until this is working
speaking of "wtf are we doing" i have no idea what i'm doing
i've seperated simulation from rendering but i'm not sure wether to make simulation entities reference rendering entities, so when copying positions/data, iterate sim entities
or make rendering entities reference sim entities, so when copying positions, iterate rendering entities
@dusky wind you were using gameobjects for rendering right, how are you passing data between them?
btw do worlds get processed sequentially or in parallel ?
sequentially but their jobs get processed parallel
what's the point of the simulation/rendering separation then ?
unless you mean in my case in which case it's all fully sequential, sim always completes before render
sorry misunderstood
it's so that i can have deterministic simulation
Is there a way to check if the Initialization group has run or not?
how is it not deterministic with a RenderMesh in your entities and a PresentationGroup?..
Is there any document containing all of preview package urls
@zinc plinth you only include specific components for checking determinism
this way i can run simulation at a 60hz fixed rate but rendering can still be done at 240hz or whatever player wants
i also want rollback so should be able to run simulation 8 times in 1 frame but rendering should still only render 1 times
Thanks @tardy spoke
๐ ๐
ah deterministic on hz
@hollow sorrel I haven't set it up but I will have a hard sync point to push data out in the presentation group
Welp, CopyEntities, CopyEntitiesFrom don't copy the full structure of parent/child. Also, you can't just instantiate an Entity reference from another Manager
Wait it should
It's not, but I'm moving Hybrid data with it too. It's only copying the top
Ohhh
So the top has hybrid data, and the child is just a dumb sphere, but it's only copying the top with hybrid data and ignoring the child
As in the child is a managed object?
I don't think so. The child is just a sphere
hmm i guess my main issues with either approach is
sim has reference to render = can't use Entities.ForEach because i'm iterating a different world
render has reference to sim = would need to check if their references still exist before copying their data
maybe i should just do both?
circular reference?
has college vietnam flashbacks
NativeArray<Entity> ents = new NativeArray<Entity>(results.Length, Allocator.Temp);
NativeArray<Entity> copies = new NativeArray<Entity>(results.Length, Allocator.Temp);
for (int iE = 0; iE < results.Length; iE++)
ents[iE] = results[iE].PrefabReference;
//EntityManager.CopyEntities(ents, copies);
EntityManager.CopyEntitiesFrom(prefabManager, ents);
@dusky wind As you can see, I tried a few things
Yeah instantiating entities I don't think copies the hierarchy
Correct me if I am wrong
Well, that was a last hope haha I tried CopyEntitiesFrom first
"CopyEntitiesFrom(EntityManager, NativeArray<Entity>, NativeArray<Entity>)
Instantiates / Copies all entities from srcEntityManager and copies them into this EntityManager. Entity references on components that are being cloned to entities inside the srcEntities set are remapped to the instantiated entities"
Fyi Instantiate will copy hierarchies if you use the dual nativearray version
But yea, not sure how/where hybrid breaks that pattern
How do I initialize that? The same length as the source entity array?
I think it might make some sense that the hybrid stuff is expected to be on the lowest branches? Otherwise I donโt know what happens with transforms and stuff.. unsure
I think it might even take a list as second param? Would need to check but on phone
@violet cosmos just checked - it is two arrays - I gather all entities in a hierarchy (sometimes you can just use LinkedEntityGroup if you already have one) and then yea, initialize the dest array to the same length
all inter-entity relationships within the group are remapped as you'd expect
But, in this case I just have the reference to the parent. Do I have to go through a recursion/select for Parent where Value = parentID?
or iterate through the child buffer recursively, yup
afaik there's no nice built-in GetComponentsInChildren equivalent
๐
I really wish I was making a game that was just a million cubes rotating in a circle and changing colors
I'm going to see if Instantiate + Move + Query helps
the interesting thing is I think suddenly we'll be back to the days of 'having a library of code' actually being really valuable. So many systems are broadly applicable.
This is the kind of things I'd think that ECS should provide, but anything with Hybrid isn't an API
Before I get too far into this.... What's the interface I use to have reference types in my entity queries?
I'm thinking of putting a reference to the GameObject and seeing if that finds/copies it better
doubtful that'll live through serialization but...
Don't follow again sorry ๐ฌ
Entity clone = prefabManager.Instantiate(results[0].PrefabReference);
prefabManager.AddComponentData(clone, new ClonedReadyToMove());
EntityQuery qClone = prefabManager.CreateEntityQuery(ComponentType.ReadOnly<ClonedReadyToMove>());
EntityManager.MoveEntitiesFrom(prefabManager, qClone);
Nope ๐ฆ
I'm starting to see why Conversion Worlds exist. ECS has API to copy the whole structure. But only when you totally void out one EntityManager and move it into another
Considering Copy/Instantiate/Move don't consider the hierarchy of an Entity, will Destroy() ?
The answer is no. No it doesn't
OK, so I have a decision to make right now, because this is getting out of hand
- Forget everything ECS. See you guys in another year for my annual DOTS revisit
- Build all the real-world tools that have been completely ignored on the path to "millions of things!" tech demos
- Rescope my entire game and goals fit into the limited scope tooling of ECS
How to disable gameobjects in dots
I want to enable and disable the entities in dots what is the solution
please help
There isn't, afaik
Another real world problem Unity ignored, which could have been as simple as DisableTag and updating their systems to filter it out
You just don't want to draw it?
Yeah
Then make a IComponentData that is an identical copy to RenderMesh. Copy RenderMesh into RenderMeshShhhh. Add RenderMeshShhhh and delete RenderMesh
Maybe, haven't tried it. But might work
thanks @violet cosmos
Might just throw a bunch of whacky errors haha
Lol, I will try it out and update๐
You might be able to just do that with Translation too
Try Translation first, it's easier
Yeah i am actaully doing it with translation right now
Let me know if that works
Nope. Many people have brought up there's no Disable
is this a better way
there's a disabled component, works for me in pure ecs
@violet cosmos https://hatebin.com/nwqyoynaqf
Thanks for helping me @frosty plume @manic aurora
Anyone got this error
How to solve it if you got it
Build Win-Dotnet failed after 31.07s.
F:\Demos\Tiny2\ProjectTinySamples-master\Tiny3D\Assets\Scripts\Components\KeyCodeValues.cs(9,12): error CS0246: The type or namespace name 'KeyCode' could not be found (are you missing a using directive or an assembly reference?)
F:\Demos\Tiny2\ProjectTinySamples-master\Tiny3D\Assets\Scripts\Components\KeyCodeValues.cs(10,12): error CS0246: The type or namespace name 'KeyCode' could not be found (are you missing a using directive or an assembly reference?)
F:\Demos\Tiny2\ProjectTinySamples-master\Tiny3D\Assets\Scripts\Components\KeyCodeValues.cs(11,12): error CS0246: The type or namespace name 'KeyCode' could not be found (are you missing a using directive or an assembly reference?)
*** Bee build failed (30.20 seconds), 299 items updated
Does anyone know fix for this
I amm working on projectTiny and trying to get input from keyboard
while I am trying to make.
might have something to do with new/old input. either you have new input installed and it expects old, or the other way around
dunno anything about tiny specifically tho
Is there a way to tell if the InitializationSystemGroup has run or not?
in code, or just while your game is running?
@manic aurora in code
I have a external piece of code that should only run when the world is done initializing.
Ugh making stuff work with dots is such a headache
its worth it \o/
it took me like 3-4 months until i figured out stuff, and now its like a puzzle
at least about gameplay, not really sure if you want to implement very specific things like octree or pathfinding etc.
I need an octree
I just realised how fast octree sizes grow
Octree with n depth is (pow(8, n)-1)/7 nodes
Okay I think I have an idea
@dusky wind there's no like...property. might be simplest to call it from a system that's annotated [UpdateAfter(typeof(InitializationSystemGroup))]
Can job structs inherit from other non job structs?
@wheat stump @violet cosmos there is a "utility" component to disable rendering called "DisableRendering". No one knows about it. It is a secret apparently. entityCommandBuffer.AddComponent<DisableRendering>(EntityNameHere);
it's been around
@deft stump just noticed @wheat stump was asking for something like that, I think.
@manic aurora is there some sort of "true" disabled component tag? What's it "do" exactly? haha
it's exactly as it says.
when you disable a component, the query will just think that it doesn't exist at all.
you'll still get fast-cache-friendly code.
great thing about it, is there's no achitectural changes.
@opaque ledge I'm on your side about ECS being the bees knees. Probably because I'm learning ECS patterns as well as OOP patterns at the same time and I'm looking at OOP patterns like observer patterns and state patterns and interfaces, abstracts, protected, etc, and so far the ECS stuff is a loooooot easier to understand. It's just far more objective in how it's architected in general, which makes figuring it out a lot easier.
Constructors/field classes and getters/setters are total wtf in my mind. They're not that complicated, but I think you have to work with them a while to understand why they're so useful or have became very prominent patterns in the language compared to a more functional approach.
@deft stump I guess my main question is, if I disable a component, is it skipped entirely by renderer, in my case URP?
If it is, hallelujah. If not... f***.
@tardy spoke are you asking the about DisableRendering tag which disables the rendering of an entity? or the disable components feature that hasn't probably arrived yet?
either way, I'll answer both scenarios:
if it's the former: yes, the renderer skips it.
if it's the latter: nani? what you mean renderer? it's done through the Unity's ECS itself. the renderer doesn't need to touch it.
when you disable a component, the query will just think that it doesn't exist at all. <-- whatever disable a component means
Torsina was saying at least in HDRP disableRendering doesn't truly disable rendering (computationally) I believe, but I have yet to check in URP and I maybe misunderstood
Depending on the complexity of this Unity example I may make a Wiki/YouTube tutorial of converting it to DOTS
Torsina was saying at least in HDRP disableRendering doesn't truly disable rendering (computationally) I believe, but I have yet to check in URP and I maybe misunderstood
@tardy spoke I tested in URP before. (2 weeks ago). and yeah they do get disabled.
I dunno what Torsina's setup though.
also, can you make me a part of the wiki-organization? I want to transfer the bullethell game's ownership to the org, still making it private since I haven't had the time to see if it still works or not
Invitation sent
@tardy spoke Yeah thats true, i can understand OOP can be seem complicated at first especially compared to ECS, but OOP is very popular for a reason, i tried to create a quest/mission system using ECS, it worked alright but it was getting overly complicated especially since i tried to do it modular, then i moved my mission system to OOP and its FAR FAR simpler and easier to make missions now, it simply made my workflow faster and i can create missions very easily, so i decided to stick with OOP when it comes to mission/quest system.
Data oriented design and Object Oriented Programming is kinda opposite, DOD is for machine to understand easily and human readibility is hard, while OOP is for humans to understand while machiene will have hard time understanding it
I think both have a place in game development
its just.. don't try to implement everything ECS way (imo)
also my game is on google store now but its not properly being rendered QQ i have to figure out if its my phone or hybrid renderer stuff or shader stuff
its just.. don't try to implement everything ECS way (imo)
@opaque ledge Yeah. I guess for mission critical parts, just ecs it, if the concern is performance.
my mission system are using Events to check if mission is a success or failure or continuing, so it doesn't have Update method, and there wont be hundreds of mission that will be run, so i have literally 0 reason to make it ECS (in my case)
@opaque ledge what's the tech behind your mission thingy? Using "graph" type objects?
I'm currently working on the first quest system I've ever made, and it's "ECS" based using scriptable objects for the quests/quest step data, and it doesn't seem tooooo bad, but I'll have to see what it's scalability is like down the line.
I made a vid for it I was showing to my bro here, but it's not very detailed or anything. Might get the idea across. https://www.loom.com/share/6e63441b5d824c01a6f1d8ff911436c3
Also @manic aurora will notice I'm wearing my sweet Horsin' Around shirt, haha.
Click "open original" on video or whatever.
Is there any nice container for precisely 8 float4 that plays well with jobs
I don't want native arrays
WhyIsntFloat4x8AThing
The idea of that quest System is it'll do something like delegate all (eventually) of those quest/interaction steps out to separate systems that do an ECS "callback" with a tag on the Quest System (which I call the Interaction system because it also just handles any sort of interaction, not just "Quest Givers") when the "step" is complete.
I'm not sure what that will end up looking like, but that's the idea.
I also have to figure out how to cram that into a global state, which I already have a pattern for, but not sure if it's a good pattern... haha... will also figure that out later I'm sure.
ooh thats pretty cool ๐ But mine isnt like that, its all hardcoded right now, i didnt bother with modularity because i am making it to mobile
@tardy spoke did you turn those SO's into blobs?
@deft stump Ha, my friend, I stopped giving a shit about performance optimizations a long time ago! Ho ho ho.
my disappointment in you is immeasurable
They're straight reference for now. Down the line I'll look into it when I'm better at this, hahah.
๐ช
Yeah, I've given up on optimizing until later till my understanding is better because I know I'm going to end up redoing a loooooot of these Systems.
I'm not even super confident in my state pattern atm, and it's running through quite a number of Systems
BlobAssets are cool though, I do dig them.
And realistically if my game is intending to have like 10,000 zombies roaming the landscape, the biggest optimization reward is definitely going to be on any systems that affect them, haha.
That said, as I'm developing for oculus quest sooner or later nearly everything will have to be optimized ... and even then it may not have enough power to run this shit. It's pretty lame in the power department.
when i tried to implement ECS mission system, i made "objective mapping" component, each objective (i guess that would be the "step" in your implementation) would hold their own mapping, and when an objective finish with a state it would add "ObjectiveOver" component to Mission Entity with state data in it (it was a byte in my case) then mission Entity would look at current objective's mapping and look at what entity should be the next objective and put "ActiveObjective" tag on it and remove that tag from the current objective, thats how i made my ECS mission system, so this way would allow an objective to end with different states instead of just "success" or "fail", this can include optional objectives inside an objective
That sounds similar, but I think probably more flexible in my solution
but it was early implementation, so i am not sure if thats the best way to do ti
oh your system also have that ? great the haha
i didnt see any branching inside a mission
No, it has no branching. I intentionally left that out.
Due to potentially added complexity in authoring and debugging, haha.
And really I've never played a game that had branching logic and be like "wow the way that quest branched was so FUN!!!", but I love good linear stories so I may be biased, haha.
I believe yours works similar to mine but you have branching logic.
Mine hold's a component on the "Interaction Giver" (quest giver) that holds the progress through the quest as an int.
haha ๐
but i am sure you encountered those kind of missions, like a npc would give you "save my daughter" and if you are able to save npc's daughter then next objective would be "Bring the daughter to npc", if you couldnt then "Bring the bad news to npc" etc.
Nice and simple. Everything must be a linear progression, but that to me allows more potential complexity in the linear progression itself as steps can be added that may not play nice in parallel without too many concerns - POSSIBLY, that's just a hunch.
but i gave up on the idea later on at least for my case because there wont be any branching in my missions haha
@opaque ledge oh absoloutely. If I could have the advantage of having branching logic with no drawbacks I'd definitely take it, but you'll notice a trend with my game that it the specs seem to oddly reflect the things I can figure out how to do in short order... ๐
One of my favourite memories is playing NeverWinter Nights: Hordes of the Underdark with my brother which went absolutely insane on the branching conditionals on the quests. Some NPC is like "hey please do this quest!" and I just out of curiosity attacked the NPC and killed him and apparently that was a valid way to complete the quest... they thought of everything. We laughed so hard, it was so unexpected... usually you can't kill important NPC's. ๐คทโโ๏ธ
nice
can't put it in gitlab
and also can't put it in github
azuredevops (I doubt anyone uses them) then
megacity... more like mega headache
The upload limits seem weird considering the point of the services is to... upload.
modern games allways tend to have quests be too atomic
Morning! A quick note on the โdisabledโ discussion. If youโre using Hybrid Renderer V2 there is a โDisableRenderingโ tag which disables most of the associated render work. More generally you can add a โDisabledโ tag to any entity at any point. The aim is similar to disabling a GameObject. The entity will be ignored by all systems except for systems that explicitly require the disabled component. Lastly, in the future every ICD will have its own .enabled state. I would guess that would replace eg the disablerendering tag eventually by doing rendermesh.enabled= false or something.
with a quest being its own little world and very little cross-quest interaction
Morning? It's 2 am here ๐ค
if you look at much older RPGs, you can often see them having quests that then have sub-quests, and subquests with multiple possible ways of solving them, some of them when interacting with other quests
Gothic 2 was a master-class in this
@vagrant surge I agree. To me the depth of story telling is far more "fun" than branching logic/decision making, that's a preference
in that game, the first main quest is "go talk to the king to warn him about dragons"
But my favourite games are half life and uncharted, etc, linear stories, haha.
but to reach the king you gotta enter the city, and the guards dont let you so easily (first subquest)
then the guards in the nobles-quarter of the city wont let you enter if you arent a citizien, so second subquest there
and the king will only speak with someone if he has a very strong excuse, so gotta find it (third subquest)
and each of them having more subquests, and general flexibility on how do you solve it
btw, sneaking up and climbing the walls is considered a good way of solving the "get into the city" part
but the thing is that quests are interconnected in general, so it feels far more organic
thats sounds like a gameplay branching tho, not really quest branching
its also significant level of quest branching, as to become a citizien, you need to join one of 4 masters and become apprentice
which each has its own quests to do so
ah okay nvm then ๐
and to speak to the king, you need to join one of 3 mayor factions, which is a serious subquest chain
i was about to give dishonored example, quest branching would be frame, and gameplay branching would be sneak your way in, kill your way in, use your magical powers etc.
for example, if you want to join the magues faction, you need to spend some time as a novice in the monastery doing quests for the older magues, and then do a full-map trial
(its by far the hardest path)
imagine dragon will come by the time you become a citizen ๐
if you become a mercenary, you have to convince the other mercenaries in their zone. On every mercenary, you have the option of doing a quest
or beating them in 1v1 duel
That sounds awesome, but since I'm making an MMORPG keeping the quest states "similar" is a huge advantage in terms of complexity.... an MMORPG with branching logic would be ... hard.
some of the mercenaries actually give you completely bullshit quests
like killing an endgame-level enemy
I hate saying I'm making an MMORPG since it's not yet. That's just the idea. I may be making a "nothing" since making an MMORPG is hard. ๐
but you can actually cheese the game to do the quest, and then they go "wait, you actually did it?"
One thing I liked about fallout 1 and 2 is that you could kill the merchants and you actually got access to the store gear they had on hand. That was interesting.
for me i quite dislike the modern action-rpg type games, assassins creed is such an extreme example
Of course guards would come and kill you or whatever, but it was an interesting mechanic.
its quests are all MMO tier quests
not only completely linear, but also stupidly simple
its allways "go into this enemy camp, and either capture it, rescue someone, or kill the leader"
witcher 3 did it much better, but its quests were still completely atomic in themselves. No quest really interacted with other quests
its interesting that games from the early 2000s are still completely unmatched. Gamedev has regressed in this front
I agree "traditional" questing system are over applied to genres that would be more interesting or have more depth without 'em.
Also when people try to tell stories with quest systems when it's a single player game I always think... just make it a linear story. You're making a story anyway, why not use the best mechanisms to tell it?
To me that's like breaking a movie up into little chunks that work in a linear fashion that kinda tell an okay story vs all the advantages you have if you do a true montage of footage. IE you can run forward through time or back through time or use false narrators etc, all the tricks film uses to tell stories are hard to apply to quest systems effectively
i think for questing in a game like this, the best way is to not hardcode things too much
And that was part of my decision to not allow branching logic - I can tell a better "narrated" story if the quest system is "atomic".
an example is something like a quest in gothic 2 where the blacksmith acts you to bring him an orc weapon. Any orc weapon
you have to find one in the map
And the technical challenge there is if two people do the same quest at once it's difficult if they make any sort of different decision to keep track of that state, it would make the game worlds they experience totally discrete
but the thing is. There are many ways of doing it. You can actually kill an orc (high level enemy), or find a way to steal a weapon or loot it from a dead one
That's an interesting concept. It's very "D&D".
I think why a lot of games don't do "D&D" is ... it's hard haha
yeah, it is
specially due to testing
atomic quests are very easy to test
there are no external variables
but a lot of this more open ended and interactuable quests are... much worse to test
I think linear story is extremely difficult (making a curated 10+ hour experience is a TON of work) and totally open world is also an absolute ton of work, but a "questing" system kinda falls into a safe, easy spot comparatively. It's more finite in scope. I can copy paste new quests, make ones similar to old ones, etc. Make grindy repeated stuff.
Divinity Original Sin also does this sort of open ended quests a lot
they have a great level of flexibility on stuff
the thing is, i believe that high choice high interconnection quests are better for games
it needs a smaller world, which means less budget
and it adds replayability, because players might want to try other paths
their downside is that they need more work on the quest design part
but the actual "asset" part is actually diminished, as you can do more with less world and less enemies and similar
The way I'm planning to get around needing to make a zillion quests or a super long curated experience in my game is to have real player death, where if your character dies you literally restart the whole game.
People are going to fucking hate it.
But some of the roguelike players might like it. ๐คทโโ๏ธ
Gothic 1 and 2 had very small budget and were made by a team of like 20 people
And I think it's kinda funny so...
I'm literally on the fence about allowing unpenalized PK-ing.
but for something like that, high degree of branching in quests is needed
Because it's... interesting.
so that people can try other paths
Like it's something different. I'm not going to make the best MMORPG... but if I can even manage to make one, I can at least make it one of the most interesting.
the issue with mmos really is the content
@vagrant surge the way I achieve the branching of quests would just be in the "number" or quest lines
something ive tought about a lot is to do something more... sandboxy
for example, taking clues from survival games
not having 1000 players
having 60
So not true branching, just because the scope would just get too out of hand for me at the moment
on a relatively big world
and have the mechanics be more sandboxy, maybe with autogenerated quests
@vagrant surge that's a really, really good idea.
The fun of MMORPGS isn't really the amount of people IN the world
look at the popularity of stuff like Ark and Conan
It's mostly just the fun of playing with other people, mainly of which are the people IN your guild
i think something of that style, but more mmorpg + sandboxy style could work well
and the experience would be far more engrossing and stuff if a lot of those other people were not even there at all
For me it never made sense that EVERYONE in an MMO is a hero. Like... how does that make any sense hahaha
There's more heroes than townsfolk.
issue with a project of that kind, is that you need a lot of assets
you need to be able to create a legit fantasy world, which even if you spam the hell out of the store and megascans, you still need the level designers
the tech itself is doable, but for a single programmer.... you would need to essentially be god
i know some guys who are making an open source version of WoW
mostly for fun
and research
they are using ECS and dots-style techniques
they can render the entire world of world of warcraft
at once
just from pure bruteforce
and put like 2000 players in the same zone
its quite impressive how this sort of techniques scale
the guys literally have a much faster terrain renderer than blizzard does and its hilarious
I'm under no illusion that skill makes a project such as creating content for an MMORPG any sort of "realistic" task for one person though. As I said, you'll notice the specs of my projects change to what I actually think I can actually accomplish in a span of 2-5 years, haha.
I do have my buddy helping me though who's also a modeller.
But here's the real secret -
I'm just likely to use Synty assets. For literally almost everything. To make it easier, the specs now call for an electic game world that interesting matches the Synty store assets... there's a typical kingdom, a feudal japanese kingdom, a wild west kingdom, a futuristic sci-fi floating city, a modern city kingdom... ๐
I've actually tied it all together with a bizarre story that there was a nuclear meltdown in a modern city and basically civilization split with different leadership philosophies about the best way to live, but then zombies started coming out of the radioactive city so they're all at war with it trying to get in and shut down the "reactor" or something like that. I care more the visuals are interesting and different than they make sense. Why would there be a "wild west" kingdom? Because it's cool. That's why.
horrible idea
sinty assets suck
and they are too known
i know for a fact because i tried to do almost exactly the same
They're known to people that make video games
Lol dude, 90% of hits on the radio use the same drum samples, I can hear that all day long, but does someone who's not a professional audio engineer care about that, or do they care if the song is good?
All the combat clips from souls of corruption together. Taken from the prototype as of day 10/04/2018. Not for public showing.
the problem is that sinty assets suck much more than you think
going with a realistic graphics by spamming the absolute hell of megascans is a much better path
the problem is that sinty assets are horrible optimized AND they cant be LOD-ed
you also need super good lighting to make the flat stuff pop
and for non gamers, it looks like shit
realistic graphics are much more sellable
there is also the issue of making new assets in similar style. Due to the strong art style, you need to match it, and thats a problem
specially because you can only use sinty assets
if you go with a more realistic style, you can use a massive amount of assets, as half the store is realistic assets
i consider attempting to go with sinty for this project a pretty bad idea and a huge mistake
Dude that combat system is AWESOME, hahahah
it is
the core combat i got there is the best vr combat system of all
specially stuff like 1v1 duel bossfights
@vagrant surge I'm developing for Oculus Quest so... mega scans... lol not happening
sinty is harder to render than megascans
you cant make lightmaps on sinty assets
you can make lightmaps on megascans
this prototype was for PS4
i was struggling on perf given that i needed dynamic light and SSAO
and having dynamic light + ssao in a PSVR title is about as HELL NO as you can get
Are you "selling" the combat system working? What happens if you were to just stab through an enemy and just "jiggle" the sword?
ssao takes 2 miliseconds out of 8 miliseconds of budget
enemies go back. You also cant damage them again until you remove the sword from their body
Still, what if you were to just kinda "wiggle" the sword, could you do unrealistic damage or is there something preventing that?
if you hit their shield, they become invulnerable even if you keep the sword inside them
Interesting, that is very cool
its a very arcadey system
but its done like that for maximum playability
i experimented a lot with physics based systems. I made blade and sorcery and boneworks before those 2 existed
but i considered those systems to be absolute shit
they look great in gifs but are horribly janky when used
boneworks is the best example
its basically unplayable due to the level of clunkyness it has
you cant be accurate with any weapon due to their inertia, and its super hard to use even a simple hammer to bonk a zombie
but it looks great in gifs
easy money
Well wouldn't a representation of a sword being unattached from where your hand is in real life cause discomfort?
My thought for something like a great sword is a game shows where your true hand is in real life but if you swing say a huge great-sword "too fast" it cancels the swing.
it does. Thats why boneworks and blade and sorecy suck
they have absolutely huge detachment
So you have to "learn" to swing different swords at the correct pace and depending on your level.
in this game i have thats not the case. The sword is allways full speed directly tracked to your hand
its more like a beat saber sword than a physics sword
Same with guns. You can use a level 99 rifle at level one but it takes you 20 seconds to chamber a round.
Takes you 10 seconds to swing a level 99 sword that a level 99 could swing in 0.5 seconds.
That's just an IDEA, don't know if I'd actually end up doing anything like that.
i did try to do stuff like clamping maximum speed on heavy weapons
but at the end i just dont think it feels right
i think having direct connection from hand to sword feels much better
and the higher level of speed lets you do fun things
thats also how that viking RPG works
Yeah, that was my thought too, just not sure how to do the different "types" of swords
thats the closest thing to my system
Like if it's directly attached to the hand, how to do a dirk vs two handed great sword?
btw, the magic system in the video i showed, that uses ECS
but in unreal
and it was pretty damn awesome
you could create a ridiculous amount of spells by changing the components
specially as i had stuff like "spawn other entities on hit/timer"
so you could create absolutely ridiculous stuff
I would love to do a gesture based spell casting system just because I love the idea of people memorizing ridiculous hand motions to cast fireballs and healing spells haha
i experimented with it
its neat, but i mostly used it to switch spells
so to switch what spell you have "equipped", you do the gesture
the game above did have that system at one point
then you just use the trigger to control the spell like if it was a sort of gun, which is what kinda feels most logical
in the spell ECS system, it all worked through components
each spell, when you press trigger, would create an entity
How long did it take you to make that demo game?
bout 2-3 months
but it was a project ive been prototyping stuff foryears little by little. But that specific demo took about 2 months
full recode, i just put togther some of the older prototypes into it, and hired someone to make the dungeons
Very cool. So that's in Unreal?
btw, its procedural dungeon
yes
runs on PSVR too
tho its harder to play it there due to the shit controls...
The Oculus Quest has the processing power of a Google Pixel 2 phone... so imagine that, with no lighting or textures... and it may run. ๐
That's my starting point, haha. I may be able to get away with some sort of outline shader or effect to add visual interest, or I may have to get a bunch of artists to hand paint the entire world beautifully in vertex colors and do blob shadows... no idea.
If I have a nativearray of structs and each struct also contains a nativearray, how exactly do I go about disposing it?
Any references I found for octrees used ECS. I just want something that works with jobs and burst doesn't throw up all over
@tardy spoke the spell was pretty fun, i thought of actually having procedural spells or spell editor