Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

2.5D Game Demo

An asset by Godot Engine
The page banner background of a mountain and forest
2.5D Game Demo thumbnail image
2.5D Game Demo thumbnail image
2.5D Game Demo thumbnail image
2.5D Game Demo hero image

Quick Information

0 ratings
2.5D Game Demo icon image
Godot Engine
2.5D Game Demo

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.How it works: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.Inside of Node25D, a 2.5D transformation matrix made of three `Vector2`s is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses CharacterBody3D and StaticBody3D, 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.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.The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple CharacterBody3D that tries to cast downward).Language: GDScriptRenderer: Compatibility

Supported Engine Version
4.2
Version String
4.2-31d1c0c
License Version
MIT
Support Level
featured
Modified Date
1 year ago
Git URL
Issue URL

2.5D Demo Project with GDScript

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.

Language: GDScript

Renderer: Compatibility

Note: There is a C# version available here.

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/583

How does it work?

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.

Inside of Node25D, a 2.5D transformation matrix made of three Vector2s 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.

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.

The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).

Screenshots

README Forty Five Degrees

README Isometric

README Oblique Z

README Oblique Y

README Front Side

README Cube

README 2.5D Editor Viewport

Music License

assets/mr_mrs_robot.ogg Copyright © circa 2008 Juan Linietsky, CC-BY: Attribution.

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.

How it works:

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.

Inside of Node25D, a 2.5D transformation matrix made of three `Vector2`s is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses CharacterBody3D and StaticBody3D, 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.

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.

The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple CharacterBody3D that tries to cast downward).

Language: GDScript

Renderer: Compatibility

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
2.5D Game Demo icon image
Godot Engine
2.5D Game Demo

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.How it works: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.Inside of Node25D, a 2.5D transformation matrix made of three `Vector2`s is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses CharacterBody3D and StaticBody3D, 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.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.The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple CharacterBody3D that tries to cast downward).Language: GDScriptRenderer: Compatibility

Supported Engine Version
4.2
Version String
4.2-31d1c0c
License Version
MIT
Support Level
featured
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers