We’d love to hear from you. Whether you have a question that you’d like us to answer as part of our FAQ,  you’ve identified something that just doesn’t quite look right in one of our tutorials, you have a business opportunity or for any other reason, please use this simple form to contact us.

We’ll do our best to provide a prompt response.

Like it? Pass it on!

Creating the Main Game Scene

Now that we have a working title screen with a main menu, it’s time to start creating our actual game. The vast majority of our game logic is contained in a single scene, GameScene. Let’s create it now, select Scene->New Scene then select the 2D Node option. Next, I renamed the default Node2D to be GameSceneRoot, like so:


Now save the newly created scene as GameScene.tscn. At this point, the New Scene button we created earlier should now work… even if it just leads to an empty blue screen. So let’s do something about that!

Creating Your Level

Let’s start by creating a game level. We are going to compose our level in a couple different node hierarchies. Let’s start with a set of mountains. Create a new Node and rename it Mountains and make sure this node is selected. Now we are going to layer several different sprites to create our level. In the folder assets/graphics/bg, locate farground_mountains.png and drag it into the 2D editor. This will prompt you how you want to create the object and select Sprite:


Next position it in the scene, like so:


Now repeat the process with midground_mountains and foreground_mountains, making sure each time that the Mountains node is selected.


Your game level should now look like this:


One very cool feature of the graphics Robert created is they are seamless and tile-able. This means the right edge and left edge are the same, so we can now duplicate our mountains to expand our level. In the Scene tab, hold Ctrl + Left click each mountain sprite, like so:


Then right click and Duplicate. Now with the 3 new duplicates selected, move them to the right, starting where the first set of mountains end. Our level should now look something like:


Looking good!

Creating a Simple UI<<PreviousTable of ContentsNext>>Creating Parallax Clouds

Like it? Pass it on!
script ends --->