Follow along as we learn how to predict bounces while making a 2D brick breaker style game in Godot 4.
Here I'll show how to make projectile predictions using a CharacterBody2D to get perfect bounce predictions.
How to make trailing lines for the projectiles.
And how to quickly turn it into a simple game at the end.
Projectile prediction in 3D: • Trajectory prediction in Godot 4
The same principles can be used in both 3D and 2D.
I started this video because I learned a better way to predict bounces.
But it turned into a mini-game at some point.
NOTE:
I only noticed the trails were wrong after recording it.
Turns out I miss-clicked and added a point to the line-2d node off-camera before recording it. So I needed to clear the points again to fix it.
If you follow along the video, this should not happen to you.
Assets used:
🌐 Sound effects generated with: https://sfxr.me/
🌐 CC0 licensed music used: https://opengameart.org/content/level...
🌐 CC0 Kenny assets: https://www.kenney.nl/assets
kenny-blocks, kenny-platformer, kenny-ui-expansion
····················································································
Want to support me?
https://ko-fi.com/octodemy
Source code
/ octodemy
····················································································
CHAPTERS:
00:00 Intro
00:19 Drawing lines in 2D
01:31 Basic shot prediction
03:34 Shooting a ball
04:21 Bounces!
06:38 Fixing predictions
07:22 Making trail lines
08:48 Breakable brick
11:23 Projectile and winning
13:07 Finishing touches
13:49 Menus and music
14:25 Final game
#godot4 #godotengine #godot
----personal notes
I messed up the mic sensitivity and only realized it later. Had to adjust the volume in some sections to fix the audio.
Still using the more natural EQ until someone comments on the change.
Смотрите видео 2D trajectory predictions in Godot 4 with a game | with perfect bounces онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Octodemy 29 Март 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,760 раз и оно понравилось 99 людям.