# Looking for a dirty pseudo 3D trick

To be specific I want to do bad sprite scaling like in Operation Thunderbolt. For some reason I'm getting it all wrong so far.

I started over from scratch and I've literally got a sprite that follows the mouse and scales larger as the Y position increases. I've got a horizon line at y128. I don't want the sprite to start scaling until it passes the horizon. I've been through countless examples of pseudo 3d but I want to start simple, one thing at a time so I can get the maths right in my head :S

Right now the code is:

set scale: Sprite.Y / Scalerate

Which keeps the scaling even as I move the mouse up and down but now I want to limit it to only growing after the horizon at 128. As if a person is walking down the road at you, or maybe an equation that let's you set a start and end point on the y axis.

I'm totally new at the sprite scaling stuff!

• Some pictures might help understand what you're after. – Thomas Sep 13 '16 at 5:54
• s16-us2.ixquick.com/cgi-bin/… How do I display img? – PlasticCogLiquid Sep 13 '16 at 22:55
• Basically, a 3D road effect with scaling objects. Just a straight road, no fancy stuff. I'll figure it out eventually but my time is limited so if anyone can help in any way I'd appreciate it. I guess it's scaling to perspective that I'm after. Been reading up on some trig stuff but I work a lot so it's hard to soak it all in. The dirtier the better anyhow. :D I prefer hacks over proper technique but either way it good. – PlasticCogLiquid Sep 13 '16 at 23:03

if y > 128 then: