by Major Cooke » Tue Dec 07, 2021 7:29 pm
If Graf invents a way to make it so accessing a variable belonging to a specific subclass/struct where it auto-creates those as needed, then I'd definitely say that's in the future. It'd be needed for backwards compatibility at the very least. Unless we finally say "fuck it" and just can the compatibility for GZDoom v5. [1]
This could optimize a lot of things, cutting out a lot of actor checks in the code itself by simply checking for specific 'packages' if you will and simply not operating if it's not there - including states! If you have an actor but can program everything within the tick function and don't need it rendered, I imagine you could make do without the States package (but in that case you'd basically be using a Thinker class, but with a position, etc).
But I am just theorizing on a way this could go, including having dependency packages. That would allow it to be much more optimal on RAM and saving, but I don't expect the optimizations to be all that more significant beyond that.
Also I don't even know if this is what Graf meant in particular, but if it is, it certainly took me a lot of effort to make this stuff. So, this route definitely needs a streamlined system if there's a better way to go about it. I have my doubts I did this perfectly and there's likely other things I could have done such as the struct route (less overhead, but requires a serializer to be written for it), but I'm not advanced enough to know that. Hopefully Rachael chimes in too and confirms whether I nailed the idea down properly or not.
[1] - DECORATE made actors would by nature include all classes needed as usual but ZScript would not. Modders would pick and choose what they need there.
If Graf invents a way to make it so accessing a variable belonging to a specific subclass/struct where it auto-creates those as needed, then I'd definitely say that's in the future. It'd be needed for backwards compatibility at the very least. Unless we finally say "fuck it" and just can the compatibility for GZDoom v5. [1]
This could optimize a lot of things, cutting out a lot of actor checks in the code itself by simply checking for specific 'packages' if you will and simply not operating if it's not there - including states! If you have an actor but can program everything within the tick function and don't need it rendered, I imagine you could make do without the States package (but in that case you'd basically be using a Thinker class, but with a position, etc).
But I am just theorizing on a way this could go, including having dependency packages. That would allow it to be much more optimal on RAM and saving, but I don't expect the optimizations to be all that more significant beyond that.
Also I don't even know if this is what Graf meant in particular, but if it is, it certainly took me a lot of effort to make this stuff. So, this route definitely needs a streamlined system if there's a better way to go about it. I have my doubts I did this perfectly and there's likely other things I could have done such as the struct route (less overhead, but requires a serializer to be written for it), but I'm not advanced enough to know that. Hopefully Rachael chimes in too and confirms whether I nailed the idea down properly or not.
[1] - DECORATE made actors would by nature include all classes needed as usual but ZScript would not. Modders would pick and choose what they need there.