Git Product home page Git Product logo

Comments (9)

hubastard avatar hubastard commented on July 30, 2024

We should log the GameMain.mainPlayer.transform.position to look at what is our position when we are in space. I wonder if they are doing some matrix transformation of the world to fake the player movement in space to avoid floating point precision issues.

from nebula.

hubastard avatar hubastard commented on July 30, 2024

Alright, so I've been doing some digging and it's exactly what I thought. So to avoid floating point precision issues, what they did is that while the player is on a local planet, the planet is your world origin and they move the player physically around the planet. But then as soon as you leave the planet and you are moving in space, they are doing a clever trick of instead snapping the player to the position 0,0,0 in the world, the player never moves, its the world / planets that move towards the player.

That way the player will never experience floating point imprecision when the floating point number becomes to big.

from nebula.

hubastard avatar hubastard commented on July 30, 2024

That being said, it will be tricky to fix this issue. We will need to find a way to fake the remote player position when they "move" in space next to us. Also, we must hide the remote players that are not on our local planet else we will kind of be seeing every players that are on all the other planet on our planet since the player coordinate system is the same on all planets.

from nebula.

sp00ktober avatar sp00ktober commented on July 30, 2024

We can just compare the localPlanet.id too determine who needs to be visible and who needs to be hidden.

from nebula.

Flapperkewiet avatar Flapperkewiet commented on July 30, 2024

But what if 2 players are in space? Wouldnt they both be at the origin?

from nebula.

sp00ktober avatar sp00ktober commented on July 30, 2024

I guess thats whats happening, see the image at the top

from nebula.

Flapperkewiet avatar Flapperkewiet commented on July 30, 2024

Yupp, so either we make it so players cant see eachother in space, or we need to calculate an offset to render remote players

from nebula.

sp00ktober avatar sp00ktober commented on July 30, 2024

I think players should be able to see each other in space, else it would look really weird if you fly together and the other disappears suddenly.

from nebula.

hubastard avatar hubastard commented on July 30, 2024

I'm currently working on this

from nebula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.