Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2.5D Demo Projects #315

Merged
merged 7 commits into from
Mar 3, 2020
Merged

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Mar 6, 2019

A few users have asked how to create 2.5D games in Godot, so I've created two demo projects that demonstrate how such a thing would be implemented. Actually, they are both the same project, the difference is that one is written entirely in GDScript and one is written mostly in C#.

GDScript version link: https://github.com/godotengine/godot-demo-projects/tree/master/misc/2.5d

C# version link: https://github.com/godotengine/godot-demo-projects/tree/master/mono/2.5d

@Steph155
Copy link

Steph155 commented Mar 6, 2019

@aaronfranke
I'm a student in software engineering but with not so terrible programming experience(still < one year in any programming language)... But I'm an artist too. You say you need a platform texture for the demo project. Thank God I have a graphic tablet and also do pixel art... Well I needed it to build my own video game which is still being developed. Here's an example of my latest works :
kuga64_standing_xxl

So if you need a texture, you can ask me, specify the texture resolution ideal for you. And if instead you want a tileset, I'm ready to help. Just reply by tagging my name...

@YeldhamDev
Copy link
Member

Did a superficial look, interesting way of doing it. For now, my only complain is that is very hard to tell height difference between platforms, if there was a way for them to cast a shadow below them, maybe with some shader wizardry.

@Steph155
Copy link

Steph155 commented Mar 6, 2019

