starandserpent / Voxel-demo

Demo implementation of Terra using Weltschmerz and Foreman
https://discord.starandserpent.com/
2 stars 1 forks source link

Seperate Chunk Mesher and Collider Mesher #88

Open Pawlost opened 4 years ago

Pawlost commented 4 years ago

Collider Mesher requires different type of meshing then Chunk mesher. Colliders should be also created only close proximity to player. We need to seperate those things.

Pilvinen commented 4 years ago

I think an ideal situation would be one where we can do two things with the cost of one.

But if you think a separated approach is necessary then I suppose that is what we have to do.

However, there are also other entities to account, not just the player. If you want to generate colliders on-the-fly for relevant areas, then it comes down to whether it can be done fast enough for hundreds or thousands of entities that are potentially taking up separate space.

And that's not only just monsters and animals and such, but also things like projectiles on their way to a target as well - potentially at high speeds.

Network lag also becomes a major concern when generating colliders on the fly. We will use movement prediction and if there are suddenly no colliders being received or generated fast enough due to lag then we'll have players falling through the ground, courtesy of locally generated physics simulation.

Pawlost commented 4 years ago

Zylann is doing some kind of unwrapping when he use another loop to from make from index vertices (1234) raw vertices (123341), because godot right now doesnt accept any other values. Maybe we dont need to seperate this if we make similar unwrapper but we should probably save vertices from mesh somewhere for colliders.