Godot Slot Machine Example

Find games made with Godot like Thy Flesh, Earth's Secrets, Doggo Quest, Mr. Fishbones, Prepper on itch.io, the indie game hosting marketplace.

Do you want to learn to make games, but you don’t know where to start? Do you have little or no programming experience? This guide is for you!

If you are an experienced developer, check out Learn to Make Games with Godot: Developer Edition instead.

You can always join the GDQuest Discord server for a welcoming community of game developer and designer enthusiasts. And if you want to keep up to date with news from GDQuest we encourage you to follow the official Twitter account.

Become a game developer

We collected and reviewed dozens of free online resources to help you learn to make your first video games with the free and open source game engine Godot.

This learning path will take you from 0 to your first complete games, albeit small ones.

The journey of a thousand miles begins with one step.

Lao Tzu

Your first creation may not be your dream project, but you’re going to learn and grow a lot taking your first steps. You’re going to discover a world full of wonders where the further you go, the more creative the process becomes.

It is good to have an end to journey toward; but it is the journey that matters, in the end.

Godot Slot Machine Example

Ursula K. Le Guin

As you are going to see, there are many great tutorials and tools that you can use to learn game creation from your bedroom for free today.

Now is a great time to learn game development.

Why Godot? What is Godot?

Godot is a 2D and 3D game engine with a fully-fledged editor, but it is different from the other big game engines out there. It is Free and Open Source Software, funded by the community, backed by large organizations like Mozilla or Microsoft, and lead by a team of passionate developers shooting for the stars.

With over 1000 contributors at the time of writing, Godot is becoming more and more competitive even compared to the most significant engines in the games industry.

With separate 2D and 3D engines, an innovative design, it is already packed with a large number of features making 2D game creation fun and rewarding. The team is now working hand-in-hand with the Vulkan representatives to provide cutting-edge 3D in version 4.0.

Godot uses the permissive MIT license. This means there’s no limit to what an excellent team of developers can do with it, even for commercial projects.

Can I make my dream game?

Game creation takes time and effort. Game developers are people who continuously learn new tricks and learn to enjoy the creation process.

I cannot tell whether you will be able to create your dream project or not, depending on how crazy it is. Still, you can undoubtedly make games that people will enjoy, even alone. It will just take some time and dedication.

Great things are not done by impulse, but by a series of small things brought together.

Vincent Van Gogh

Getting started with game development

The massive amount of information out there on how to get started makes it hard to choose where to start. But we’re here to help.

Below, you’ll find lists of curated free online resources, in both text and video format, to learn to create your own games from with Godot.

How to get into game development

This section is for you if you know little about game creation and programming. The guide and videos below give some insights into what you should expect:

  1. Making Your First Game: Basics, by Extra Credits, gives great advice on how to make your first game, and general insights on how games are made.
  2. Become a Game Developer: How to Learn to Code is our guide to learn computer programming.


OpenRPG in-game screenshot. An example project - turn-based RPG game made with Godot by the GDQuest community.

Creating your first game with Godot

The best way to learn something new is through a balance of practice and brushing your fundamentals.

Here, we’ve decided to focus on a hands-on approach, which is what we recommend focusing on first: creating actual games. It’s motivating to start that way. But we also included a few resources that go through some theory to help you better understand how game engines and programming work.

  1. Intro to GDScript for Programming Beginners. Learn Godot’s simple programming language for games, GDScript. GDScript is designed specifically for games and for Godot so it is faster to pick up than most programming languages out there.
  2. Make Your First 2D Game with Godot is a free course that runs you through the creation of a 2D platform game from start to finish.
  3. Mobile Game: Circle Jump by KidsCanCode is an end-to-end game development series going through the process of building a one-touch attractive mobile game.
  4. 3D Roll the Ball by BornCG is a playlist that includes a tutorial series to create a small 3D game from scratch.
  5. Make a Match 3 game like Candy Crush using Godot by Mister Taft Creates is a step-by-step series that goes through the creation of a complete match-3 game, like Candy Crush. It is the longest series in this step, requiring some dedication.


A complete beginner-friendly Open Source Project. Beginners should start small, with manageable projects.

Other useful guides to use along with the videos above:

  1. Godot step-by-step. The official guide runs you through key Godot features and includes some tutorials. We wrote a fair part of it in collaboration with KidsCanCode.
  2. The GDScript guide explains GDScript core concepts. Every Godot game developer will, without a doubt, have to search a thing or two about GDScript and this is the number one place to find the answerers.

Become a more independent developer

There soon comes a point at which sticking to step-by-step tutorials isn’t enough to grow anymore. Most of the learning happens when you experiment. For every tutorial you follow, you should spend several hours at least trying to add new mechanics to your last project.

After all, the goal is to get to the point where you can make your own games, right? And no tutorial will do that for you.

To get you one step away from the tutorial zone, the resources below go a little deeper into what game design and development are about.

They won’t turn you into a pro right away of course, but rather give you a taste of what’s to come:

  1. Game Design Tutorial is a playlist - lots of beginner-friendly examples of how to get started on actual (small) game creation, from a designer point of view
  2. Basic Principles of Game Design goes through high-level ideas on how to think about objectives that make a game engaging and fun. How to structure the workflow around these ideas
  3. So, You Wanna Make Games is a series by Riot Games, creators of League of Legends, that introduces you to some key art-related jobs in the game industry.

