Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Psudeo 3D (Sprite positions in mode 7 games)
#3
Hi,
Interesting subject, but this one goes beyond Tilengine itself. I recommend you a good tutorial about linear algebra and affine transformations. It's not really that hard, you don't need to understand the math itself, just how to apply some basic receipes:
  • Grab a simple linear math library that supports points, vectors, and matrices,
  • There are 3 basic linear transformations: rotation, translation and scale,
  • Each of these transformations has a standard "template" where you encode the desired values,
  • Multiple transformations can be chained by multiplying two matrices (order matters: it's not the same translate and then rotate, than first rotate and then translate)
  • To apply a transformation to a point, you multiply the source point by the transformation matrix that encodes your desired composite transformation,
That's all! Tilengine itself does it internally, you may check the source code to get inspiration if you want, but I guess there are better examples out there
Reply


Messages In This Thread
RE: Psudeo 3D (Sprite positions in mode 7 games) - by megamarc - 07-30-2018, 11:55 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)