About the tutorial "your first 2D game" I recently started this tutorial with C#, I followed all the steps well until I got to the code of the player drive, I wrote the code and followed as said in the tutorial running the project, the project runs withou

About the tutorial “your first 2D game” I recently started this tutorial with C#, I followed all the steps well until I got to the code of the player drive, I wrote the code and followed as said in the tutorial running the project, the project runs without any error, but when I press the selected keys on the input map for the player’s movement, The player doesn’t move, he just stands in the same place every time. If anyone knows if I did something wrong or how to fix it, please help!!

Did you define the keys?

Post the project here so we can take a look at it.

1 Like

How i do to post the whole project??

Dodge_the_C

Here is the project…

I’m not a C# expert, but a cursory glance raises questions:

Where did it come from

using System;

?

The error in

4 public partial class player : Area2D

Should be

public partial class Player : Area2D

The correct code can be found here:

By the way, why C# and not GDScript?

If you have typed the code yourself and not copied it, there is no reason to type comments — it makes learning more difficult.

I am learning with the tutorial, and I am more comfortable with c# . I have made all the changes and the player still don’t move!

try first use template, you can chose when creating script in character body. if will be not working that’s mean You don’t have C# SDK

If you are just beginning to learn programming, I recommend starting with GDScript.

Learn GDScript From Zero app


Try to download the project and run it — will it work?

Dodge the Creeps with C#

1 Like