Skip to content

Commit c7cc72b

Browse files
committed
Add screenshots and tweak README files
1 parent d1ba41d commit c7cc72b

File tree

10 files changed

+38
-14
lines changed

10 files changed

+38
-14
lines changed

misc/2.5d/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
# 2.5D Demo Project (GDScript)
22

3-
This demo project is an example of how a 2.5D game could be created in Godot.
4-
5-
Controls: WASD to move, Space to jump, R to reset, and UIOPKL to change view modes.
3+
This demo project shows a way to create a 2.5D game in Godot by mixing 2D and 3D nodes. It also adds a 2.5D editor viewport for easily editing 2.5D levels.
64

75
Note: There is a Mono C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/2.5d).
86

97
## How does it work?
108

11-
Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects; its first child must be a Spatial, which is used to calculate its position. It also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).
9+
Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects. Its first child must be a 3D Spatial, which is used to calculate its position. Then, add a 2D Sprite (or similar) to display the object.
1210

13-
It uses math inside of Node25D to calculate 2D positions from 3D ones. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
11+
Inside of Node25D, a 2.5D transformation matrix made of three Vector2 is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
1412

15-
To display the objects, add a Sprite or any other Node2D-derived children to your Node25D objects. Some nodes are unsuitable, such as 2D physics nodes. Keep in mind that the first child must be Spatial-derived for math purposes.
13+
Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new set of basis vectors in Node25D, use it on all instances, and of course create sprites to display that object in 2D.
1614

17-
Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new set of basis vectors in Node25D, use it on all instances, and of course create textures to display that object in 2D.
15+
The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).
1816

1917
## Screenshots
18+
19+
![Forty Five Degrees](screenshots/forty_five.png)
20+
21+
![Isometric](screenshots/isometric.png)
22+
23+
![Oblique Z](screenshots/oblique_z.png)
24+
25+
![Oblique Y](screenshots/oblique_y.png)
26+
27+
![Front Side](screenshots/front_side.png)
28+
29+
![Cube](screenshots/cube.png)
30+
31+
![2.5D Editor Viewport](screenshots/editor.png)

misc/2.5d/screenshots/.gdignore

Whitespace-only changes.

misc/2.5d/screenshots/cube.png

120 KB
Loading

misc/2.5d/screenshots/editor.png

261 KB
Loading
40 KB
Loading
30.2 KB
Loading
172 KB
Loading
32.9 KB
Loading
64.2 KB
Loading

mono/2.5d/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
# 2.5D Demo Project (Mono C#)
22

3-
This demo project is an example of how a 2.5D game could be created in Godot.
4-
5-
Controls: WASD to move, Space to jump, R to reset, and UIOPKL to change view modes.
3+
This demo project shows a way to create a 2.5D game in Godot by mixing 2D and 3D nodes. It also adds a 2.5D editor viewport for easily editing 2.5D levels.
64

75
Note: There is a GDScript version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/misc/2.5d).
86

97
## How does it work?
108

11-
Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects; its first child must be a Spatial, which is used to calculate its position. It also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow.
9+
Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects. Its first child must be a 3D Spatial, which is used to calculate its position. Then, add a 2D Sprite (or similar) to display the object.
1210

13-
It uses structs called Basis25D and Transform25D to calculate 2D positions from 3D ones. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
11+
Inside of Node25D, new structs called Basis25D and Transform25D are used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
1412

15-
To display the objects, add a Sprite or any other Node2D-derived children to your Node25D objects. Some nodes are unsuitable, such as 2D physics nodes. Keep in mind that the first child must be Spatial-derived for math purposes.
13+
Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new Basis25D, use it in all your Node25D transforms, and of course create sprites to display that object in 2D.
1614

17-
Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new Basis25D, use it in all your Node25D transforms, and of course create textures to display that object in 2D.
15+
The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).
1816

1917
## Screenshots
18+
19+
![Forty Five Degrees](../../misc/2.5d/screenshots/forty_five.png)
20+
21+
![Isometric](../../misc/2.5d/screenshots/isometric.png)
22+
23+
![Oblique Z](../../misc/2.5d/screenshots/oblique_z.png)
24+
25+
![Oblique Y](../../misc/2.5d/screenshots/oblique_y.png)
26+
27+
![Front Side](../../misc/2.5d/screenshots/front_side.png)
28+
29+
![Cube](../../misc/2.5d/screenshots/cube.png)
30+
31+
![2.5D Editor Viewport](../../misc/2.5d/screenshots/editor.png)

0 commit comments

Comments
 (0)