Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scaling to fake camera zoom effect?
#2
Hi!

Of course it's possible, but you have to coordinate the scaling of background and sprites. Broadly speaking, you must scale the sprite coordinates and their sizes by the same factor than background layer.

For example, you shrink the background to x0.5 and have sprite 0 at coordinates x=20, y=30 you must do:

Code:
TLN_SetSpritePosition(0, 20*0.5f, 30*0.5f);
TLN_SetSpriteScaling(0, 0.5f, 0.5f);

If you want a true NeoGeo-like experience, keep in mind that the NeoGeo can only shrink sprites, not enlarge. Artists drew the graphics at full size and the zooming effect is achieved by shrinking. Tilengine doesn't have this limitation, you can upscale too.
Reply


Messages In This Thread
RE: Scaling to fake camera zoom effect? - by megamarc - 12-02-2022, 06:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)