Few noob questions about large world, precision, worldToArea and multiplayer Author Message
Glebastik
Member

 Post: #1 Few noob questions about large world, precision, worldToArea and multiplayer Hello there! I've been playing around the EE for a couple of days. So far, I like everything, but some questions have appeared. I will inform in advance that I'm not strong at programming generally and at C++ in particular, so please don't kick me too hard and better help to develop (seriously, with active participation, royalties are guaranteed) I'm trying to develop a kind of train simulator. No game engine is suitable for this (except Unigine but it is very expensive). The biggest advantage of EE is world streaming support "from the box", so here I am. I need a really huge world to be able to travel hundreds of kilometers by train. I know about the floating point pricision problem and trying to solve it. In other engines I would do a nested coordinates system, where the whole world is divided by tiles which have its own coordinate system. So the position of any object in the world could be represented as "tileX, tileY, x, y, z". Is EE capable of it? I would also like to know more about areaToWorld and worldToArea conversions. Is this a kind of world origin shifting? Will it cause any issues in multiplayer? Thanks in advance.
01-28-2020 11:41 AM
RedcrowProd
Bronze Supporter

01-29-2020 12:04 AM
Glebastik
Member

 Post: #3 RE: Few noob questions about large world, precision, worldToArea and multiplayer But is there any way to "explain" to the engine to count (or how it should be called correctly) coordinates not from the world origin, but relatively to current area, given the location of that area? Don't know how to accessibly explain... For example, I have an object located at the area 4576 -12984 and its coordinates relatively to this area are, let's say, -32.19, 4.85, 86.03. And the engine should get its coordinates as "4576, -12984; -32.19, 4.85, 86.03" but not as "585695.81‬, 4.85, -1661865.97‬". I researched an Open Rails' (another train simulator) source code, as far as my knowledge allowed, and looks like it divides the world coordinates by the size of a tile (it is 2048 in OR) and get tile position with object position relatively to this tile. As far as I understand, Open Rails is not experiencing any floating point precision problem without using doubles, it stores tile position in integers and operates with small floats. I've attached the .cs file here (Open Rails is written on C#) to make my explanation even clearer. I can try to insert this into the EE but I'm afraid to break something As I already said, I'm not very strong in programming. Attached File(s)   Coordinates.zip (Size: 3.02 KB / Downloads: 2)
01-29-2020 05:58 PM
Zervox
Member

 Post: #4 RE: Few noob questions about large world, precision, worldToArea and multiplayer it is possible to do so in pretty much any engine that I can think of be it Unity,Unreal,Unigine, Godot, Esenthel, however it requires work. benefit you have is that it is open source so you can always do whatever you want there, but again, it requires that you understand what you are doing. PhysX as RedcrowProd mentions is one thing you have to consider when doing the transforms. if your programming knowledge is as limited as you say or make an impression of, I would first start within the limits of the floating point range. or work on the project side by side.(one where you've started or trying to implement said coordination handling, and another where you stay within the limits)
01-29-2020 06:26 PM
RedcrowProd
Bronze Supporter

 Post: #5 RE: Few noob questions about large world, precision, worldToArea and multiplayer It comes down to architecture design -that one might be very well designed, using smaller scale to avoid crossing area too fast and lowering the information per tiles ( thus possibly lowering detail a bit ) -they could run without physics there for limiting greatly the outside the engine issue that could arose and because physics is somewhat more demanding than other things, and if you follow only a designed path you might not need any -they could do some smooth looping of world to avoid issue ( therefor doing some smooth loading and placement in the background ) They might do all of the above You will find many problem when doing projects outside of the box, the way i look at it when something come up is finding the ways to go around that issue and pick the one that has the least drawbacks Like zervox mentioned, try it and see where it takes you, this engine is as good as any, the community tho is rather small compared to other engine out there, but we all try to help when times allows, tho we dont do work for others and you have to come up with the cases Hope that helped
01-29-2020 09:19 PM
 « Next Oldest | Next Newest »