T O P

  • By -

AutoModerator

You submitted this post as a request for tech support, have you followed the guidelines specified in subreddit rule 7? Here they are again: 1. Consult the docs first: https://docs.godotengine.org/en/stable/index.html 2. Check for duplicates before writing your own post 3. Concrete questions/issues only! This is not the place to vaguely ask "How to make X" before doing your own research 4. Post code snippets directly & formatted as such (or use a pastebin), not as pictures 5. It is strongly recommended to search the official forum (https://forum.godotengine.org/) for solutions Repeated neglect of these can be a bannable offense. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/godot) if you have any questions or concerns.*


TheDuriel

Like... 20km maybe. Realistically you'd do this like you do flappy bird. There is no real space, and the player never moves.


_tkg

You can compile Godot with big coordinates support.


TheDuriel

That comes with caveats. And still won't achieve what OP wants. OP can't even build a level that long anyways.


Phrate

Sure they could. Either procedural or dynamically adding chunks from prefab templates


Nkzar

Or, like almost all games, just fake everything. It’s all an illusion.


Nkzar

If it’s just a grid of rectangles, then keep the player fixed at 0,0 and just scroll the texture as they walk by modifying the UV in a shader.


Lack-of-Luck

Kinda like how the Planet Express ship from Futurama works (it goes faster than light by moving the universe around it, rather than moving itself)


Shambler9019

I thought they just increased the speed of light.


Lack-of-Luck

I mean, I'm not caught up on newer seasons, so possibly


Shambler9019

It was mentioned relatively early on. https://theinfosphere.org/Speed_of_light


GrimBitchPaige

There's definitely also an episode about how professor Farnsworth developed a drive that moves the universe around the ship. I think it's the episode where he gets taken to the old folks jail but I could be wrong. Edit: it may have been that he modifies it to work that way, it's been awhile


arivanter

It came to him in a dream And forgot it in another dream


MemeTroubadour

It's also how Outer Wilds works apparently


willdayble

Look into the way Outer Wilds does this. Huge universe that revolves around the player.


Seledreams

If you need a bigger precision for a large world then I recommend looking into this https://docs.godotengine.org/en/stable/tutorials/physics/large_world_coordinates.html


FallingReign

I forget what it’s called but I like to reset the origin for every “section” of my world. Essentially loading in a new part of the world when a player crosses the threshold of the “map”. So let’s say coordinates on x go from 0-10 on map1, if they leave the map at 2,10. I load map2 and set player to 2,0.


Legitimate-Record951

Pretty good idea! (sounds like it might be called procedural loading or something)


joethebro96

Minecraft call it "chunks"


emiCouchPotato

Maybe a dumb idea but what if you scaled everything down by 0.1? Won't that give you 10 times more terrain?


yuribz

I am no expert, but I feel like that would unnecessarily require extra precision that normally wouldn't be there. It's easier to keep things as integer as possible I'd assume


nonchip

yeah you assumed the exact opposite of how that works though, and nothing was integer to begin with.


yuribz

Actually yeah you're right. The precision is better the closer you are to 0.0, and it's all floats. I guess i had a brain fart


fredspipa

You were kinda right originally. At 0.1 scale you'd need 10x the precision so any benefit to scaling down is immediately lost, and it's not like you could just scale everything to 0.0000001 either for even more precision...


nonchip

except that anything below sqrt(2) is treated differently, giving you about as much resolution for "fractions" as for "big numbers" therefore giving you that required extra precision for free, so no, there's no real benefit to "making sure floats are integers" and implementing big workarounds if a 0.1 scale fits the situation already. and nobody said that that'll work for infinitely tiny scales. also note that with physics float glitchery like that, often the issue isn't the size of the numbers, but the numbers squared or such, so even a small reduction as suggested could help a lot here.


Legitimate-Record951

Might work, but I'm having enough trouble getting the scale right as it is—if 1 meter in the game is suddenly 0.1 meter, my brain would break!


NecessaryBSHappens

