In 2.5D you use 2D assets/rendering techniques to give the sensation of a 3D environment.
Now, with that definition, in the following potentially ambiguous scenario, some elaboration is required:
Using 3D graphics, GPU accelerated and all (the game objects are meshes, not images), with a fixed camera angle. Lets make it even worse, the projection is orthographic, the classical 63.43 degrees. The only way to notice at first glance that graphics aren't 2D is because 3DGC, except that you render them with extreme care, are easily differentiated from hand drawing sprites, not matter the projection used to render them. You may experiment with different render techniques, parameters, shaders, etc, and you will have a hard time trying to hide the fact that they are 3D meshes.
A port of Game A, but targeting platforms that are known to have hardware that does not handle 3D graphics very well or does not handle it at all. Then the port replaces meshes with sprites. It still uses 3D Bounding Boxes for collisions, for example, and objects have a position property with x,y and z values, as the game logic was mostly not touched or not touched at all, only the rendering code was altered.
As the sprites of Game B are renders of the 3D assets of Game A and, to make things more ambiguous, Game A doesn't do anything that requires complicated shaders, in 99% of all GPUs out there you cannot differentiate a frame from Game B of a frame from Game A.
In 2.5D, interaction between game objects are limited to the set of situations where the illusion of 3D cannot be compromised. To represent two characters hugging, for example, you will have to create a single image file with the two characters interacting, as trying to represent the hug action only using a single image per character would be too hard or impossible. Maybe you can come with a character body divided in parts and draw them in the correct order. In 3D this problem does not exists (there exists another, that is posing the two characters correctly so they do not penetrate in the mesh of the other character).
Now, to visualize this, imagine that Game A and B have a bug that in some situation allows the player character to pass through another game object, allowing us to differentiate between the 2.5D one and the 3D one easily.
Game B, 2.5D Render, sprites are ordered by the z value of its position vector. In this example positive z is down and negative z is up. z-axis and y-axis are parallel but z is scaled by a factor of 0.5 of y. So if the visible area is from 10y to -10y, in the same area we have from 20z to -20z. Objects with a greater z will be drawn latter, so they will be seen as being in front of objects with lower z. Shadow of player character looks weird because shadows are in a superior layer than the floor, but in an inferior layer that all the other objects, so the player character shadow never is on top of the cube.
Game A, 3D Render. Depth buffer (also known as z-buffer) is used for pixel precision depth testing. So, an object does not need to completely occlude another, not even a triangle needs to completely occlude another, we have pixel precision depth test. We can rotate the game objects in any way and still get realistic results when they interact.
In resume: in 2.5D an sprite is either in front or behind another sprite. In 3D, a mesh is made of triangles, but triangle is not the minimal unit when testing for depth, you can have pixel precision. Of course, camera rotation in 2.5D is impossible as assets were created for a fixed camera angle, while in 3D is natural, if the angles of the camera are restricted by design in a 3D game is another subject.
There are different tricks to give the sensation of being in a 3D world when you only can render 2D graphics, I only presented a quickly crafted example using some assets of an abandoned project of mine.
Why not just use 3D always and forget about 2.5D?
Well, I can think in some examples of why a developer may prefer the 2.5D approach:
- Maybe they do not know, or do not like, 3D APIs (Direct3D, OpenGL, there are others).
- Maybe the target platform does not handle well 3D graphics (old desktop computers, 2D consoles).
- Your team can do amazing sprites but not 3D models.
How much you can approximate the results of 3D graphics using 2.5D?
There is a performance and programming complexity horizon. When you approximate to that horizon you start to doubt if your project is really possible in 2.5D or if you have to go full 3D. For example, you can use z-buffering in 2.5D (in theory), but can you pay the video memory cost (old desktop computer with onboard graphics, not powerful mobile devices)? Do you want to pay the storage cost of having an extra image to save the z-mask of every sprite?
Good candidates for 2.5D are RPG games, think Baldur's Gate series, or RTS, thinks Age of Empires 1 and 2 (AoE 3 is fully 3D and easily to differentiate).
Orthographic projections: http://glasnost.itcarlow.ie/~powerk/GeneralGraphicsNotes/projection/orthographicprojection.html