How To Make A Space Shooter Game In Godot 4 (Complete Tutorial)

  Рет қаралды 30,750

Kaan Alpar

Kaan Alpar

Күн бұрын

Пікірлер: 72
@under_nrrad
@under_nrrad Жыл бұрын
Man it sucks to see how little views you get u deserve way more!
@KaanAlpar
@KaanAlpar Жыл бұрын
Thanks man hopefully one day!
@psycholover414
@psycholover414 Жыл бұрын
Thanks for the tutorial!! One of the most helpful ones I've found on KZbin for understanding what works and why it works
@andrewmassie
@andrewmassie Жыл бұрын
I really enjoyed this as a foundation tutorial. I've been playing around with adding background music, different enemy types, and ramping up the difficulty. Thank you so much!
@KaanAlpar
@KaanAlpar Жыл бұрын
Glad to hear that Andrew
@jpowens2010
@jpowens2010 6 ай бұрын
This was fantastic. I learned so many things I've been trying to understand, like how to connect signals up across scripts and spawn projectiles. This has been the best tutorial I've come across yet. Thank you!
@EvgeniyZabolotniy
@EvgeniyZabolotniy Жыл бұрын
Have not finishing watching this tutorial but can already say Thanks for your work here!
@evan_dood
@evan_dood 7 ай бұрын
Thank you so much for this! I powered through the basic Godot tutorials on their website last night and completed the "make your first 2D game" part. I messed around a little bit on my own trying to make what you made, I stumbled across this video, and now I've successfully made a side-scrolling version of what you explained! Just swapped the x and y values. Also I'm using Godot 4.2 and the tutorials all still hold up for now!
@BigAlNaAlba
@BigAlNaAlba 10 ай бұрын
Clear and to the point. Well done on such a good tutorial.
@del669
@del669 Жыл бұрын
Been doing the tutorial so far and I am really happy with your code and clear explanations, fantastic teacher. Subbed!
@piratejayesh8422
@piratejayesh8422 4 ай бұрын
Amazing video man really appreciate it I made this game 8 times from scratch😢 because of so many bugs and glitches in godot 4 mobile (early access) But I also learned to have backups for game if anything happens from that😅 You explained everything very well I understood everything despite english not being my mother tongue Thank you very much❤❤
@Theburninbeaver
@Theburninbeaver 11 ай бұрын
If anyone else is getting a parse error for the laser scene when loading the game after closing it, you need to move the preload to var line from the player script to the game script. You'll then need to modify the _on_player_laser_shot func and remove some of the references to the preload var name. That seems to have fixed the scene corruption for me
@dangputerz
@dangputerz 27 күн бұрын
I wish people would just correct their damn videos.
@toddlask
@toddlask Жыл бұрын
i got your latest 2 full making game vids on my shortlist! im excited!
@KaanAlpar
@KaanAlpar Жыл бұрын
Enjoy!
@andew7763
@andew7763 3 ай бұрын
Thank you for a very well made tutorial. Here's my quick notes on timestamps: 00:00 Basic setup 12:55 Laser setup 26:34 Creating the enemy scene 36:06 Creating new enemy type and enemy spawning 51:18 Scoring system and UI for it 57:47 Creating UI for scoring system 1:02:41 Creating Game Over screen and Hi-score functionality 1:20:14 Finishing touches - scrolling background and particles and sound effects 1:29:32 particle effects [Note: for Gadot 4.2.2, Emission shape is found under Spawn -> Position] 1:32.09 audio effects
@Kaaxe
@Kaaxe 11 ай бұрын
really needs timestamp sections so I can navigate the tutorial timeline
@pietraderdetective8953
@pietraderdetective8953 Жыл бұрын
I see Godot 4 game tutorial, I press Like and subscribed! You got some awesome tutorials here in your channel..I can't believe I haven't subbed!
@KaanAlpar
@KaanAlpar Жыл бұрын
Thanks a lot!
@MrEmphonic
@MrEmphonic 11 ай бұрын
Would be interesting to see all the space-shooters from all the people who followed this one :D
@amimirmimir512
@amimirmimir512 3 ай бұрын
4:59 it's good practice if you make the hitbox reasonably small as possible
@amimirmimir512
@amimirmimir512 3 ай бұрын
49:13 i was already ahead of you
@thadenamalar7875
@thadenamalar7875 8 ай бұрын
Pleas make a complete tutorial for using touch screen controls
@beebstergames7348
@beebstergames7348 Жыл бұрын
Thank you for the great tutorial. I have a question. I noticed that for the scoring signal you used the same signal name 'killed' for your two different enemy types. Godot 4 does not have an issue with that? It doesn't get confused?
@spectre.garden
@spectre.garden Жыл бұрын
Thanks, Kaan. Great stuff.
@KaanAlpar
@KaanAlpar Жыл бұрын
You're welcome, glad you liked it
@speedboi5710
@speedboi5710 Жыл бұрын
Thanks for the Great video! Clear and concise, was able to understand Godot concepts better now. I was experimenting and trying out adding things such as an explosion effect after an enemy was hit, tried applying a similar method to how the lasers was added to the game scene with all of the signals and what not, got stuck on an "Invalid set index 'global_position' (on base: 'Callable') with value of type 'Vector2'" error couldn't figure it out until now what I did wrong.
@HaikuTutorials
@HaikuTutorials 9 ай бұрын
You are the legend!
@UnstoppableTigra
@UnstoppableTigra Жыл бұрын
good tutorial, one of the best
@PixPunxel
@PixPunxel 9 ай бұрын
Very good tutorial
@rocketqueen232
@rocketqueen232 7 ай бұрын
This is great thanks :)
@isthisthingoH_NO
@isthisthingoH_NO 25 күн бұрын
trying to make this with only left and right controls and it's showing this error 'No constructor of "Vector2" matches the signature "Vector2(float)".' pls help i couldn't find a relevent soulution online EDIT:fixed the script error by adding 'dummy' controls (added controls with no keybind) but now the player isn't moving, i'm gonna make a post on godot forum about this
@silenkiss
@silenkiss Жыл бұрын
thanks you!!! ❤❤❤
@dzartxstudio
@dzartxstudio Жыл бұрын
Thank you ❤️❤️
@justinbenjamins3828
@justinbenjamins3828 Жыл бұрын
Hey Kaan. Yet again a superb tut! You're outdoing yourself 😀 Question..anything that is related to actual physics movement should be placed within the callback _physics_process, right? If we are just assigning keyboard input to a Vector2 variable why is the input not placed in the callback _process? Or can this go both ways?
@KaanAlpar
@KaanAlpar Жыл бұрын
Thanks Justin, I assume you are talking about the "direction" Vector2 variable in the player script, right? In that case you are absolutely correct. We can get the input for "direction" in _process and make it a global variable. Then we can use it the same way in _physics_process
@justinbenjamins3828
@justinbenjamins3828 Жыл бұрын
@@KaanAlpar You got it! I still have C# in my head. Trying to implement my C# coding style in gdscript to keep the learning curve to a minimum. It seems to be working, and this thanks to your way of getting across to your subscribers with these tutorials you put out.
@saulnores3477
@saulnores3477 Жыл бұрын
Everything together😊 What's your next tutorial series?
@KaanAlpar
@KaanAlpar Жыл бұрын
I'm thinking of a 2D platformer? What do you think?
@saulnores3477
@saulnores3477 Жыл бұрын
@@KaanAlpar It's good but there are too many titorials about platformers. May be you should try something different.
@KaanAlpar
@KaanAlpar Жыл бұрын
@@saulnores3477 True, maybe I'll do something 3D
@saulnores3477
@saulnores3477 Жыл бұрын
@@KaanAlpar good choice. I don't use 3D but many people do.
@TheEx404
@TheEx404 Жыл бұрын
How about puzzle game? Or quiz game?
@devspotacademy
@devspotacademy Жыл бұрын
finished thanks sensei ;)
@preecey18
@preecey18 10 ай бұрын
For some reason I cant get the Hi-score to work. It's resetting after every game, same as the score. Have checked the code numerous times and seems to be the same? Anyone got any ideas? Hands down one of the easiest to follow, and best explained tutorials on youtube. Thank you!
@Alienboi2005vidsandstuff
@Alienboi2005vidsandstuff 9 ай бұрын
what if I wanted my game to be a horizontal shooter game instead of a vertical
@XD_CREATOR186
@XD_CREATOR186 7 ай бұрын
How to add enemy aircraft explosion
@praneetprogamerz6607
@praneetprogamerz6607 2 ай бұрын
I couldn't understand where you created the signal called laser shot why you put the arguments in that and how does locations is a valid argument if we dont have a var for it i am beginner someone help
@vickylance
@vickylance 2 ай бұрын
He created the laser_shot signal in the player script when the user presses spacebar and he listened to that signal in the main game script and spawned the laser with the laser scene and laser position sent from the laser_shot signal from player as arguments.
@praneetprogamerz6607
@praneetprogamerz6607 2 ай бұрын
Thanks banku bhaiya
@castroleah2122
@castroleah2122 8 ай бұрын
How can I save the scene on mobile
@adriantris9306
@adriantris9306 10 ай бұрын
need help on 24.56 my laser is not coming from the ship but it appear on the right side screen any idea?
@sniperwolfxx4047
@sniperwolfxx4047 9 ай бұрын
set the Laser containor position to 0,0
@sniperwolfxx4047
@sniperwolfxx4047 9 ай бұрын
or set the parent first then the position
@dapyr
@dapyr 4 ай бұрын
@@sniperwolfxx4047 This worked for me (set parent to the container first then the position of the bullet), to fix the position. But then the bullets move with the player, so if I move left, the already shot bullets also move to the left. Making it more of a laser beam if shot constantly. Would you know how to fix that?
@sniperwolfxx4047
@sniperwolfxx4047 4 ай бұрын
@@dapyr i dont entirely remember how i fixed it but maybe try removing x velocity
@dapyr
@dapyr 4 ай бұрын
@@sniperwolfxx4047 I finally found my error, I accidentally added the container to my player, instead of just adding it into the level. So when moving around, the container would also move and thus the bullets. I guess it's not smart to work on coding at 3am :p Thanks for the reply though!
@thargelion
@thargelion 10 ай бұрын
Thanks a lot for this tutorial!. I've made it using C# (translating from your gdscript examples) I would like to release the code to github.I would like to share this tutorial as the source for it. Would it be a problem for you?
@KaanAlpar
@KaanAlpar 10 ай бұрын
No feel free to do it
@034omkar
@034omkar 6 ай бұрын
volume is too low
@byzantiumn8564
@byzantiumn8564 Жыл бұрын
anyone else having issues with score not working in this method?
@byzantiumn8564
@byzantiumn8564 Жыл бұрын
Not sure why his ran fine but the code needed was adding points into the signal emit which for some reason works despite absence here
@MAKMAL.33-SKPUTRAJAYAPRESINT18
@MAKMAL.33-SKPUTRAJAYAPRESINT18 3 ай бұрын
saya kurang faham tentang apa yang kamu ajar
@FjorTV
@FjorTV 8 ай бұрын
"Save your scene" How the fuck do I do that?
@159w9w9YT
@159w9w9YT Күн бұрын
"ctrl + s" or by right clicking on the scene then clicking "save scene"
@praneetprogamerz6607
@praneetprogamerz6607 2 ай бұрын
I think he has quit yt because he hasn't poseted in a year😢
@justanothernobody7142
@justanothernobody7142 Жыл бұрын
I'm not sure what I'm doing wrong but at the score label part if I type "hud.score = 0" in the game script I get the error "Invalid set index 'score' (on base: 'Control ()') with value of type 'int'. I've watched that part through several times now I I can't find anything wrong. I'm using the latest Godot version. Edit* I found the cause of the error it anyone has this problem. If you add a reference by dragging it in by holding down right mouse and then ctrl you end up with this for example "@onready var score: Label = $Score" instead you need just "@onready var score = $Score".
@digitalunity
@digitalunity Жыл бұрын
I've been following tutorial after tutorial and making code change after code change for my own attempt at a game with this mechanic and it just keeps throwing the same error at me. E 0:00:03:0089 get_shape_transform: FATAL: Index p_index = 0 is out of bounds (shapes.size() = 0). servers/physics_2d/godot_collision_object_2d.h:121 @ get_shape_transform() What does this MEAN?!
@vinivinivini3150
@vinivinivini3150 11 ай бұрын
Someone know how to deal with this error: invalid set index 'global_position' (on base: 'Area2D (Enemy)') with value of type 'Vector2' ?? Im trying to do the part of enemy spawn and that error came to me, can someone help me? my code: extends Node2D @export var enemy_scenes: Array[PackedScene] = [] @onready var player_spawn_pos = $PlayerSpawnPos @onready var laser_container = $LaserContainer @onready var timer = $EnemySpawnTimer @onready var enemy_container = $EnemyContainer var player = null func _ready(): player = get_tree().get_first_node_in_group("player") assert(player!=null) player.global_position = player_spawn_pos.global_position player.laser_shot.connect(_on_player_laser_shot) func _process(_delta): if Input.is_action_just_pressed("quit"): get_tree().quit() elif Input.is_action_just_pressed("reset"): get_tree().reload_current_scene() func _on_player_laser_shot(laser_scene, location): var laser = laser_scene.instantiate() laser.global_position = location laser_container.add_child(laser) ##Cria uma nova instancia e da a posição dela aleatoriamente func _on_enemy_spawn_timer_timeout(): var e = enemy_scenes.pick_random().instance() var spawn_position = Vector2(randi() % 540, randi() % 960) e.gloabal_position = spawn_position enemy_container.add_child(e)
@jose946470
@jose946470 4 ай бұрын
Were you able to figure it out?
They Dared Me To Make A Game...
12:08
Daniel Krafft
Рет қаралды 1,1 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 573 М.
Girl, dig gently, or it will leak out soon.#funny #cute #comedy
00:17
Funny daughter's daily life
Рет қаралды 10 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 12 МЛН
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 79 МЛН
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,4 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,1 МЛН
Results After Releasing my First Game on Steam
15:07
Pontypants
Рет қаралды 2,1 МЛН
How to quickly setup a Basic 3D Project in Godot 4
8:20
Gears For Games
Рет қаралды 305
I Made Minecraft in Godot
28:36
RachelfTech
Рет қаралды 37 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,8 МЛН
Training AI Bots to Fight (they started dancing)
15:06
cozmouz
Рет қаралды 271 М.
How You Can Easily Make Your Code Simpler in Godot 4
6:59
Bitlytic
Рет қаралды 423 М.
What size should your assets be? | HD 2D GAME ART
12:10
Nonsensical 2D
Рет қаралды 126 М.
Girl, dig gently, or it will leak out soon.#funny #cute #comedy
00:17
Funny daughter's daily life
Рет қаралды 10 МЛН