Page 1 of 1

Spherical Worlds?

Posted: Thu Jun 16, 2005 2:45 am
by Mochino
Well, we have this idea of a world that happens in a sphere, so if you fly straight forward you will arrive at where you started.

We have been thinking about the world being a plane circle, so if you are in the edge of the circle, a camera would replace your current camera and show what it's supposed to be on the other side.

As you go through the edge, it automatically places you where you should be.
It would be easier for objects actually, the only problem is for the field of vision.

Has it been implemented before?

I searched in the Forum and found one topic. We do not want everything to rotate to simulate the world's movement. It would be a pain in the ass for Network code actually. Imagine a computer going crazy as a server doing all the position conversions for players, models textures etc. And reconverting them to send them back to each player.

That's why we thing a world as a circle would be a nice idea.
Actually what i'm thinking is that as the player aproaches to the end of the level, a second camera is created and eventually it acts like a portal (look through) I might be crazy, what do you guys think?

Has anyone managed to do this using Irrlicht?

Re: Spherical Worlds?

Posted: Thu Jun 16, 2005 5:21 am
by AlexL
Mochino wrote: (snip)
I searched in the Forum and found one topic. We do not want everything to rotate to simulate the world's movement. It would be a pain in the ass for Network code actually. Imagine a computer going crazy as a server doing all the position conversions for players, models textures etc. And reconverting them to send them back to each player.
(snip)
Mochino, I'm not sure why you are worried abouts the server processing all of the media from within your application; all of this would/should be processed on the client machine with the server just sending packets with position, rotation and packets of the like.

As for your idea for the world, I have not seen it implemented with any of the engines I have used. But that doesn't mean that it can't be done :) Best of luck, and if I can think of any advice to give you; be sure I will.

Posted: Thu Jun 16, 2005 8:12 am
by don_Pedro
I have now implemented something like this in my program. I solved it very simply, world is just repeated in all directions, so if you are near the end of map, camera sees its repetition.

Posted: Thu Jun 16, 2005 12:39 pm
by Mochino
Thank you Pedro, now i have a few more questions.

isn't that a perfomance eater?
how did you repeated the world?
There has to be a limit right?
Your original map size is it a square?
If it is a square what happens when the player goes in a straight line to the interesections of the edges in 'x' and 'y'?

I really hope you can help me man.Although you have done a lot already with that idea.
Thank you.

Posted: Thu Jun 16, 2005 2:26 pm
by don_Pedro
My idea is that map is repeated in all directions, as follows:

NW | N | NE
-----------------
W | X | E
-----------------
SW | S | SE

Where X is actual map. These repetitions are used only to expand view when camera is close to the end of the map, when it reaches edge its moved back to the opposite place - when map is of size 2048 x 1024 units and camera reaches positon 2048,682, it's moved to 0,682. The repetitions are processed only when they are visible, and they are exact copy of main map, so it shouldn't low down performance, it also depends on what scene is constructed like.
There was aslo one tutorial somwere arround here, maybe it have bether method, this was just good enough for me.

Posted: Thu Jun 16, 2005 5:58 pm
by Mochino
thats funny before you posted that map we thought about the same thing earlier while talking to my partner.

You made that for the map that is a city right?
a la grand theft auto?


What about objects you just used pointers to objects in the X map so they can be redrawn in the other maps?

Posted: Thu Jun 16, 2005 7:06 pm
by don_Pedro
Yes, I did it for the city. Displaying objects is still not implemented in my program, but I know how to do it very easy. They're just going to have stored a position only in main map, and based on position of active camera it will be decided where they should be rendered. For example on map 1024x1024 units camera is on 800,700, and looking east, object is on 100,650, so it will be rendered on position (1024+100, 650) - will fall on eastern map.
In my program maps may be actually repeated infinitely in all direction, so even without camera shifting you can go straght on and will finally got to the place of start. But when you go too far there are some problems with display, probably cause of z-buffer, and of course you finally reach end of float type, that I don't know what would cause, but surely nothing good :) . So this camera and objects shifting is anyway necessary.

Posted: Thu Jun 16, 2005 7:21 pm
by Mochino
Man thank you very much for all the info you gave me.
How much do i own you?

:wink:

I will be around and again, thank you VERY much.