Overhead 2d scroller

Started by Soulice, December 08, 2005, 16:14:08

Previous topic - Next topic

Soulice

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).
S

Fool Running

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?
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

elias4444

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:
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Soulice

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:
S