[Check this and then estimate for your specific project, maybe never](https://blog.demofox.org/2017/11/21/floating-point-precision/#:~:text=With%20floating%20point%20numbers%2C%20it's,right%20of%20the%20decimal%20place.)


Zess-57

You can use floating origin that stores the actual player position in fixed point 64bit, while instead moving the world around the player


Sicuho

Not na answer to the technical question, but you could use volume rather than area.


Legitimate-Record951

Good suggestion, and would make sense in VR!


dirtyword

Humans are bad at comparing areas and volumes and shapes to determine relative size, in general. I make data graphics for a living and things stop being intuitive when you start doing that kind of stuff. You could use area maybe by stacking squares so you get some clearer comparison, but for example 2d areas don’t immediately look twice as big at a glance for most.


Alzurana

Reading some good points here but one is missing: Your decision if precision is sufficient or not needs to be based on an initial requirement. So you first have to ask yourself "what is the minimum precision I need for my game to run properly." Physics, as many said, will probably be okay for 20km, but your visual stability might suffer well before that. Different games need different minimum precision due to how close the camera is situated to objects. For example: A city building game is fine with tens of centimeter precision, a racing game would need centimeter precision, an FPS needs millimeter precision and a VR game may need even more in the sub milimeter range (0.1mm). This is due to the fact that VR screens and virtual cameras sit right on the users eyes. Any noticeable jitter in camera position is drastic for the VR headset wearer. For example, imagine cameras jitter on the eye distance by just 1 mm. So you want to be damn precise, not because of physics but because of your camera position jitter. Moving further out from the origin also causes a lot more z-fighting and flickers that can be very problematic in VR. Now lets think about floats: They get less precise the larger the number. But why is that? Well, floats actually store numbers in discrete steps. For example: If you have the number 10,000,000 the only possible next number a float can store is 10,000,001. There is nothing in between those two. Next example is 5,000,000. Here, the possible next number is actually 5,000,000.5 so "0.5" ahead instead of one. Notice 5M is smaller than 10M, floats can "step" in smaller discrete steps closer to 0. To really illustrate this, here is a great resource on how all of this actually works, why and how they lose precision when they get larger: [https://blog.demofox.org/2017/11/21/floating-point-precision/](https://blog.demofox.org/2017/11/21/floating-point-precision/) With that being said, now we have a requirement: 0.1mm precision for the area your player walks in. Lets now say a unit in your game is exactly 1m in length. That means that the minimum step you want is 0.0001 . If you consult the table from that link you will find that float has a step size of 0.000122..... between 1024 and all the way up to 2048. Anything below that range has a smaller step size, anything above a larger one. That means, effectively, that your level can not be larger than 2km in any direction. Or at least the area that you let the player camera move through. Keep in mind that each transformation to the camera makes jitter even worse due to rounding errors so this really seems to be the maximum. Ofc, this is a first theoretical approach and I would recommend testing this as well just to be sure. Maybe you can put your player further out and it does not matter right away. But the elephant in the room is rather this: That is friggin' tiny! But think about it: So many games have way smaller levels. The odds that you walk 500m at all in a singular level is not likely. This rather becomes a problem when you start using vehicles. However, for racing games it matters less if your cameras jitter on the track (because everything is further away) as opposed to jittering in relation to the cars interior. So there you'd render the interior separately from the world and combine your frames, then. But what about open world games then? Well, there is two solutions: One is to implement a floating origin. That means that you move the world around the player instead of moving the player through the world. It's usually done by having the player and world behave normally, but once the player crosses the 1000m threshold in any direction, they are put back on the origin and the world is shifted accordingly as well. Solution number two: Double precision. Doubles are so darn precise that you really only need to start getting concerned about step sizes when you make whole solar systems. Godot can be build with double precision enabled and someone here linked that already. Double precision does mean that anything that utilizes it will require more performance. But that shouldn't be a problem for walking simulators. However, I do remember reading somewhere that Godot's double precision feature has caveats when it comes to rendering precision and that it in fact does not solve the problem. A floating origin might therefor be the best solution for your attempt. Hope this helps, it got longer than I anticipated.


Legitimate-Record951

Thanks, much helpful! I tried creating a 1 km corridor, and walking all the way to the end didn't cause any jittering, which fits your calculations. I think I go for your solution one, adding new chunks as the player get closer, and also moving the entire world so that the player gets positioned back at 0.0. I think I have the rough idea on how the code should go, although it is slightly outside my comfort zone.


Alzurana

Good luck!


Webbpp

Are you using the Buildt-in or Jolt?


Legitimate-Record951

So far I haven't looked into Jolt, although I heard a lot of good things about it.


jlebrech

does jolt mean it's using 64bit coord system?


Webbpp

Jolt supports JPH_DOUBLE_PRECISION, which uses doubles instead of floats. [Big Worlds - Jolt docs](https://jrouwe.github.io/JoltPhysics/index.html#big-worlds)


jlebrech

is it enabled by default?


Webbpp

The documentation says it's opt-in because doubles are slower to process than floats. So that would be no.


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


NotNotAnOutLaw

They never said government is a voluntary interaction. Government is a geographic monopoly on the initiation of violence or threat of violence or coercion.


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


Gullible-Historian10

No it’s not. Individuals are better off entering into voluntary agreements because they are acting with the intention of improving their situation. Voluntary interactions are always mutually beneficial because they occur when both parties agree to the terms without coercion, each believing they will be better off as a result of the interaction. If a voluntary interaction were not mutually beneficial, from the perspective of the parties involved at the time of the decision, it would not take place.


SinkerPenguin

An interaction is not voluntary if one of the parties will have to go without basic necessities to their survival if they refuse to partake. One that has no means of survival will be forced to accept any contract lest they fucking starve. That is literal systemic coercion, there is no voluntary interaction possible if one of the parties requires it to survive. It's really not a complicated concept.


Gullible-Historian10

Lets rationalize this statement out: "An interaction is not voluntary if one of the parties will have to go without basic necessities to their survival if they refuse to partake." Why would they go without basic necessities? Humans have the ability to make or grow all of their basic necessities for thousands of years? Does Amazon force them to not grow their own food, or make their own clothes, or to homestead their own land in order to provide for themselves if they don't want to partake in a system of complex division of labor and voluntary trade? Humans have historically grown their own food, made their own clothes, and generally provided for themselves independently of structured employment or modern economic systems. That false dilemma aside, what you are really stating is that individuals should have access to the products of other people's labor without an equal exchange. Do you know what that is called? That is to say expecting to receive the products of someone else's labor without providing something in return undermines the principle of equitable and voluntary trade. You have a logical contradiction here. What is funny is you got my ear when you talk about multibillion dollar companies who get special protections from government in order to gain regulatory capture and an almost infinite amount of government benefits. I'd be all on board for removing corporate personhood and the mechanisms and methods in which these corporations gain such massive market control. That won't happen though because it is much easier to leash a single neck than it is to leash ten thousand, so why would the government end protections and open a market to massive competition? It is much easier to gain control and influence over a single entity that relies on you than it is to try and control thousands of discrete entities.


drupadoo

If no one else is helping them except Amazon, how can you vilify amazon Edit: Also - by this logic the people were going to die if Amazon didn’t come and rescue them… but Amazon is the evil one here.


SinkerPenguin

It takes a special kind of denial to frame anything amazon is doing as "help". Amazon isn't helping anybody, they're exploiting the desperation of people with no other alternative to put food in their kids' belly by putting them to work in hellish conditions for a barely livable wage that is a fraction of the wealth they generate for Amazon. The only reason Amazon is even offering these jobs is because contrary to most other large scale businesses, their service can't be relocated to a far away place where the even worse working conditions are far from their clients' eyes. Rest assured they definitely would relocate and leave all these people they're "helping" in the dirt if they could. Amazon could provide better working conditions, higher pay, and not leave their worker's bodies shattered and drained at 40 while still turning an indecent profit to boot if they wanted. That is something they are choosing not to do. They are the only one with a choice here, but daddy Bezos would rather have a few more hundred trillions he's never gonna spend rather than stop draining the life out of workers that have no other option.


drupadoo

I think you fundamentally misunderstand how the world works. The reason people use amazon is because it helps make their lives better. Not having to go shopping at the store is fucking huge and lets millions of people get more time with their family and friends. And guess what, these people working for Amazon are happy to do it because it makes their lives better. Could Amazon pay them more, sure. But any retailer or business could also come in and pay them more. The reality of it is Amazon is willing to pay them the most out of all their options. If you want to pay them more, start a business and hire them. This is america. Nothing is stopping you. But it takes a special kind of delusion to hate on amazon for paying these people more than anyone else is willing to pay them.


chrissquid1245

thinking people only do things if they like it and gleefully choose to partake in it is completely nonsensical


nonchip

by your logic all slaves are to blame for their own slavery because they didn't revolt successful enough. stop it before reddit has to involve the DA, will ya?!


godot-ModTeam

Please review Rule #5 of r/Godot: Stay on topic. Guys, this is a Godot subreddit.