Basic Info: gm7, registered
A 2.5d game essentially means that while the graphics are 3d, the gameplay is not: the character and many other things move around on a 2-dimensional plane surrounded by 3d scenery. These are usually platformers. Good examples of this are probably Klonoa: Door to Phantomile, Kirby 64, and SSBB's Subspace Emissary.
The main difference between the first two and the third, however, is that the 2d plane in Kirby and Klonoa twists and bends, while Subspace Emissary's plane is fixed and doesn't turn at all. I'm going to refer to the twisting version as dynamic 2.5d.
The Paperlock engine uses paths to control how the 2d plane turns. A quick visual:
The first image shows the 2d plane as a sheet of paper with a blue object on it. The middle image is a path, and the third image is the "paper" twisted in the shape of the path. The object is still "locked" to the plane, and can move along it but not away from it. Objects can also move along the path from a distance (such as a camera) or be completely separate from the paper.
You can use a basic 2d room for the actual gameplay, but it will be drawn along the path. The example uses a simple platforming engine and a basic room to demonstrate. The room width is used to determine where objects are placed along the path.
-I used several amateurish techniques in this (and completely avoided trigonometry in favor of lengthdir). Feel free to replace them.
-obj_graphics contains the drawing code for all visible objects. I always use a system like this when designing 3d games. I don't know why. It's not an essential part of the engine.
-The engine doesn't demonstrate any objects separate from the paper, but it's fully possible.
-I don't make a lot of engines, and don't have much experience in them either. So if you want to improve this, contact me with your idea of how to improve it and I'll let you go ahead and possibly change the version here.
-All variable names start with an underscore to avoid overlapping with other variables.
-A major issue with this engine is gaps and 2d objects not aligning with their 3d counterparts. 2 scripts are included to fix this, one shrinks the path and another gives a ratio for how much to scale the 2d objects. The path-shrinking one is better graphically.
-Remember that all actual gameplay takes place in the 2d room. Room-wrapping issues may arise, among other things.
-I reccomend using curving paths. Sharp angles are awkward.
-Use a different engine for gameplay. The included platforming engine is pretty crappy and just used as an example.
-Credit would be nice.
Oh yeah, the link. Almost forgot that.
Edited by Digiboy, 18 May 2009 - 12:53 AM.