Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow large entities: Large collision boxes, large selection boxes, large visuals #14686

Open
appgurueu opened this issue May 21, 2024 · 3 comments
Labels
Feature request Issues that request the addition or enhancement of a feature @ Script API

Comments

@appgurueu
Copy link
Contributor

Problem

Large entities don't work well. Minetest operates under the (pretty much hard-coded) assumption that all entities are "reasonably small" which is somewhere around a radius of a few nodes (?):

  • With a viewing range of 100, a 20 node large entity with a center which is 100 nodes away may become invisible - but it should be visible.
  • Large collision boxes don't work.
  • Large selection boxes don't work.

(For use cases, consider e.g. a boss, a dragon, a blue whale...)

Solutions

The "cheap" solution would be to just bump margins everywhere. This need not even be that bad. But it doesn't scale well, because the larger the margins, the worse the performance is.

A better solution is probably to bucket entities by their collision / selection box size. For small entities, you can still use small margins; only the few big entities will then require bigger margins.

Alternatives

To an extent, modders can implement their own janky collisions or selections. But this isn't really viable. Practically modders end up being forced to downsize their entities.

Additional context

No response

@appgurueu appgurueu added @ Script API Feature request Issues that request the addition or enhancement of a feature labels May 21, 2024
@nininik0
Copy link

nininik0 commented Jun 1, 2024

i agree. i have a giant unkown object boss as a server mob, and it dissapears.

@Desour
Copy link
Member

Desour commented Jun 1, 2024

Related: #8381


For very large entities, we also need to send them to players from larger distances, and maybe not store them in mapblocks.

@nininik0
Copy link

nininik0 commented Jun 1, 2024

I'm kinda noob at stuff I'm sorta good at lua but maybe we can make it so that in order for it to not disappear we can make the dissappear distance bigger by option, like in minetest.conf it could go like: large_entity_render_range = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Issues that request the addition or enhancement of a feature @ Script API
Projects
None yet
Development

No branches or pull requests

3 participants