I am making a tower defense game. I am working in x and y axis only. I have made a grid, snapped towers and made a pathfinding algo to run enemy. Initially I have worked with cubes and spheres in place of towers and enemies.

Now I am going to place real towers (3D). Note that I haven't used z axis up till now. The user will analyze the game from top down view.

I want the user to see towers placement with a little bit of 3d view but I have made my all code in 2d thing. Is there any solution to my problem that somewhat tower placement would view a 3D touch or you can say 2.5D ?? (like fieldrunners) or should I have to involve z axis and ignoring y axis ?


1 Answer 1


There shouldn't be anything about your code that needs to change. All you would really need to do is change the representation of your game. I'm guessing from the tag that you're using Unity?

Just throw a camera in there, play around with FOV (or make it ortho), and as you place models in the game they'll just look right. There's no reason for your TD code itself to care about the z axis.

  • \$\begingroup\$ ok thnx tetrad, what do u think about this game: fieldrunnershtml5.appspot.com/#sd. do they change the position of camera or objects are made to view like this ? \$\endgroup\$
    – Syed
    Nov 29, 2011 at 14:37
  • 1
    \$\begingroup\$ @syed Fieldrunners is 2D. They've just authored their sprites to look like they're being viewed from an angle. \$\endgroup\$
    – Tetrad
    Nov 29, 2011 at 16:32
  • \$\begingroup\$ To add to Tetrad's answer: This is an effect desirable in RTS games too - i.e. where it looks orthographic but its actually perspective. An easy way of achieving this is by setting the FOV on the camera really low, like 20, and positioning it far away. (and setting it to perspective) \$\endgroup\$
    – Aralox
    Nov 30, 2011 at 8:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .