My team finally resumed work on our project, and we decided to change from a typically vertical shooter to an isometric game. This raises one questions that I was hoping someone would help me with quickly.
Can one use the physics engine in ORX to deal with the movement and collisions in an isometric game? Is there a way to change the plane of the physics from the screen to a tilted plane? Does one simply bias all velocities, accelerations and the like to be, say, 50% in the y-axis?
Thanks a bunch,
And the reason for that is that your rendering doesn't have to match the exact orientation of your world, it's just more convenient when it does.
What I mean is that your world doesn't have an orientation, really, it's just using coordinates that you can map the way you want with your graphics.
It'll only mean that your display axes won't match your simulation ones: you decouple visuals from simulation.
You achieve going from one to the other with a simple transformation (a rotation in your case and maybe a scale depending if you want a real isometric or a, actually more commonly used in games, dimetric display).
What it means is that you basically have two options.
Either you use the traditional world space and you transform all your coordinates before display, ie. you'll have to listen to orxRENDER_EVENT_OBJECT_START and modify the coordinates in the payload to have an isometric representation instead of an orthogonal projection.
Or, as you suggested, you actually transform everything before sending your 'inputs' to the physics system.
I don't think there is any "better" way of doing it, though I think I'd go with the first option personally as it'll allow me to change the display mode later on more easily if I changed my mind.
I believe Grey posted about a project of his with isometric display somewhere in the forum (maybe did he also write a wiki entry about it, but I'm not sure).
I'm sure he'll be able to give your more details on how he did it.
Yes, I thought this would be it. I'll probably just transform my speeds, and coordinates in the Y-direction by 1/2, and deal with gravity myself.
For what we want, we don't really need more than speed and collision detection. For the future, I think collision reaction and gravity would be good to have, but I see that it would not be feasible without a lot of tweaking.