i think i must excuse for my english, there are some missunderstandings here. i dont want to make a 3d world donuts shape. that was just an example of how an infinit 2d world would be created. this is used in praxis by civilisation (the option is even called "donuts shaped world" if i remember correctly). get yourself a donut and a biro. point somewhere on the donuts surface. the surface (not the interior or the air aound it) is the 2d map. now you can draw a line from your staringpoint back to your startingpoint without any break if you just draw into the same direction.i.e. you can draw a circle directly on the topside of the donus, as many times as you want. or you can draw forward and down, then down and backward till you reach the bottomside then up and backward (throug the hole in the middle) and back up and forward till you reach the topside again.i both cases you can draw a line constantly in the same direction that returns to its staringpoint.
its obvious that if a 2d infinit space is 3d a 3d infinit space must be 4d, at least if you want to use that biro methode(if you could in 4d space), ofcourse the coordinated on the surface of the donut are not used in a 3d way. they are only 2d.
the thing that im going to do, as long as a scenemanager with better performance then my code will produce isnt avaible:
imaging a 6 sides dice. stack 27 of them to form a bigger dice (3dice*3dice*3dice). the one in the middle that cant be seen from outside,because its all covered with dices, and therefor also cant "look" back at me is my world. all other 26 surrounding dices are exact copys of my world. they are orientated in the same way as my world (i.e. the "6" is upside and the "3" is backside on any of the 27 dices)
if the dice in the middle (my world) would look from its side "6" to the adjectant dice it would see "1" (the oposite side of "6" on every dice (the summ of the oposite numbers on dices is allways 7)) so this way i can see the other worlds, representing the oposide edge of my world (at least an exact copy of it) when looking over "the boarder" of my world. as soon as i walk over the topside boarder of my world i would (in the programm) change the coordinates so that we reenter the world (the middle dice) again from the bottom.think of this for the edges also, its not perleidoskope.
to optimise this i would cut some parts of the surrounding dice away (not placing models in them). i would leave only the sides that face the middle dice and a bit of space behind them. i would leave excatly as much as i could look far when i stand directly at the border of the middle dice, looking over the border but having not crossed it yet. i would save the least space for the dice in the middle of the 3*3 sides that have one side connected to surrounding air and 5 sides to other dice. a bit more for the dice that have 2 side connecting to air and 4 sides connecting to dices and the most for the dices in the corners of the big dice, as i have to leave only maximalViewdistance*3 of space here.
lets say the viewdistance =1
size of the middle dice = (20*viewdistance)^3 = 20^3 = 8000
size of "1 side to air" dice
(20*viewdistance)^2)*viewdistance = (20^2)*1 = 400
nr of "1 side to air" dice = 6
space for all "1 side to air" dices = 400*6 = 2400
size of "2 side to air" dice
(20)*(viewdistance^2) = 20*1^2 = 20
nr of "2 side to air" dice = 12
space for all "2 side to air" dices = 20*12 = 240
size of "3 side to air" dice
viewdistance^3 = 1^3 = 1
nr of "2 side to air" dice = 8
space for all "3 side to air" dices = 1*8 = 8
summ of surrounding dice space : 2400+240+8 = 2648
compared to the 8000 of the middle dice (the world) that are only 33.1%.
so if worldsize would be 20 times as much as viewdistance i would have to operate in 133,1% of the space needed for the world itself to realise this. compared to the 2700% when not cutting space of the surrounding dices this looks rather small to me. maybe its not that performance killer. i gotta check out where to get the value for viewdistance from
edit :
so where is the 4d donut ? its not there. but if it was it would save that 33.1% of performace
and that was what im looking for
edit :
the loss of performance should be even less. this additional 33.1% of space wont use the same performance as 33.1% of the real world, because some though methodes like collision detection and such dont have to be performed in that additional space, its only for the "see over the boarder" effekt.things that happen there also happen in the real world smoewhere. so no need to double this, apart from the grafiks
the kaleidoskop effekt would result if the size of the world would be less then the viewdistance.