#archived-dots
1 messages ยท Page 289 of 1
and evenly split that across the entities that own it
so only 1/4 of entities update every frame
making it about ~3x faster
(this was one of the original reasons I put it in a single job)
that's a cool feature
single jobs rule unless you can optimize it with change filters
i've made signifcant improvements with splitting a job into better comps and filters
my spellcasting job on the other hand. no splitting makes any sense when everything runs anyway
change filters are the best thing for performance
there's no better optimization than simply not running code
yep, i've neglected them far too long ๐
nice thing about dod. implementing them is easy even on mature jobs
Hello, after upgrading to 0.51, my trigger system does not work anymore.
What I am doing is having 1 car + 2 "standin" boxes on the side that check if they collide with another car. If they do, i prevent changing lanes because it's occuped.
A standin is just a box prefab with a collider on raises trigger events.
Code block: https://www.pastiebin.com/62d74953b880a
doesn't look like anything's wrong with this code to me except the formatting
I tried to fit it into Discord but there were limits and I messed with it heavily
In the end I used a pastiebin
No idea what to do, I keep seeing PhysicsWorldIndex thrown around
the struct doesn't need to be protected btw
oh yeah, when you look at the migration docs they say something about that
are you creating physics objects by code or by authoring?
if you are doing it by code you need to add the new required components
I have two prefabs
so authoring I guess
first is the standin (trigger raiser) and second is the contestant/cars
ok well it wont be missing your physics world index then
I assumed that prefabs with the most basic interaction wouldn't need extra spice on the code
they are both kinematic. i don't think they will ever collide because of that
they did in 0.17 D๐คก TS
well it's not something that should be working
ok so the logic is that the cars are kinematic as they behave like rollercoaster carts
each car has 2 standings on their sides to tell me if they are able to switch lanes
I guess I can remove them completely and check it via math, via boxA.intersect(boxB)
why not just use a raycast
I might have to, as there is a concept of a concrete barrier between lanes (every now and then)
so a car can't change a lane because either there's another car there, or there's a concrete barrier inbetween
seemed the trigger system would just work, and it did in 0.17
oh wait. one is a trigger and one is a collider. well that should indeed be working though
yeah the car hits boxes and missiles
the standins are only detectors
when you said raycast, you mean raycast 1 box right? @haughty rampart
no i meant raycast
let me rephrase, raycast a box-shape projection, or raycast "a laser" x4 in the corners?
you can't raycast a box shape. that would be a boxcast
ah ok
so 1 boxcast vs 4x raycasts?
I might need 9 for the centers too
here's how they look now, the green is the "car" and the black boxes are the standing triggers
well like i said, the trigger + collider should be working
there's definitely an issue then
do we have some popular examples about colliders / triggers with 0.50 +?
no. samples will be available after 1.0
in the interest of science, I will attempt a separate project to see what's going on
if anybody can hook me up with their trigger systems to see if maybe my issue is related to creating the job and scheduling it relative to the World loop
I would cherish you forever
In a Parallel Job, I want to set a component to an entity that is NOT the one from ForEach but referenced by some data. Problem is, I have to specify entityInQueryIndex which is not valid for that entity. Is there a way I can accomplish this in a parallel job? Or is this a restriction?
I have to specify entityInQueryIndex
what do you mean?
in an ECB?
ECB doesn't care about entityInQueryIndex at all
you pass it a sortkey for thread safety
this just needs to be a unique key per thread
it can be entityInQueryIndex, threadIndex, chunkIndex etc
as long as it's unique in that thread and no other thread will use it
I almost have patch #2 in Starfighter General out, this is getting fun wiring in every tech I made over the last 1.5 years in dots: This one is Asteroids: https://www.youtube.com/watch?v=G3KGSYITLGg
In this patch, the dimensions are coalescing so they're destroying alternative realities and you mine some stuff...
Player data retained... Reality around you not...
Grind to get better for next versions.
How could this possibly be violating a write event? It looks to be all reads: if (onIgnoreList(entityA, World.DefaultGameObjectInjectionWorld.EntityManager.GetBuffer<TriggerIgnoreBufferElement>(entityB)))
InvalidOperationException: The ComponentTypeHandle<DroneDataEntity> has been declared as [ReadOnly] in the job, but you are writing to it.
Maybe back end UNITY stuff is dirty in how it handles stuff?
Nothing appears to be a write on my end, I could be wrong: https://pastebin.com/KybHgqG2
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you're looking at the wrong code
considering it's talking about
DroneDataEntity
which isn't even in your code you posted
the error message referenced that line tho
I thought the same thing
at Assets/Scripts/DOTS3/TriggerHitSystem.cs:195
The error also says ComponentDependency.cs
Thats why I was wondering if it was low level, or the error message not giving full info
Is there a reason when I build addressables, it alters assets in my project reverted to pre edit?
Like straight I'm editing prefabs
And when I compile addressables, it reverts the prefabs to what they were
Ah I see. Then I didnโt quite understand why the ecb (pw) wasnโt adding and removing components for a different entity.
Turns out, some weird addressables bug that was fixed when I hit clean. I'll take it.
Game devving gets exciting once the hard parts are done and you just pushing content.
This is so weird. When I compile my game, the addressables almost always reverts my project prefab data.
Why is addressables messing with my prefab data in my assets. I thought it was a one way translate.
Gonna restart Unity
I may have found a third Unity Addressables bug...
Ah, I see the problem. Addressables must have a refreshed version of the project to build. This could be solved by having a build in addressables autorefresh.
oh wow i wasnt aware that ecb.AddBuffer clears an already existing one on an entity. I assumed it would do nothing when it is already on there.
thats an easy way to get some raceconditions :S
looking pretty cool Jim, is the project released on steam?
The same behaviour as add component
yes makes sense. i just never noticed. i think i got some other cases where this might produce a racecondition i was not aware of but didnt have much effects on gameplay.
I have a case where 2 Abilities want to append to a possibly not yet existing buffer on a target in the same frame.
I want this for example for projectiles coming from different abilities but rotating around the same target in order to be able to space them out equally around the target. The target is maintaining a list of all orbiting projectiles but i dont want to keep that empty list around on entities where nothing is orbiting.
So now it seems i have to add the buffer in one job once (if anything wants to orbit and the target has no orbiting projectiles yet). Then in the next fill it with the actual orbiting projectiles.
don't really understand the desire to just not keep the buffer on at all times
and avoid all this hassle
because any entity that can be a ability target could be orbited around. but its a rare occurence
what if you one system adds the buffer
then another removes it
you've just lost what's added?
i guess you just do your removals first just in case
not sure if i understand but the buffer will only be removed if empty. the orbiting projectiles remove themselves from the buffer. whenever that happens id see if i need to remove the buffer cause its empty now
buffer is empty
system A removes buffer via ecb
system B wants to add new projectile to buffer, so adds to buffer
buffer now removed by ECB
hmm yep. thats a problem. no idea yet.
i havent thought too much about removal yet because leaving them on the entities that where a target once wouldnt be too bad in my case. since its a rare event and the entities that are targeted like that will die eventually anyways.
you can just keep a special cleanup system somewhere in the end
the obvious question here, why go through a structural change and not have the buffer on the entity the entire time?
and i think, making threadsafe DB is impossible. maybe a interlocked on the length works
any entity that can be targeted can be orbited around. so every tree and plant would have that component on them even though it is not needed on 99.9% of entities.
why not have a seperate entity for that?
and why can that change in runtime is my next question. wouldn't it be more simple to have a prefab for that?
how does it solve my problem of needing a list of all orbiting entities? id still need that buffer on there. you mean as a solution to avoid the structural change of the main entity?
weird gamedesign
do you really need that list? ๐ can't one orb be on its own?
1 of those zombies with the strawhat = 5 projectiles.
and those projectiles orbit around an invisible player that you actually steer. the zombies follow that player as a kind of swarm
the next step is to only have one of those projectiles spawn for every zombie and assigning that projectile as a movement target for those zombies. then when that ability is used they build a meatshield circling around the invisible player including pathfinding
so what holds you back from making them seperate entities? the info how many orbs a holder has can be done with an icomp. the orbs have a parent and position can be looked up or sraight up referenced with a lointer to parent ltw
(i like the artstyle btw ๐ )
its so annoying. the artist gets all the praise every time ๐. actually its not that pixelated
can't praise the gameplay from a screenshot ๐
I saw that Enzi
so you mean whenever i spawn an ability that spawns those orbiting projectiles i should just increase a counter on the targetEntity to keep track of the number of projectiles? i might do that but i was afraid running into problems when i have diffrent orbits on the same target xD
there is no real gameplay yet ๐ฆ way too easy. you run around with a zombie horde and convert enemys to your group. based on what you eat/infect you get different zombietypes (and they can grow). each zombie has different abilities based on where it is positioned inside the horde. you basically assign them jobs.
fixedlist in icomp might help for that problem
on of the problems in ecs is designing super entities that have all data. it's dangerous in that sense that they act like an oop class
an orb spawner could even be a totall seperate entity. maybe it even solves your buffer problem because an orb spawner would always need such a buffer
you could put all kinds of buffers on an orb spawner. the only reference is then from the main entity to the orb spawner
and the orb spawner manages spawning the orbs and maintaining the lists of spawned orbs
the orb spawner is basically the ability itself.
somehow every time i show you something new you find someone else to suggest it to enzi ๐
(not that i'm disagreeing but it's a pretty large use of chunk - may as well just throw a DB on all the time)
learning from the best ๐
the spawner entity suggestion wouldn't need a fixedlist btw
yes but im still struggling to understand the difference. the spawnerentity would be responsible for spawning all orbiting projectiles created by any ability that targets the target that is associated with the spawnerentity?
i personally would look at spawning as a separate entity though it's an interesting problem with no obvious best solution at a glance
Physics samples on official unity github are up-to-date
the chunk capacity would indeed be a problem with fixedlist. db with internal cap 0 would be more lightweight
ill always get the best problems just for u guys
I found them this morning, didn't help. What's weird is that if I set both my car and ghost to trigger and collide with eachother, it works half the time
anyone know how costly LOD groups are in hybrid renderer?
btw. i would design the fixedlist to exactly hold the amount of different types of orbs that the game supports
im not a fan of that solution for my case. its all inside of one big AbilityEngine that is supposed to give my designer maximum freedom. its too easy for him to produce any number of those orbits. The spawnerEntity on the other hand seems more reasonable to atleast avoid the structural changes.
Usually I would try and reproduce in a prototype, your use case looks simple enough to help, but I didnt launch Unity for a while and I should really work on my resume right now ๐
xD I drag-n-dropped the two pairs in an empty scene and they trigger eachother with the 0.17 settings..... pray for me, and good luck on your resume. you can dm me for feedback if you want
i'd also recommend the seperate spawner entity over the main entity spawning the orbs. authoring and runtime data can be split nicely, i don't see the issue what your designer can do with it
performance or memory? i don't have much experience with them. based on the megacity demo i'd say they aren't that costly
it would be nice now to boot up the megacity demo but i think it's broken beyond repair
i loaded up megacity to compare and the current has more features but setting it up similar doesn't author properly
i hope those megacity devs got fired too! /s
i wouldn't say beyond repair
it's a bit of a blast from the past loading this up though
bot showed you
't was the perfect gif
Did something change from 0.17 to 0.51 for custom build configuration components? Having a class inherit from IBuildComponent does not seem to work anymore
Okay, nevermind, it seems the UI is just broken? Very strange
What's up with that
ah sec, wrong file
Ah, ok
it's a reasonably easy fix if you need to do it yourself
Nah it's fine
I only have a single custom component for automatically building addressables since I always forget and then wonder why nothing works
smart idea
Supposedly this could be done in early versions automatically, but they removed it for some reason. iirc because it took too long or something
Yes, game is on Steam for years as Clash of Clans meets Xwing vs TieFighter, playable now! https://store.steampowered.com/app/658480/Starfighter_General/ Believe it or not, I wrote a fully functional professional quality 10 vs 10 player MOBA like League of Legends meets Xwing vs Tiefighter in ONLY 2 WEEKS having only did the Roll a Ball Tutorial! That's how good Unity was to get rollin back in the day! Now I have all the techs to be a MMORPG, but I need to wire them in slowly savoring it, since I been soloing mmorpgs since 1992.
I have a really fun to read scifi website with some of the crazy lore, tropes never used and tropes warped for insanity humor, it's just fun to poke from article to article and read: https://www.starfightergeneral.com
This is based upon a pencil and paper RPG I wrote in 1989 based on Wasteland/Spaceballs and Dungeons and Dragons that everyone who played said was the best RPG they ever played. I need to publish that, and have an online TTRPG that is better than D&D online and such I am sandbagging, lol.
isn't LOD level just another mesh? so it should be just another Draw per LOD level
i'm more interested in the overhead time to check what lod should be drawn
do you mean just the calculation of the distance form the camera?
each lod has a range that needs to check its camera distance
or if you want to be correct, height of the model in the view
yeah
mostly i'm just curious if i should put lods on like, things i fracture
say i destroy something into 10000 shards
am i really benefiting putting a lod on each of that for the short period it's alive
I think there is not much of a difference in dots, of course it will be faster etc
but will you make LODs for it in the "MB world"?
yeah my fracture pieces are precomputed
it wont fracture in the same way
but i fracture in advance with rayfire
oh god, the hardest part of gamedev is choosing
2D or 3D, lol
always 3D
even in a 2D game
don't make our mistake at work
server is pretty much 2D
and it's causing us hell
4 years later designers decide they want some very specific 3d features
๐
I mean for graphics tho
Obviously, everything is 3D
even graphics are just Quads, kek
but it's question whether it's only quads or different 3d models...
With main aim towards modding
oh yep ๐ฌ
I was thinking about it some time ago
is there really anything that will benefit from moving everything to the 2D world?
i see only downsides
like i.e. custom transforms
well, drawing and loading png is way easier, kek
end even then camera and rendering is always 3D
once again, it's main aim is towards modding
meaning even low poly 3D will be way higher skill req
also questionable way of implementation through mods (meaning no editor)
for prefabs
oof
You can always make everything a 2d UI layer right? Then throw in 3d later even if just particle effects for fireworks. Is there much of a 2d performance hit for making your project 3d?
@rotund token dont know if that helps but i rolled my own very simple Simulation LOD system. I just check all distances to all relevant entities and tag them with the necassary LOD component. So it should be on the very slow end. for 6k entities in my scene it takes 0.03ms mainthread and 0.2ms across workers.
So with some acceleration structures and whatnot id expect it to be no issue with some 100k entities
i really wasn't expecting a huge amount but from my quick look at source it didn't look that optimized
so was just curious if anyone had tested it before i do some myself
yes i remember glancing over it and saying fuck it ill just do it myself until i can use an optimized version from unity
i needed a way to quickly filter for Simulation-LOD so i decided to go with tag components. ofc that means chunks do change alot.~~ i just added some hysteresis to avoid them changing back and forth on the borders every frame.~~. lol looking at the code again i threw that out it seems.
not sure if thats better done with sharedcomponents
could potentially use quadrant system and check by quadrants
will reduce checks to minimum
also makes enabling/disabling LOD query based
I'm just going to stick to HR lods since it's built in and requires no structural changes
I reinvent the wheel enough as is, think i let someone else do this one
ain't reinventing the wheel is what this channel is about? xD
My animation stress test uses the in build LOD system that was ~3% of CPU usage if I recall correctly, CPU was running at 100% with the rest:
#archived-works-in-progress message
this is really interesting.. i didn't realize Latios was that caliber, it seems he's really deconstructed some of the failings of the skinning system and AR and knows what he's talking about.
this is nice is it using the old dots Animation package or a custom setup?
Custom, it's based on https://github.com/maxartz15/VertexAnimation
@oak sapphire dont suppose you figured out blending between animations?
ahh baking to textures
Do IL2CPP builds work atm? iirc they were broken but I'm not sure
No, that wasn't a requirement for my kingdom simulator game.
It does have interpolation between the baked frames though, shouldn't be too hard to interpolate between the current frame from one animation to another.
yes and there's a workaround when setting the build settings (not build config) to (i believe) faster (smaller) builds
It builds fine for me, but going by the error it seems to be stripping core entities code, is that fixable by changing the settings?
i'm still on 2020.3 so can't check how the option is really called
Here is the exception for reference: https://hastebin.com/videfafofu.hs
that kind of error will be fixed
I'll check it out, thanks
Welp, while that does work, NetCode is somehow crashing on me :X
Ghost ID 0 has already been added 
Are spawned ghosts in netcode not guaranteed to have the latest value of the server? I am creating an object on the server, and setting a value on a component, but when that ghost arrives on the client, the value is not initialized
Also it seems there are still some weird bugs in NetCode, no idea what is going on here:
There's also no stacktrace for it
Hehe, sorry offtopic but..
https://www.youtube.com/watch?v=HobK9kug-Lo
๐ฌ Ok so let's talk about this...
๐ฎ Get my Steam Games https://unitycodemonkey.com/gamebundle
๐ Get my Complete Courses! โ
https://unitycodemonkey.com/courses
๐ Learn to make awesome games step-by-step from start to finish.
๐ Click on Show More
๐ด RELATED VIDEOS ๐ด
My Game Dev Journey (40+ Games! | mIRC to Flash to Steam) https://www.youtube.com/w...
Help. I need to run some custom code when pressing Build and Run, where can I do this? The good ol IPreprocessBuildWithReport doesn't work for DOTS build.
yeah. finally a video that doesn't overblow the topic into oblivion
How does prefetching behave at chunk borders? is every chunk border a cache miss because we have to chase a pointer and thus cant be prefetched or does it work since we are iterating over a chunk array in a linear way?
And about MegaEntities that occupy a large part of a chunk: Isnt there a certain maximum size of entity where prefetching would be just fast enough to cover for low chunk utilization? Say the fastest logic we run with a cache line is like 20 cycles and a memory read cost 200 cycles. wouldnt that mean that if my chunk contained 10 entities i wouldnt wait for data from main memory? So the chunk utilization can be worse without any performance impact for entities that have higher workloads per cache line?
[PostProcessBuild(1)]
use this
attribute on static method
(does he not need PreProcess?)
got a proof of concept of making net code not trigger change filters on client
before/after
now to beg netcode devs to revisit this problem
good find and ouch!
hmmm, how should I implement rendering of 2D sprites through HybridRenderer?
quad mesh and billboard shader(graph)
Billboard?
so it faces the camera at all times
ah
it's not an issue
it's top down view always
I'm way more concerned about materials
I need to be able to request my materials by Texture2D
which would probably force me to make some MaterialPool
also I guess I won't be able to create atlas
thus, no perfomance benefits from that
are the texture widths/height power of 2?
uuugh
well, I'm not sure what you mean by that
by widths and height shouldn't be related
as it would mostly be fixed through scale
post some sprite you are planning to use
oh it's a well known issue netcode bumps all change filters every frame
(on client)
I'm confused, why it's relevant, tbh
because of texture stretching
and what's wrong with just converting this?
ah you scale it yourself
oh well
you really need to convert htis through authoring so you can setup per instance components
so I need a way to build graphics entity through serialized request
and you could just batch it all together super easy
that's ๐ฉ
we should teach them how to do proper change filtering ๐
there's helper method for it btw
public static void AddComponents(
Entity entity,
EntityManager entityManager,
in RenderMeshDescription renderMeshDescription)
I'm mostly concerned about Materials
what's your concern? batching and draw calls?
yeah
I probably need a way to have shared Material for same sprites
so HR batches them
but I'm confused over how I can and should implement this
just atlas your textures and use the same material on huge amounts of your sprites?
and make UV override
^
is texture override available now?
Is Atlas available in runtime though?
Since I'd need to load all mod's textures as well
atlas is just a normal texture
what do you mean
I know what atlas is, but point is that when some modder adds additional sprites, you wouldn't want them to combine it all to sprites and creating UV info for each sprite, that's way too complex
texture packs on minecraft were required to be setup atlas for example
is that Sprite Specific property for shader?
every material has a UV option i'm pretty sure
(this is HDRP/Lit looks may vary on pipeline)
bruh, bad part: selection tool won't work on cutout parts without custom code in editor
you mean the part you can't see?
because that's kind of hte point of this whole selection
the part which is invisible
in sprite
but mesh exists
yeah that's the whole point of the pixel perfect picking
it will only pick visible things
hmmm
I guess in EntityIDShader
all you'd need is just in frag shader
multiply color alpha by 0, in case initial color is 0
ooor
ah wait
there's no texture for it
to have UV
bruuuuuh
that's why 2D sucks
I'm curious if anyone has written any wrappers for iJobParallel and UniTask
you're mixing way too many problems into one. solve one, then proceed
let him spiral a little more, he's only a few steps off redoing his entire game in 3D ^_^
who doesn't enjoy a huge rewrite!
I haven't done anything yet though
kek
why would you need that? ๐ค
i see a space ship quad
it's just mesh renderer with material on it
ship it
@rustic rain I don't see any problem, just make tool for modders to generate UV of sprites in xml/json format and load that
2d is 100000% easier than 3d
especially animations
well, depends
for example, 2D breaks my shader selection tool
you realize it won't select transparent 3d objects either right
but it will
since it renders based on ID and mesh, not on texture
while 2D mesh, is quad, which takes all space, disregarding of actual graphics geometery
oh wait yep i get your issue
it's the opposite of what i was thinking your problem was
something like
struct MyJob <In, Out> : iJobForParrallel
{
private readonly NativeArray <In> input;
private NativeArray <In> output;
private Function<In, Out> transform;
public MyJob<Coll>(Coll input, Function<In, Out> transform)
where Coll : IEnumarable<In>
{
// input to this.input here
}
void Execute(int index)
{
var temp = input[index];
var outvar = transform(temp);
output[index] = outvar;
}
}
struct AsyncParallelForEach <T>: AsyncEnumarable <T>
{}
class MyBehaviour : MonoBehavior
{
private async UniTask MyTask()
{
await foreach (item in AsyncParallelForEach([
1,2,3,4,5,6
]).Where(item => item % 2 == 0)
.Select(item => item * 2)
.ete
) {
Debug.Log(item)
}
}
}
that was meant as a reply to this
what's that trying to do? mixing both won't work. what would work is run a UniTask after a job is completed. Although I don't see the point as you could just write a non-bursted job instead
don't know how your selection tool works, but I think you can do it with transparency check?
if you you use depth then it shoud just work?
oh I get it
do you render texture with color as object ID?
then it should be fairly easy to support transparency
you render all meshes each with a different colour
then just read the pixel under the cursor
the issue is, each full quad is a distinct colour
it doesn't know what the original texture / material is
at least not by default
getting that info would significantly slow down the algorithm
yep
That's what the wrapper would do, no?
in this case you know everything would be a quad so you can disregard mesh and focus on texture alpha?
well how?
You have entity with all rendermesh components and etc
you know original material
if you simply draw by mesh, you just create a job and draw all same meshes as instanced
if you don't...
if you had mesh in 3d then access to texture data should be similar, then blit instead of render
you don't need texture in 3d
that's the point
mesh already contains geometery
just those in view and those selectable?
and that's all you need
no you need everything
because what if something unselectable is in front of something selectable
it needs to block your selection
if you want to block selection for items under then you're right
feels bad 2D loses in this one
implementing physics is not favorable
as it will be equally hard to implement colliders for modders
but doesn't it mean all you need is something similar to depth texture but instead of depth you want ID?
I think you could make a render pass for that and send back to CPU only ID under the mouse
it's already that way
problem is rendering
not retrieving data
curious how'd you map the depth back to an object on cpu
btw, about 3D and conversion workflow
I mean, I do get that game will be way faster with all native Unity way of doing it
but since I aim for modders
I need to implement things the way it will be easily modified from outside
this is my sole project and I doubt I will be able to finish game fully all by myself
that's why modding is probably the only way my game has a chance to have a life, kek
so I'd have to sacrifice certain things in favour of exposing data
it all makes sense
though I kind of believe you can give modders a better experience by providing dlls to load into unity instead of having to trial and error edit some random text files
i'd like to see a world where modding is barely different to developing
well, that's the point
I will load dll from Folder
and then run some custom code from it
well yeah i'd like to let users load the dll into an empty unity project
and let them setup prefabs and use the same tools
(not claiming the possibility of this yet, i haven't tried hard enough. but it's what i'd like to see)
was rimworld on this level?
rimworld doesn't give you editor experience
it's all XML
and C#
you can code behaviour
this is very interesting approach
I wonder how it can be implemented though
I haven't though of it, ngl
I might even use it instead, then
kek
as soon as I figure out, how I can share dll between projects
Library/ScriptAssemblies/
copy/paste
there was an tool for editor layout overhaul, unity forma is using it I think - so you can make package with moder tools and your own editor GUI
and it might not have same level of my initial editor experience
so I'd probably have to design it around that assembly
that depends if you give them your editor dlls ๐
anyway i dont know how feasible this is
this is just an idea in my head that has festered for a long time without ever being explored
there are probably 100s of pitfalls
but why reinvent the wheel when we have a great tool for developing games is my thought process
if you include tool for building that mod that's reasonable approach I think
That would basically mean I'll have to share all authoring components data
which is not a prbolem
Problem is that I want to share it as compiled, not as sources
hence the dll
but will Unity work fine with dll?
yeah, assets from assetstore often comes in dlls
hmm
interesting
oh man
this happened so fast, kek
and now I'm suddenly overwriting my whole project
mission success
you need to figure it out though
they can't just build the project like normal
they need to build it and you need to link the new dlls + bundles or whatever
why can't you just use harmony?
i mean sure they could
I know, I started out with programming through modding Rimworld
kek
it's nicer if you do it yourself to support burst assemblies though
Postfixes and transpilers were my best friends, kek
to load shaders you had to build asset bundle in editor
and then load it manually through code
terrible time...
@rotund token any idea would be a test task to test creating custom mod for existing assembly?
Just something abstract, simply for test
I want to try and test it
override a cerain prefab with custom texture, effect, comps :)
yeah
I think the first task would be to read original prefabs
is that even possible to do natively?
well that's what you wanted to figure out? how to provide a nixe environment for modding. you'd need some way to load a mod subscene and a way to mod that subscene in another unity project.
then you can overwrite original prefabs with modded ones
well, modders can do it manually by creating new game object with subscene component (I think)
or actually by simply using API
of Entities
this might be a very stupid question:
i have an Interface (IVectorizable) which basically makes components readable for my AI. It Implements a function GetValue() which describes how data inside a component is to be interpreted by AI. Now what if i wanted to read from the Translation component directly (instead of a Vectorizable copy of it). Is there any way i could make Translation Vectorizable?
Basically i want a way to somehow say that 2 IComponentData are actually aliasing the same underlying data (=use the same ComponentTypeHandle?).
That would be useful in some other ways too:
You could alias ComponentTypes from different Packages to quickly hook Systems up without Dependencies between the packages (aside from that GlueCode). I am still having trouble managing dependencies between packages that need the same data.
Let's say i want someone else to use my AbilitySystem. Atm that user would have to use my way of handling collisions or copy his collision data into my components. instead it would be so much better to be able to have some kind of AdapterPattern where he could link up his components with mine.
Sry that question is all over the place but i lack understanding to describe it better :S
Is there some magic i could do with Reinterpret?
well, yeah just Reinterpret native array of X component into Y component
Make some kind of TranslationMirror component with same fields
and interface you want
and voila
after all, it's all same bytes and bits
just interpreted differently in IDE
kek
this is actually a way to implement abstractions with primitive structs, huh
hmm but in my AI each Vectorizable Component can have a different Size though. some hold a float3 to be vectorized some only a float. id need to reinterpret based on size or sth. this seems expensive to check and not very safe to use.
But as for the general use of an adapter pattern it could work. im just not sure how to implement that best. I would have to reinterpret every input component of every user facing system of a systemgroup to one of my components.
And i need a way to let the user define which component he wants to be reinterpreted as an input to a system. (which shouldnt be too hard)
Still a much nicer way would be able to define somewhere that different componenttypes actually are the same underlying data in the first place. Ofc Safety system would need to be aware of that too
you are making it for one native component though
my generic system is not aware that it tries to vectorize the Translation component. but if it was then yes reinterpret would let me basically use an interface for it (which i then wouldnt really need because i know the concrete type and can work with the data directly)
Hi guys, I am way too far ahead with the game to switch fully to DOTS. but still I'd like to use C# Jobs to improve performance here and there. Does it support rigid bodies/ physics ?
Thanks!!
no
You can parallel a large batch of raycasts in a job with RaycastCommand but that's about it
https://docs.unity3d.com/ScriptReference/RaycastCommand.html
Hey @rotund token what kind of NAT solution are you planning on using for your netcode?
Unity gaming services has released Relay but no Aus servers ๐ฆ
Also no DOTS integration but this is true for any NAT solution at this stage
i thought netcode/transport had relay support
but anyway havent really thought about it
i'm not really making a game
Ah ok. Yeah its based of the transport package so I assume its not hard to get it connected.
i'd probably be looking to host a dedicated servers for most ideas i had anyway
Which version of unity or the job system has jobified meshcollider rebuild?
that is strange that netcode does not have support for relay and netcode for go has