Seeking more help how do I make game logic?

Hello guys, I try to learn Godot Engine, here is my question: how can I understand a game design requirement and turn into a code function?
Like for example, I plan to make a 2d character move, combat, gather loot, upgrade. How to process?
I know that sounds stupide, I had never learned CS before.

1 Like

Hi, I also started using Godot recently, and I understand that you find it frustrating and complicated.

My recommendation is to start by making a very small and “simple” game. That game will surely help you understand many things about Godot, and you will learn to program in a more didactic way.

2D character move? soo start by moving the player by changing the position

func _process():
    position.x+=1

hmm,now he moves fast! now let’s add controls!

func _physics_process(delta):
	velocity.y += delta * GRAVITY

	if Input.is_action_pressed("ui_left"):
		velocity.x = -WALK_SPEED
	elif Input.is_action_pressed("ui_right"):
		velocity.x =  WALK_SPEED
	else:
		velocity.x = 0

pewpew! we got a character!
Same with the combat and other things! first add a damage system! then make a weapon, add enemy, inventory!
start slow and low!

You should definitely do a simple 2D course.

Also,you should change the title to something like How do I make game logic or something because there is going to be obviously someone in the feature who will be in the same condition as you.Soo make sure s/he finds the topic.

1 Like

Start with the getting started docs for sure!

4 Likes

Thank you!

Yeah, I am reading doce.

thanks a lot!

Asking questions is never stupid. Try to follow a tutorial or two or as @Frozen_Fried suggested:

There are plenty of free ones available too. That will teach you a lot.

But if you ever have another question, here is the place to ask it. Good luck! Stick with it, it is very rewarding and Godot is the perfect engine for it.

3 Likes

To make gameplay features, you’d need to learn how to program computers. This will teach you how to interact with the abstractions given by game engines (such as the input system) to create your feature(s). Without this knowledge, I would have struggled a lot understanding the underlying concepts.

It doesn’t matter which language you learn to program in initially (but to reduce future friction, consider Python or C#, with the latter being a bit nicer imo) as the skills are very transferable. What matters more is the lessons taught actually teach you how to program (logic, architect object-oriented code, and some technicalities of programming), NOT just the programming language (like most tutorials). Eventually you will pick up the logical thinking required.

If you want to make learning programming engaging, I suggest you look for someone who does it through games, and makes it for absolute beginners.

I learned quite a bit by following ChilliTomatoNoodle’s “Beginner C++ Game Programming DirectX” series on YouTube, though their humour is very juvinille and somewhat vulgar at times, but they teach programming, game logic, quite well.

If you want to learn programming the very traditional way, you can read Bjarne Sturstop’s Programming: Principles and Practice Using C++ book. However, I’m pretty sure it can be used to cure insomnia.

Like others said, start small. Pong is probably a good aim. Remember to enjoy the process first and foremost.

Let me know if you have any questions.

3 Likes

Great, thank you for your help!

Do the Your first 2D game — Godot Engine (stable) documentation in English tutorial. (Spanish Version)

Then do the Your first 3D game — Godot Engine (stable) documentation in English tutorial. (Spanish Version)

Most of your questions will be answered by those versions. and for the ones that aren’t, you will know enough about Godot to ask more informed questions and get the answers you want.

2 Likes

wow, thanks a lot!

1 Like

GDQuest help me a lot, I try to follow their guide.

1 Like