Going further

Now you got your feet wet with the introductory material above, you want to go further. Here are a few extra resources to explore moving forward.

We’ve selected the following resources to give you a peek into the vast array of skills a game developer needs to hold or at least know about to be successful:

  1. The Book of Shaders is one of the best resources out there to get started with shaders, simple programs to manipulate your game’s art in realtime, in your game. The book explains how shaders work and what you can achieve with them. At the time of writing this book is incomplete, but still invaluable.
  2. Godot’s Introduction to Math for Game Developers will give you some insights into the kind of maths you will use often in your games, starting with vectors. If you’re allergic to mathematics, you should still give it a read! The approach is different from the way you probably learned at school.[Omitted long matching line]

The next part in this series, Learn to Make Games with Godot: Developer Edition, explores advanced resources for more experienced developers who want to go one step further, or perhaps go from being hobbyists to becoming professionals.

Contributing to this document

If you want to contribute to this document please read and follow our Contributing to: Make Games with Godot Guides. Your support is very appreciated. Please help us improve our quality for everyone!

Made by

Răzvan C. Rădulescu

GameDev. enthusiast, passionate about technology, sciences and philosophy. I believe we should freely share our knowledge.

Welcome to this godot drag and drop tutorial. So looking to use godot to drag and drop ui, items, maybe this is just part of your game play. Drag and dropping of sprites and other game assets in your godot projects can be a very useful mechanic to know how to use. Luckily in godot it is very simple and easy to get the basics of a godot drag control going.

For this tutorial we going to make godot object follow the mouse. So you can easily use this for your pc games. However for your mobile and android games you can also very easily use this. Luckily godot does it’s best to seamlessly allow mouse input and mobile touch input to work the same way. However since we will be using lower level events to make our drag and drop work, I will show you how we can make this compatible for pc mouse input and mobile touch input.

Setup godot drag and drop tutorial project

Let’s start off by just creating our project. So open up a new godot window and create a project called godot drag and drop tutorial.

Now we want to setup a few simply things. Such as a sprite, a kinematicbody2d. You could also use a staticbody2d as well if you wanted, doesn’t really matter. If you want physics to be applied to your object after you have dragged it why not experiment a rigidbody2d which will have physics applied to it.

Here is the nodes you want to add to your project to get everything to work.

So here is the steps to follow to get this setup.

Add a node2d to your scene, by right clicking in the Scene tab. Then click on the node2d node and right click and add a KinematicBody2D node. Then under the KinematicBody2D node go add a Sprite and a CollisionShape2D. For our sprite I just used the default godot sprite which comes with every new project. You can assign it by click on the Sprite node and then dragging the image into the texture slot like this.

Next we need to make sure we have a collisionshape2d rectangle setup. So click on the collisionshape2d and on the right hand side click on shape and choose rectangle shape. Like this:

Now just resize your rectangle shape until you have something that looks like this in your scene.

Here comes the important part to make this whole thing work. Without this you will be pulling your hair out so big NB on this step.

Make the object pickable

So for us to be able to pick up events from our sprite like click or touch events we will need to make our object pickable. To make it pickable click on the kinematicbody2d node and check this box on the right hand side.

That is now the setup of the project. Once you are at this point we need to start adding a script to help us manage the dragging state in our project.

Godot drag and drop script

To keep our script really simple we are going to use signals. If you don’t know what godot signals are. Let me briefly explain. Signals use the observer design pattern. Which allows objects within godot to listen for a signal. These signals can be attached to any of your scripts. Other objects in godot have default signals. We will be using our own custom signal and bind it in our script. Don’t worry it will be very simple, also great thing about this is. If you have been struggling to understand signals up until now. Then this example will also help clear that up for you.

So let’s create our script. Right click in the filesystem tab and create a new gd script called drag and drop.

Open up that script and copy and paste this into your script editor.

So for our mobile portion we add a dragsignal. This signal will be called when we have a button left click on and object. All it will do is bind to a function which will flip the dragging flag. If dragging we move our object to the position, if not then we stop moving it. Then for the mobile portion we use event based positioning. So if a touch event happens and its the first index of the count then we will follow that. As you know on mobile you could have multi touch. So for that purpose we have the event.get_index method to help us know which touch we must respect. So to make this all work you just need to make sure you have attached your script to your kinematicbody2d like this.

Also you must attach the input event node signal. By going over to this tab.

Godot Slot Machine Example Template

Then double clicking in input_event and then attaching that event like this.

Then finally clicking on connect. Now test this out and you should have something which works like this.

That’s how simple it can be to setup a drag and drop in godot. You can now expand this by having snapping to grid. You could have a ui drag and drop function which allows you to drop sprites or game objects in a certain area in your ui. Possibilities are endless.

Frequently asked questions

Can you make godot use drag and drop for mobile and pc?

Yes you can with some magic on the input event types and structuring your code you can easily achieve this. Just make sure to handle mobile slightly differently because it can have multiple touch points.

Final words

Godot Engine Examples

That is it for this godot drag and drop tutorial. If you liked it please consider sharing it on social media and subscribing to my youtube channel here:https://www.youtube.com/channel/UC1i4hf14VYxV14h6MsPX0Yw?sub_confirmation=1

If you want to support me and my content please check out my skillshare course here:

Godot Slot Machine Example Crossword Clue

Here are also some other tutorials you might be interested in: