Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Add floating entity cleanup/control #39

Open
dodexahedron opened this issue Jun 1, 2015 · 10 comments
Open

Add floating entity cleanup/control #39

dodexahedron opened this issue Jun 1, 2015 · 10 comments

Comments

@dodexahedron
Copy link
Member

Since floating entity cleanup is being removed from extender, something should be put into essentials to replace it (though much more capable/useful).

Thoughts on what might be good floating entity management schemes?

@SilentSymphony
Copy link

I've always thought that Per-User floating objects would be really nice to have, But i have no idea if it is even possible in extender/essentials

@dodexahedron
Copy link
Member Author

It'd be possible, but it would still have to live within the global limit set on the server.

@SilentSymphony
Copy link

Well, 25 per user would be a total limit of 375-700 based on some popular servers player counts at 15-28 players, Having them all moving at the same time could get bog down the server so if they were to stop if not affected by gravity it would make hand mining much easier, Gravity collectors, Cannons all without disturbing other users hopefuly, I'm not sure how you'd handle them spawning from ships crashing, or miners/etc,

Anyway its just a thought.

@dodexahedron
Copy link
Member Author

Hmm.
Ownership is the trick, in any case.
Since floating objects aren't really owned by anyone, how would I track this?
I could potentially try to get the nearest player and just assume they own it, for purposes of the limit.

For crashes, or for large mining ships/platforms, that could lead to unexpected results
Any ideas?

@qrokodial
Copy link

don't know much about how SE does things, but don't floating objects still have some sort of unique ID? can't you just map the ID of the floating objects to the associated players? if the player goes over the limit, just delete the first floating object on the player's stack.

@dodexahedron
Copy link
Member Author

Yes, they have unique ids, but how do you know who created them in the first place?

@qrokodial
Copy link

well, this is a wrapper for the SE server, correct? the SE server has to, at some point, know why its creating these floating items? (so for example: I'm creating floating items here because player X just drilled the shit out of this asteroid).

again, taking shots in the dark for game internals in which I'm not fluent in. but if my speculations are correct, this would be a great feature to abstract out into an event system within the extender

@zrisher
Copy link

zrisher commented Jun 6, 2015

You'd have to amend the core functions that create the objects to call events or attach the entities to the player in some sort of entity manager, this is not currently done at all.

@dodexahedron
Copy link
Member Author

Right. This is a wrapper, not a code injector.
In order to do something in the middle of a native game function, that function needs to yield execution to SESE. That's only doable through things like events. If floating object creation is something people would want to hook for other things, though, a good case could be made for adding it to the SE code. Implementing an event and a public delegate in there would be pretty easy and they just might accept that kind of change.

@dodexahedron
Copy link
Member Author

I'm all for having all sorts of events in the game that can be hooked into.
It's about the ultimate in extensibility.
It could potentially be a security risk on the client side, though, if the events could be hooked in scripts or via client-side plugins.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants