I’ve been researching an idea of a 2D game where the player is always centered (at least horizontally), the terrain is always flat (ie. no slopes, no jumping, etc.) and various sprites will be added right on top of the terrain.
Here’s the tricky part: while the game will be completely flat/linear and you can only move forward/backward, I want to create the effect of the whole world being a sphere, ie. the terrain and all sprites that are not at the center (horizontally) will get bent downwards, creating the illusion of moving on a spherical terrain. Make any sense?
The reason why I thought this should be much easier with a shader is because I want sprites (think houses, trees, etc.) to look like they’re aligned to the terrain even if the terrain looks bent/spherical.
I hope this makes sense and I hope that someone will be able to at least point me in the right direction (I don’t know much about shaders). If not, I’ll have to draw a picture to demonstrate.
I’m not quite sure about the “2D” bit of your request, but I wrote this blog article a few days ago about creating a curved world shader a la Animal Crossing, with full surface shader code included. Does that help?