Brainstorming: Physics and Packet Handling for Entities - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Brainstorming: Physics and Packet Handling for Entities (/thread-824.html) |
RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-11-2013 Yeah, please go ahead. I am still doing R&D for physics, so I am looking at the client code, trying a couple of things, thinking some crazy ideas, etc... so it is perfect timing. RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-22-2013 Cool, I just moved the physics code to the cEntity class. Also, it is using cChunk to get the block information Now, the next feature to do should be entity collision. I think this one my be tricky, but it will be useful for minecarts/projectiles. RE: Brainstorming: Physics and Packet Handling for Entities - xoft - 04-22-2013 Entity collision with blocks or with other entities? RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-22-2013 with other entities RE: Brainstorming: Physics and Packet Handling for Entities - xoft - 04-23-2013 I'd have done proper block collisions first, but it's your way. How are you going about this? Some sort of spring physics? When two entities are closer to each other than their dimensions, add a velocity away from each other proportionate to how close they are? RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-23-2013 I see what you mean about block collisions. I found a bug with blocks that are not solid. The collision is detected as if the block was solid. So, I should probably fix that before going to entity on entity physics. For entity to entity physics, I was thinking elastic physics (we might have to introduce the concept of mass). What do you all think? RE: Brainstorming: Physics and Packet Handling for Entities - xoft - 04-23-2013 As far as I know, there is no block collision code for entities. There's only the cTracer which does a single ray collision, but entities need volume-collision, or at least (like in Vanilla) bounding-box collision. Adding mass to entities is a good idea. Isn't it needed for proper physics already? It should be - at least for the fluid interaction (not that that would be implemented ). RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-25-2013 Yeah, you are right. There is only cTracer for a single block collision. Ok, I'll add some proper block collision. That's easier than entity to entity collision. RE: Brainstorming: Physics and Packet Handling for Entities - keyboard - 04-29-2013 I added mass. However, I am not using it yet. It will be used for entity on entity collision. I am now writing bounding-volume collision with blocks. I'll add some dimensions for entities like width, height, and length. RE: Brainstorming: Physics and Packet Handling for Entities - xoft - 04-29-2013 I think a more reasonable dimensions would be "height" and "diameter", so that you don't have to worry about entity rotation (I don't think vanilla worries, either) Also, I fixed your mass commit, it was missing a semicolon Don't you compile before committing? |