Due to mathematical limitations on the part of myself ( :D ) I am converting a 3d game to 2d overhead. I want to center the player, allow him to rotate, but scroll the background and other object while leaving the player centered. I have done this in Java2D but wnated to find out if there is an LWJGL or OpenGL trick I am missing or just use tranlsates and offsets liek Java2D?
I am using GLU.gluOrtho2D(0, 800, 0, 600) to set up my display and it looks good so far (have not implemented motion yet).
Using translates and offsets should work just fine.
Other people that have actually done 2D scrollers can chime in here. :lol:
QuoteDue to mathematical limitations on the part of myself ( :D ) I am converting a 3d game to 2d overhead.
Out of curiosity, why did you have to change it to 2d?
The math can indeed be tricky... but let me give you the clue that enabled me to soar past such obstacles:
Don't move the character! Move the entire world around them! To do so is just a translate call away. :wink:
Just thought it may be easier as I had one similar already done. But after some coding and testing today, I may stay with 3D (for now) :wink: