Comments (2)
An optional but likely helpful quality-of-life feature would be to push the player up to a certain distance away from a block being placed. This is a bit tricky to implement but not intractable. There are two problems that this can help resolve:
- If a player pushes up against a wall, breaks it, and tries to replace it, they should ideally succeed, but it is tricky to guarantee this without the player potentially clipping through the placed block.
- If the player walks past a ledge with the goal of placing a block horizontally to extend the ledge, the spherical collision region of the player will have them move downward, causing them to be in the way of the block that would be placed.
However, this quality-of-life feature is likely out of scope for this particular issue, as it has some challenges:
- We need to decide which direction to push the character. It is likely the answer is "whichever direction yields the shortest distance", but some unanticipated artifacts could appear from that decision. Another option is "always up", although this would only solve the bridging problem.
- To work in corners, multiple iterations of collision resolution may be needed. After redirecting the movement direction, the character still needs to move far enough to stop intersecting the voxel being placed.
- If the player is on the ground, this feature might make them leave the ground when placing a block, which could be jarring, so some prevention may be needed for that.
- This feature would cause discontinuities in the player's position that would require some kind of interpolation to correct.
from hypermine.
While the server has one view of the world, the client seems to have three:
- Last updated world-state given by the server
- Predicted world-state, updated per step
- Extrapolated world-state, updated per frame
Currently, all ECS components use the first view (last updated world-state given by the server), as prediction.rs
stores everything about the second view (predicted world-state, updated per step), and client's sim.rs
computes the third view (extrapolated world-state, updated per frame) on the fly.
If we don't want this long-term, I believe this feature (block placing/breaking) is a good time to revisit this, since we'll need the world's voxels to have prediction data (I don't think per-frame extrapolation data is needed, fortunately). This could just live in prediction.rs
, since voxels aren't an entity anyway, but only if we're happy with organizing the code that way.
from hypermine.
Related Issues (20)
- Not in a git repository. HOT 1
- ' couldn't find required command: "cmake" ' HOT 2
- Crashes entire OS HOT 3
- python3 not recognized as "python" HOT 1
- Label dodeca sides HOT 4
- Create invariant identifier for nodes using cryptographic hash function HOT 1
- Use newtype idiom to generate Hyperbolic Space-specific matrix and vector types HOT 8
- Surface extraction can produce extra surfaces with a risk of z-fighting HOT 4
- shell.nix uses `rustChannels` which is not available on nix by default
- Models load failed HOT 3
- Build is currently broken (unresolved import `zstd_sys::ZSTD_cParameter::ZSTD_c_experimentalParam6`)
- Modernize Rust idioms HOT 7
- Vulkan validation layers found sync hazards
- Add an inventory system HOT 3
- Add an input-management layer HOT 1
- Add a default way of serializing components
- Add single-player optimizations
- Pick block HOT 1
- Finish up incomplete serialization work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hypermine.