Create a Parallax Background with Parallax Layers - Godot 4 Tutorial - Pt 8 - 2D Platform Game

preview_player
Показать описание
Part 8 - This tutorial will teach you how to create a parallax background for your game level. The parallax background will have two separate parallax layers: a background and a foreground sprite 2D, which will move using a different motion scale. This tutorial will help you get started with creating a 2D platform game using the Godot game engine.

Download the following Game Assets (the link has been changed since recording the original video)
Created by @ansimuz

Download the ZIP file and the assets are under the warped-caves folder in location
Legacy Collection\Assets\Packs\warped-Caves

Download the following Game Assets (OLD ASSET LINK)
Created by @ansimuz

Subscribe to my channel for more tutorial updates

My code scripts are at my GitHub account

Would you like to buy me a coffee?

🎬 Video Chapters
0:00 - Introduction
0:24 - Extend the current platform
0:50 - Create the parallax background
1:38 - Create the background parallax layer
3:11 - Create the background parallax layer mirror effect
5:16 - Create the middleground parallax layer
6:10 - Create the middleground parallax layer mirror effect
6:55 - Apply parallax background motion scale
8:15 - Apply rendering environment screen colour
9:04 - Save parallax background as scene

#godot #godot4 #godotengine#indiegame #indiedev #indiegamedev #tutorialyoutube #gamedev #gamedevelopment #gamedevelopmenttutorial #godottutorial #debugging #gdscript #parallax #parallaxeffect
Рекомендации по теме
Комментарии
Автор

Thank you, I struggled a lot with background smaller than the window, it's definitely the best explanation I found so far on Youtube

sbird
Автор

This series is amazing, clearly explained with excellent practical examples!

ScottKeating-bk
Автор

Hey rapid this video was really helpful but i have one problem with this method. As u know in a platformer game we make use of the y axis heavily but with a parallax layer locked on the y axis how can we make use of the platforms and stuff that are higher or lower on the y axis?

leonidaszatchbell
Автор

first of all, thank you for the tutorials! i watched so many tutorial but i think that this tutorials are one of the best. but i have a problem with windows settings(?). i did everything(mostly) same way as you did. most of my settings are default. my window height is 480 and width is 270 and if i don't touch anything, everything works. but when i try to enlarge the window, it's not work very well. for example, background parallax layer is mirror itself later(like twice as what looks like in this video) and when i try to increase window height and width(proportional) i need like 5 more sprite2d or more. how can i fix that? can anyone help me? please...

RedScratch
Автор

First off, thanks so much for your videos! Very easy to follow.
I do have 2 questions/issues that came up, even when following your exact instructions:
1) The backgrounds do not show up at all when I run the scene. It only shows up when I enable 'Follow Viewport > Enabled' on "ParallaxBackground" node.
2) I see that if I go far enough to the right, the background stops loading in.
Could you suggest some places to check or settings to changes? I'm using v4.1.3 stable on a Mac
Thanks so much in advance!

emiroguy
Автор

i follow you step by step but when game run. it can see background. help please

yoskokleng
Автор

Creating a parallax BG is easy. But trying to use it after saving it as a scene wasn't working for me. No worries. I wont forget how to make it. ON to the next video!!

MH-lrue
Автор

Parallax layer is not working properly.
First problem - when adding mirroring it not expand as shown in video
Second problem - is that mirroring causes gap between tiles.
I try various methods but nothing working

yuvrajchauhan
Автор

Hey rapid vectors, I'm coming back to this video as I'm having some issues with my background. Don't get me wrong following your tutorial everything works flawlessly however for purely sidecrolling only, if I create some platforms for the player to go higher or down I can't get the mirroing on the y to work correctly, once I get to a certain point the previous sprite disappears too soon, any suggestions?

Anubisfrak
Автор

why when my player jumps the parallax background also jumps or it moves up

marcdaniellecastro
Автор

Nintendo Switch 2's power have to be just right, if possible on par with PS4 pro. Remember that third party titles are not Nintendo's main market, so they have to build the console specifically for their own games and give it a good price to be accessible for a lot of people, $400 is the max they can sell it.

Dilmi.AOUKLI
Автор

If I offset the ParallaxBackground, it moves the background in relation to the camera. So, in order for it to render properly, I have to leave it at 0, 0. Anyone else?

jackpaice