Parallax Scrolling in under 3 minutes! Godot 3.2 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This post appears to be a direct link to a video.

As a reminder, please note that posting footage of a game in a standalone thread to request feedback or show off your work is against the rules of /r/gamedev. That content would be more appropriate as a comment in the next Screenshot Saturday (or a more fitting weekly thread), where you'll have the opportunity to share 2-way feedback with others.

/r/gamedev puts an emphasis on knowledge sharing. If you want to make a standalone post about your game, make sure it's informative and geared specifically towards other developers.

Please check out the following resources for more information:

Weekly Threads 101: Making Good Use of /r/gamedev

Posting about your projects on /r/gamedev (Guide)

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

👍︎︎ 1 👤︎︎ u/AutoModerator 📅︎︎ Apr 03 2021 🗫︎ replies
Captions
in this tutorial i'm going to show you how to implement a parallax scrolling effect in godot engine make sure to download and open the project i've provided in the description of this video the scene consists of a tile map and a player object feel free to start the game and walk around create a parallax background note and add it as a first child to the scene this note is basically a container for pearlex layer nodes within the parallax folder i've prepared five different backgrounds we can use as a parallax background effect add a parallax layer node to the parallax background and also attach a sprite node as a child then duplicate the parallax layer node 3 times there should be now a total of four sprite notes in your scene tree one by one we are now dragging the textures from the parallax folder into the texture attribute of each of the sprites when starting the game you will see a background however the background doesn't repeat and there is no real parallaxing in place yet in order to make the background repeat we need to head back to the parallax layer and set the mirroring attribute on it we set the x value to 1440 on all parallax layers we have we're now starting the game the background should repeat correctly we are now heading back to our parallax layer and modifying the scale attribute which controls the intensity of the parallax crawling a higher value than one basically means that the object is in front of you and a lower value means it is further away i'm going to pick a value of 0.1 for parallax layer 3 and the value of 0.2 for parallax layer 4. however feel free to pick your own values also make sure to set the motion scale of parallax layer 2 to 0 as we don't want the clouds to move with us to make things visually more interesting we are now adding a second parallax background and adding it as a last child to the scene tree assign the last parallax image as a sprite texture on the parallax layer itself we are now setting the mirroring attribute and setting it to 1440. however this time we're going to set the scale value to something larger than 1 because the object is in front of us rather than behind by default the layer of the parallax background is -100 but since this layer is supposed to be in front of us we need to change it this tutorial is almost finished but i have one more thing i want to do with you do you see these clouds let's make them move attach a new script to the parallax layer 2 and call it cloudlayer.gd specify an export variable of type float with the name cloudspeed and assign the value -15 to it now implement the process function by incrementing the x value of the motion offset by the product of the cloud speed and the frame delta starting the game now should show moving clouds in the background thank you so much for watching make sure to join my discord and also subscribe to this youtube channel see you next time
Info
Channel: bitbrain
Views: 14,386
Rating: undefined out of 5
Keywords:
Id: f8z4x6R7OSM
Channel Id: undefined
Length: 3min 0sec (180 seconds)
Published: Mon Mar 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.