getting_started/first_2d_game/07.finishing-up #16
Replies: 24 comments 28 replies
-
It appears that the node types are now AudioStreamPlayer2D instead of just AudioStreamPlayer. I had to correct that in the code to get the music to play. Very awesome to complete this tutorial. |
Beta Was this translation helpful? Give feedback.
-
how can add touchscreen input to this if i export this game to android? |
Beta Was this translation helpful? Give feedback.
-
I made a small addition that may be suitable for here, which is hiding the player when the app runs and showing them when the game starts. I thought seeing the player on the title screen was odd. Added func new_game():
...
$Player.show()
func _ready():
$Player.hide() |
Beta Was this translation helpful? Give feedback.
-
For the sound effects section mine was missing the Loop checkbox. However based on this forum post I was able to do this by connecting the AudioStreamPlayer's finished() node to main and telling it to start playing the music when the audio finished signal fired like so func _on_music_finished() -> void:
$Music.play() |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
to export the game and show it proudly : |
Beta Was this translation helpful? Give feedback.
-
While pressing the button I get this error: E 0:00:01:0767 event_get_action_status: The InputMap action "start_game" doesn't exist. Did you mean "ui_text_caret_document_start"? screenshot: https://puu.sh/KfJ4y/1c74694461.png |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is something new in 4.3 (I'm completely new to Godot as of this week), but I think I found easier instructions to enable the music looping. Instead of this:
... do this instead: In the Inspector for the Music node, expand the Parameters under AudioStreamPlayer and make sure both the "Looping" and "On" checkboxes are checked. |
Beta Was this translation helpful? Give feedback.
-
I don't know what is the proper protocol here... but can we have a separate page or section or maybe a Discord group where we can discuss various ways we improve and build on the game and how to do new things? For example I added a button with function "boost", so when I press it the speed of my creep will double. But I can't make an "if" condition to increase the speed when score > 30 for example (because I don't know how to setup the if rule to check the score). |
Beta Was this translation helpful? Give feedback.
-
I could not make the "game_start" button to work. (I skipped part of the instructions, because I thought it was related to the controller support). func _process(delta):
if Input.is_action_pressed("start_game"):
new_game() |
Beta Was this translation helpful? Give feedback.
-
My game is not working. |
Beta Was this translation helpful? Give feedback.
-
I'm seeing a lot of little snips and pieces of the finished script we're supposed to write, but where these pieces go is pretty vague, and I'm almost certain not complete. It looks like there is an assumption that once you've got something figured out in one place, you'll automatically know what goes in somewhere else without any instruction. That's not really the case. Does the completed project exist somewhere to compare what I've done to a known good example? Then I can see if something is in the wrong place or if anything is missing. I can go through line by line, and see it's doing everything I told it to do. It just isn't doing everything the example is doing. Without a known good script to compare it to, I can't see the mistake neither I nor the debugger caught. |
Beta Was this translation helpful? Give feedback.
-
After finishing, my player suddenly disappeaed. After this i am convinced, godot is not for me. It would really be helpful, if you shard the complete code. |
Beta Was this translation helpful? Give feedback.
-
Before exporting (process is explained in other comments, documentation or this youtube video: https://www.youtube.com/watch?v=31W2ti676RE ) you should assign a main node. To do so, Go to "Project Parameters -> General -> Application -> Run" and select Main as you main node. This will solve the problem with running your executable. |
Beta Was this translation helpful? Give feedback.
-
The art, music, sounds, etc. are all really cool for a noob like me. How would I go about creating art and sounds for games I make? What would you suggest? How did the creators of this tutorial make them? How would you suggest I learn how to make good art/music? |
Beta Was this translation helpful? Give feedback.
-
So, just to make sure I understood the shortcut part correctly, by setting the shortcut property on the StartButton of the HUD to start_game, and mapping start_game to Keyboard Spacebar or Controller button A, hitting the shortcut acts like a |
Beta Was this translation helpful? Give feedback.
-
I hit a very odd issue, after setting the shortcut for the Start button to start_game, I found that the game wouldn't start when pressing the enter key, but worse was that clicking the button with the mouse only partially started the game. The Start button would disappear, but the enemy never displayed and the music didn't play. I quit & restarted the game, it consistently froze after hiding the Start button. I decided to debug this by adding a breakpoint to the new_game function, but, when debugging the game worked! I then quit + restarted the game and then it would play by using the mouse by clicking on the Start button every time. In desperation I reverted my code using GitHub, repeated the process and got exactly the same weird quirk, I had to debug to unblock the start_game function! As of now, the game consistently runs. I still however don't have the shortcut setup for the ketboard, even though I followed the instructions. I'm using GoDot 4.3 on a MacBook Air (Apple M2). I'll try discord to ask for tips and will reply here if I get an answer. |
Beta Was this translation helpful? Give feedback.
-
I cannot make the shortcut part work until I change it to InputEventKey and configure it to use Enter |
Beta Was this translation helpful? Give feedback.
-
I finished it. Everything works. I have tried so many times on previous versions to get this going and there was always something that frustrated me and I'd quit. Thank you, whoever made this one. I can't say I understood the math functions at all (I'm an artist, not a programmer). And the relationship between nodes and their inherited properties/methods either. Like it took me forever to figure out how I was able to rotate the sprite (that it inherits that property from Node2D or whatever. I just might be able to make my RPG someday. Freakin love Godot |
Beta Was this translation helpful? Give feedback.
-
Guys I made my first game on Godot based on Dodge the Creeps, I called it "Squids" check it out! |
Beta Was this translation helpful? Give feedback.
-
Setting players/mobs or both collision shapes a bit smaller then the sprite makes for more enjoyable experience where the player gets better satisfaction in near misses and might get less annoyed at deaths by blaming himself being bad then the game. |
Beta Was this translation helpful? Give feedback.
-
Hello, I finished this tutorial and only encountered one problem (which isn't all too bad since it's my first time working with Godot). Everything worked until I put the ColorRect node into the scene tree. When the ColorRect node was visible, my player would be hidden, even though the ColorRect node was underneath all my main components. Other than that, my game functions as it should, but it would be nice to fix the issue with the background and not seeing the player. The mobs still appear, and the the HUD is visble, only the player is invisible (but very much still there and colliding with the mobs) when the ColorRect node enters my project. Great guide though! |
Beta Was this translation helpful? Give feedback.
-
My Github account got 'SUSPENDED' after pushing - "House in a forest loop.ogg" and "gameover.wav" on Github. Today I completed this chapter - "Finishing up" of Godot Docs. PS D:\Dodage the creeps> git push I try to access my github account in browser but it was showing your account got suspended - https://github.com/nitesh098suthar Currently, I'm not able to access my Github account and I want it back as it contains multiple important repositories for me. I tried to contact Github Support but did not get any reply. If anybody know how can I get my Github account back, Please help me. |
Beta Was this translation helpful? Give feedback.
-
Nitesh
1. Raise a support ticket
https://docs.github.com/en/support/contacting-github-support/creating-a-support-ticket
2. GitHub typically sends notifications regarding account issues. Look for any emails from GitHub about suspicious activities or policy violations. (Also check your spam folder)
Kind Regards,
Rob.
|
Beta Was this translation helpful? Give feedback.
-
getting_started/first_2d_game/07.finishing-up
We have now completed all the functionality for our game. Below are some remaining steps to add a bit more "juice" to improve the game experience. Feel free to expand the gameplay with your own ide...
https://docs.godotengine.org/en/latest/getting_started/first_2d_game/07.finishing-up.html
Beta Was this translation helpful? Give feedback.
All reactions