@YeldhamDev
It'd be quite interesting to that. And I understand it's possible to set shader on 2D textures using normal maps... But it's optional. Besides, if @aaronfranke had used a good tileset, there wouldn't be this problem I bet. But he is not an artist. Sire @aaronfranke, I can just find/make a quick asset if you need.
For a start, you can check this website( https://opengameart.org ).

@aaronfranke
Copy link
Member Author

@YeldhamDev Yes, of course. We could work on shadows, perhaps making a large floor below all of the platforms where the shadows would show up. I'm not sure what would be the best way to have "partial" shadows though, platforms partially overlapping each other would have floating shadows right now... @Steph155 mentioned normal maps, I am not an expert on 2D so I'm not sure how that could be made to work procedurally based on the surrounding objects (or, it could just be hard-coded...)

@Steph155 Pretty much any resolution is fine, but I would suggest it being lower resolution than it currently is (logo is 64x64) because I currently have the camera set to zoom 2 to make it easier to see everything. You can preview how the objects would look simply by replacing the textures, and give proper behavior simply by changing the 3D collision boxes and/or constants such as SCALE.

@Steph155
Copy link

@aaronfranke Wow, check this !
It might be inspiring for the current project. The developer didn't really need a 3D node but just a hack with scripts including a draw() method..
https://www.youtube.com/watch?v=jRAXB-16_7s

Well, I also wanted to ask, where do I put the sprite sheets for the project's character ? Here ?

@aaronfranke
Copy link
Member Author

aaronfranke commented Mar 12, 2019

Feel free to post here, or link me a branch on a fork. In either case I'll add you as a contributor.

The method used in this demo is quite flexible since it works with arbitrary colliders, not just "AABB"s defined in code in that video. With this demo, it's possible to make an irregularly shaped or diagonal platform, as well as slopes, since it uses full 3D math, though I haven't featured this in the demo (yet).

@Steph155
Copy link

preview
@aaronfranke
I really lacked free time lately. Here's a sprite preview of the character I propose for the project.
If it's good, then I start the animation process and finish the coloring for it to look more appealing.
So how is it ? Should I also make attack animations ? If yes, then I'll try doing something basic, both melee and shooting animations.
The original size is about max 64 x 64 pixels.

@aaronfranke
Copy link
Member Author

aaronfranke commented Mar 15, 2019

@Steph155 I really like it! It looks like an awesome robot, and it's even purple to match with Node25D. I don't know what you are planning to change about it but it looks like you're going the right direction.

When it comes to animation, that's entirely up to you. Attack animations are not really necessary for this demo project, but they would be welcome if you wanted to make it.

Also, while we can probably get away with using the same perspective image for 45 degree, isometric, and oblique Z, we would want a slightly modified one for front side, and a different one for top down. Actual 2.5D games don't need multiple perspectives, but this demo project should showcase them.

@Steph155
Copy link

Greetings.
Here's the idle spritesheet. Hope it's alright...
I'm making the run spritesheet as well.
I drop it here when done...
Robi_Idle_sheet

@Steph155
Copy link

Steph155 commented May 5, 2019

@aaronfranke
Here you go. The spritesheet for the run animation is done...
Robi_Run_SSheet

@Steph155
Copy link

@aaronfranke
Greetings Aaron.
Here's the jump anim spritesheet. I used a two frames-based reference and since the robot is symmetrical, I saved my job to 10 sprites instead of 16. Level design comes next...
Robi_jump_sheet

@Steph155
Copy link

This is my first tilesheet ever...
It's not so terrible, but I believe there are quite enough types of textures, and combining them could help build complex levels. Alright. Dropping it here...
Asset_2
Asset_2_a

Co-authored-by: Stephen Agbete (Steph155) <bgsteph15@mail.com>
@aaronfranke aaronfranke force-pushed the 2point5d branch 2 times, most recently from f70e9ce to ce8342f Compare March 1, 2020 08:09
@aaronfranke
Copy link
Member Author

aaronfranke commented Mar 1, 2020

After a very long time of waiting and work, I'm marking this as ready for review. If nobody reviews it I'll probably still merge it, but I would love to get feedback on everything so far.

The current state of the project not only allows you to create 2.5D games, but also has a 2.5D editor viewport with a translation gizmo to make the process easy and seamless.

2.5D Editor Viewport

Before anyone reports issues with the Mono C# version: Yes I know it throws errors when the project is first opened and that Gizmo25D doesn't work properly for some reason, but I have no idea what is causing these issues. It's most likely just Godot bugs. Aside from that, it works great.

@aaronfranke aaronfranke marked this pull request as ready for review March 1, 2020 09:58
@aaronfranke aaronfranke changed the title [WIP] Add 2.5D Demo Projects Add 2.5D Demo Projects Mar 1, 2020
@golddotasksquestions
Copy link

How would one "review" it? Where can I find the download link?

@qarmin
Copy link

qarmin commented Mar 1, 2020

@golddotasksquestions
Copy link

Thanks @qarmin , is there some link somewhere I'm just to blind to see, or did you went and searched manually through aaronfranke github page?

@qarmin
Copy link

qarmin commented Mar 1, 2020

I just go to this PR branch, and then I downloaded it.
It is really hard to find first time this.
1.
Zrzut ekranu z 2020-03-01 17-55-58
2.
Zrzut ekranu z 2020-03-01 17-56-43

@golddotasksquestions
Copy link

golddotasksquestions commented Mar 1, 2020

Finally found it in the "misc" folder. Why make it so complicated and not just add a link in the OP?

Right after installing it, the first time I open the project I immediately get this popup warning:

"Unable to load addon script from path: 'res://addons/node25d/node25d_plugin.gd' There seems to be an error in the code, please check the syntax."

@Steph155
Copy link

Steph155 commented Mar 1, 2020 via email

@aaronfranke
Copy link
Member Author

@golddotasksquestions Close and re-open the project. That bug happens whenever Godot hasn't imported everything yet, I don't think there's anything I can do about it.

@golddotasksquestions
Copy link

The cube demo looks really impressive!
With the platformer demo the character sometimes jerks forward in it's position (with the camera) what seems like just a frame or two. I have not found out when exactly this jitter-jerk appears or why, but it's happening about 3 times a minute.

@aaronfranke
Copy link
Member Author

@golddotasksquestions Does changing the physics engine help? I haven't really seen such issues on my system, any debugging you can do would be greatly appreciated.

@golddotasksquestions
Copy link

Sure, I can do some testing. What do you mean by "changing the physics engine"?

@aaronfranke
Copy link
Member Author

aaronfranke commented Mar 1, 2020

Screenshot from 2020-03-01 15-19-43

EDIT: BTW, your name is very accurate. You do ask a lot of questions 😛

@golddotasksquestions
Copy link

golddotasksquestions commented Mar 1, 2020

2D, 3D "Default": jerking jitter 2-3 times a minute into the walking direction.
2D, 3D "Godot Physics" makes the shadow completely disappear and jitter, but mostly just disappear. Character seems fine.
2D "Default", 3D "Bullet" seems to work fine
2D "Godot Physics", 3D Bullet" seems to also work fine, though I have seen the character jerking forward once (not as much as in default settings)

@Calinou
Copy link
Member

Calinou commented Mar 2, 2020

2D only supports the default Godot Physics, so 2D "Default" and "2D "Godot Physics" are effectively identical. We should tweak the property hints to reflect this.

@aaronfranke aaronfranke merged commit 424ad34 into godotengine:master Mar 3, 2020
@aaronfranke aaronfranke deleted the 2point5d branch March 3, 2020 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants