Godot 3.0: Top-down Tank Battle – Part 1
Welcome to a new tutorial series. Many of you have requested a full game tutorial, so I’ve chosen a top-down tank game. I have no idea how many parts this will be, but as we go we’ll cover things like tilemaps, pathfinding, ai/behavior, and many other topics.
Note: If you’re a complete beginner in Godot, you should start here first:
Art by Kenney:
Follow the written version of the series here:
Code for this part can be downloaded here:
Support me on Patreon:
I used 3.1beta3 to follow this and the exported variables showed only after I restarted Godot. In this video, I discovered the existence of Position2D node, the look_at function, and some basic inheriting techniques. Good job as always.
Hello, my turret doesn't follow my Mouse. It turns, but not to the center of my Mouse Button. Can someone help me?
PS: I rotated it in Godot.
how can i put the turret speed of the tank slower
A guy that goes by the name of "Papai Game Maker" or "Papai Maker" here on Youtube created a PAID Godot 3.0 course on Udemy that is litterally your FREE tutorial translated to portuguese. I bought it and accidentally came across your original tutorial while looking up Tank sprites …
im the like 666 😈
My new favorite youtube channel
Darn it. My tank does not move or turn. Been through the code multiple times and mine is exactly the same as yours. No compile errors. This is the danger with writing a fair amount of code and not doing any test runs until the end. Have added print() commands to my functions, and the player's control function is never being called. My player script inherits from tank, the paths are correct. Any ideas why is the player's control function is never being called ?
Thanks to the tutorials, I developed my first Godot game for android devices! 🙂
Here is it in play store: https://play.google.com/store/apps/details?id=com.thiagobarsa.whatajump
Awesome tutorials! But I'm hoping to make a top down shooter game instead of a tank it's a character shooting enemies etc , is there a way to do that using these tutorials ? Any help is appreciated
I got :"Script inherits from native type 'KinematicBody2D', so it can't be instanced in object of type: 'KinematicBody'"
What do I miss ?
Could you make a surviv.io clone with godot?
Hi! godot 3.1.1 is not letting me do the Extends kinematicBody2D. so I'm stuck, help or an update to this tutorial would be greatly apreciated, thank you!
This is really, really clean! Great job 🙂
Hi, I gave the same presentation for Dojocon and I should have watched your videos. I'll make a Tank tutorial too, but focus on explaining Godot and bits of maths.
The tank gun moves with the mouse but I cannot move the tank itself with wasd?
Hey folk, if someone can help me, I would appreciate a lot, here are my doubts:
– my player doens't stop moving when I release the key,
– ("forward") and ("back") doesn't work too.
Here are my codes:
KINEMATICBODY.gd (just like the Tank.gd)———————————————————————————–
var motion = Vector2()
var can_attack = true
var can_defend = true
var alive = true
export(float) var attack_cooldown
export(float) var defend_cooldown
export(int) var health
export(int) var speed
$Attack_Timer.wait_time = attack_cooldown
$Defend_Timer.wait_time = defend_cooldown
if not alive:
motion.y = -speed
motion.y = speed
motion.x = speed
motion.x = -speed
Awesome tutorial. Thanks.
It's another great series 🙂 One thing I would like to see is a basic description in the titles for easy reference when looking back e.g. Godot 3.0 Top DOwn Tank Battle – Part 1 Basic Motion. That would make it perfect for me 99/100 at the moment 😉
Hello, I am curious why you didn't create a "Main" scene at the beginning?
this is the best so far
This helps sooo much thank you
So when the tank is moving backward, the left and right are reversed, how do I fix that?
this is one of the best tutorials that i've found, thank you so much 💜
My tank can turn to the left, but not the right, and doesn't move foreward or back, and the turret is looking 90 degrees offset from the mouse I think, lol
My gun doesnt follow the cursor, i tryed to rotate the guns sprite but it desnt help… how to fix it?
I'm at 15:48 where we inherited the tank script to the new player script. I don't have any of those exported variables in my inspector? It just says "Script : Player.gd" and nothing else.
EDIT: I saved and closed Godot then reopened it and everything was there where it was supposed to be.
Now I have a new problem where my Tank Turret follows my mouse but its facing in the wrong direction? like its not pointed at my mouse its perpendicular with it.
EDIT: I literally had to rotate the png I used for the sprite itself in a graphic editor.
I'm a few years late to the party but I'm following along now. Thank you for the tutorial
THX SOOOOO MUCH!! I have been trying to find a good Tutorial but none and you gave me the BEST!
Thanks ! Best godot tutorials ! I'm a web developer with 10 years of experience and I can tell you this that this tutorial are very useful due the lack of documentation/tutorials on main website. I'm waiting the book! Very good job thanks again!
what programming language does he use for the scripting?
It tells me I have 5 errors like the signal health changed is declaredbbutcnever emitted help me
How to add the pics????
I'm here after the first game tutorial, and your videos are making me love godot! Thanks
My tureet is facing 90 degresa from the mouse pointer
Why is the variable "rot_dir" used? Can't you just do "rotation_degrees += rotation_speed?"
I cant make it , it shows errors all the time
So bore you wasted my 2hrs time!!!!!
For those of you who have everything perfect on the scripts and the tank still doesn't move, check at 15:48 if you have changed the value of the exported variables. You are welcome.
Could you make a tutorial that shows how to apply acceleration and deceleration to a tank ?
Thanks (that's the least I can say)
Hey there, everytime I try to test my player the game won't open. The output states this:
— Debugging process started —
— Debugging process stopped —
The turret is not looking at my mouse position and i dont know how to correct it please help (GOT IT)
Explaining what you're doing is not the same as teaching. This is not a tutorial.