You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I've had the idea rolling over and over in my head now, for a game that takes place on spherical worlds. But I haven't quite been able to figure out how I should go about executing the idea, at first I thought about faking them, but as I got farther and farther along with my design documents I realized that this wouldn't work.
My next idea is to have a pivot point in the center of each 'world' and have the player being pulled in towards that point, so he doesn't fall into nothingness. But I'm not sure if this is a good way to do this, so what I'm asking is for some input on what to do here. If anyone knows of any links for reading up on spherical worlds, or a link if they've already been talked about here; I would be extreamly greatful, thanks for your time
Btw, the worlds would only be 2x to 3x the size of the player; quite small.
Just an idea, it might work. (Sorry if the picture stretches the board)
I drew the picture with a physics engine in mind, but basically all you have to do is place your character in space, and put a sphere under it. Rotate the sphere according to the user's input, happiness.
If you want to use a physics engine, just drop your character onto a sphere with it's point of origin undernith the character, set upon the "gravity plane." Then roll the sphere around undernith the character.
Well, in my case, I made the assumption that there was going to be only 1 moving body (aka Sonic 3 bonus stages... the character moves, but everything else stays static to the world.)
If you want other things to move, you might be able to simply make the two bodies gravitationally attractive to each other (like what was already said), or you can translate the gravity plane to be perpindicular to every dynamic object as you do the physics engine part. I don't know how well that would work, though
if i were u, i wouldnt rotate the world. these variables would have to be changed,
rotating the character to the world=1 vector
rotating the world=world vectors + any enemies, npcs, drops, and anything else like that
hmm, u could also use upvectors. if ur using a physics engine, use the upvector joint (i no they have it in newton, not sure about others). however, this might cancel out some rotation;
to get the upvector, use something like the line2d getangle (for x and y, z for z use again for y and z or something) and convert it, maybe by %360 or something