I don’t think so because since creating infinite worlds and universes requires a lot of skills the person developing it should then be skilled enough to do it themselves.
No. Unity is should focus on becoming a better tool for game development in general.
Let people who want to create specific games, learn how to create these types of games using the tools available.
They should at least allow large world support - where we can represent coordinates with double precision instead of float precision. It may not be infinite, but it would be very helpful for the especially large worlds.
There is not a one size fits all solution for doing an infinite world. Each game has different needs, so each game needs a slightly different solution. There are limits to addressing things using floating point math. One work around is to keep the player at the origin and move things around relative to the player. That solution might be perfect for some games and wrong for others, though. On top of that, each developer needs to decide the ratio of pre-designed vs procedural content, and then decide on a method for streaming and/or spawning that content dynamically. Again, one size does not fit all for that either.
But generally speaking, yes Unity would benefit from releasing templates that solved these complex problems even if those templates each only worked for a certain subset of the possible infinite world games. Good templates leads to more Unity users. It is certainly not Unity’s responsibility to create and release infinite world templates, but I can definitely see how it could be an opportunity for Unity if they did.
Dealing with the problem means having to shift the world so that the player is always at the origin. It’s do-able, but it adds a layer of complexity to many parts of the codebase - having to manage offsets and all. It would be very nice to not have to deal with this complexity when I could simply use doubles instead of floats to represent the world.
Oh, sure, that part is easy. The complexity comes when I want to: add new chunks, teleport the player, deal with AI, deal with world coordinates in general (undo/redo system, global setting and reading of blocks, etc.)
I have to keep track of some offset and deal with it in all kinds of situations. Frankly, I find that to be annoying and messy.
When the solution is simply to allow double precision.
The parent game object is your new ground zero. Just use local coordinates. Same algorithms can be used. If action is local to player, unparent it for it’s interaction only.Your litanies of this and that stopping it makes no difference. All those offsets etc. are not a problem under this method. Again…couldn’t be simpler…
I think you’ll find most graphics cards and most of the middleware used by unity work on floats. So replacing floats with doubles is far more complex then simply changing a few types in transform. Pretty much every system in Unity is dependent on transform. So you are talking about rewriting most of the engine.
Plus the performance cost associated with the change will hit all devs, regardless of if it means a thing to them. Especially the mobile guys.
Far better to build a simple asset as @ippdev describes and distribute that. No need to rework the entire engine.
Well, I wasn’t suggesting that everyone gets forced to doubles. But I suppose that you’re probably right in saying that making it optional wouldn’t be a technically viable thing to do.
Perhaps I am simply failing to understand properly. You’re suggesting that everything is a child to this game object, and then relatively, everything can keep the same coordinates - except relative to this game object instead of to the origin. Is that right? It confuses me, probably due to the fact I’m not terribly experienced. In this case I’d expect that I would still run into floating point precision errors using local coordinates the same way I would if everything were relative to the origin, since the values would be the same for the children.
I imagine I have the wrong perspective or something, so I’ll have to play around with it when I get to that point.
Using doubles instead of floats would hurt performance without fixing the real issue. The core issue is that you cannot actually simulate an infinite universe using any data type because all data types have finite limits. To build an infinite universe, you need to design a solution that lets you fake it in a compelling way. Simply switching to doubles does not accomplish that. Building a game that leaves the player at the origin and moves the universe relative to the player does accomplish the tricks needs to build an infinite universe.
Actually I agree, Unity needs a robust built in origin shift system that’s threaded internally and also supports Physx origin shifting.
So yeah I actually agree with Arowx, for the first time in forum history, because it actually is impossible for us without engine access to perform this process with good performance. We can still do it with rubbish performance.
However templates for this is wrong. It should be a native engine feature. I can see it being on their to-do list eventually. You’d have to learn to love .localPosition though
You would not place everything from the infinite universe into a single movable game object. You would place a natural group of things into a game object and move that group as a single game object. For example, in an infinite space universe, each solar system could be place in a game object and then that game object could be moved relative to the player. When a solar system got far enough away, you could remove it from memory.
You would also keep a data object that tracked where all of the solar system object were relative to the player, but that structure could use doubles and keep its units in light years instead of meters. You would design a custom game management object that decided when to load or unload individual solar system game objects based on the data in that universe level structure.
There are other issues such as light probes, world space particles, physx and many more problems that make it just too much bother to do a large scale game in Unity at good performance. Therefore I do not recommend people do large scale games in Unity at present.
It’s fine if you’re doing space, because you can probably get away with no light probes or reflection probes and roll your own particle systems (or keep them all local space), and there wouldn’t be too many colliders.
But you know, space is the easiest possible use case for origin shifting. You really don’t want to ask for a feature for this if it’s based in space, since it’s unlikely to encounter many problems vs land based origin shifting which is fraught with issues.