# How To Make a Drag-and-Drop Game

**URL:** <https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028>\
**Category:** Canvas / Gaming\
**Tags:** beginner\
**Created:** [April 29, 2022, 1:39pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028 "2022-04-29T13:39:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![teamlar](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/teamlar/32/132014_2.png) [@teamlar](https://community.thunkable.com/u/teamlar)\
**Post date:** [April 29, 2022, 1:39pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/1 "2022-04-29T13:39:53Z")

</div>

Hello!

As a final project in school, my friends and I are creating an app. I want to make a screen that has a drag-and-drop game in it, but I’m not sure how to do that. Does anyone know how to do this?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 29, 2022, 4:36pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/3 "2022-04-29T16:36:15Z")

</div>

Welcome to Thunkable.

You need to provide enough explanation of what you mean by drag-and-drop and also show your work and describe where you are stuck now.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [April 29, 2022, 5:59pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/4 "2022-04-29T17:59:50Z")

</div>

I agree that we need more info but you might want to look over this issue I submitted because the “drop” part of “drag and drop” is not easy to code right now.

> <https://github.com/thunkable/thunkable-issues/issues/951>
>
> \*\*Is your feature request related to a problem? Please describe.\*\*
> There are ma…ny great uses for detecting a "mouse up" event on a sprite or canvas. For example, board game "pieces" can be dragged to a new position and then snap-to-grid can be coded to force placement of those pieces in certain positions.
> 
> \*\*Describe the solution you'd like\*\*
> An "up" event for mouse clicks/taps in sprites and canvases.
> 
> \*\*Describe alternatives you've considered\*\*
> I have tried many things but I can't find a workaround.
> 
> \*\*Which platform are you asking for?\*\*
> Thunkable X
> 
> \*\*Additional context\*\*

---

<div class="post-metadata">

**Author:** ![teamlar](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/teamlar/32/132014_2.png) [@teamlar](https://community.thunkable.com/u/teamlar)\
**Post date:** [April 30, 2022, 1:09am UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/5 "2022-04-30T01:09:02Z")

</div>

The game we’re creating uses the Canvas component. I want the user to be able to drag the sprites on the Canvas component to the sprites of each bin (compost, trash, and recycling). I also want to make the sprites (the ones that I want to hide, at first as shown in the blocks) to show up randomly on the screen one at a time, after the one before it was dragged to a bin.  
 ![theCode](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/c/6cf7bdfecf37f8b1f8781554acf7e660980bf214.png)  
 ![oneOfTheStages](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1fdfed650e21c3ba635d3522be8c8ff2ac567551.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 30, 2022, 1:17pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/6 "2022-04-30T13:17:53Z")

</div>

Although there is not the obvious `Mouse Up` event but there is a substitute to it which is the `Dropped` event.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46f060e33866225c6630b9079aac800b48ca1aa5.png)

In practice, it does the same thing.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 29, 2022, 1:18pm UTC](https://community.thunkable.com/t/how-to-make-a-drag-and-drop-game/1855028/7 "2022-07-29T13:18:30Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
