2D Navigation polygon

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By edimemune
:warning: Old Version Published before Godot 3 was released.

I have been using Godot engine for a week and so far I love it. I created some games to get used to the UI and scripting language, but now I want to create a serious game: a 2D point and click. I searched on the internet and I found a video that uses exactly what I was looking for, but unfortunately there is just a demo video, not a tutorial.
Here is the image:
https://drive.google.com/file/d/0BxW0b-YjQRdXQl9qUlJmZ3lNR2M/view

The player can move only in that polygon and it some sort of fake 3D with 2D sprites. How to do that?

:bust_in_silhouette: Reply From: Zylann

You can have a look at the 2D navigation demo in the official examples to see how it’s done: Download - Godot Engine

As for the 3D fake, it’s just visual, in the end that’s still a 2D polygon with a point that moves across it (here defined by the feet of the character)

Thank you. With the fake 3D,I mean when the player or an npc goes deeper into the room, his sprite to be smaller.

edimemune | 2017-09-07 13:11

To achieve this depth effect, you need to anchor the sprite of your character to its feet, so you can scale it relative to where it stands. Then, apply a scale depending on the Y coordinate with a bit of math :wink:

Zylann | 2017-09-07 18:19

:bust_in_silhouette: Reply From: vik

Hi,

even if you probably already know: that video is on youtube https://www.youtube.com/watch?v=zpMDmTtGFss and in the description there’s the link to its source code on github GitHub - StraToN/godot_pointandclickadv: Basic Point and Click adventure game demo with Godot which you can download cloning the repository as zip file.

Like you I’m new to the Godot engine (just picked it up 1 week ago), and wanting to make a 2D point and click too so I’m studying that example (I gave a look at the Escoria framework, but after a bit of experimentation with it and having read its manual I quickly chose not to use it).
About that example: I advise you to take a look at the scenes and the scripts bound to its nodes.
Overall its inner working is pretty easy to grasp and a good starting point, especially if you have already some past experience with 2D point and click making.

HTH