GDevelopApp / GDevelop-examples

Repository of examples and templates for GDevelop - the open-source, no-code game engine
https://gdevelop.io
53 stars 20 forks source link

Improved Object Selection example "Drag cats in and out of box" #226

Closed tristanbob closed 2 years ago

tristanbob commented 2 years ago

Describe the example

Demonstrate how object picking works by using collision conditions. Provides methods to select instances including "any matching", "any not matching", "all matching", and "none matching".

Checklist

Game folder

ObjectPickingExample.zip

Video

https://user-images.githubusercontent.com/8879811/155902666-ee0d78f2-e7e4-4cce-b3b6-ed586042b338.mp4

tristanbob commented 2 years ago

I don't think I made it clear, but I think this example should replace the existing "Object Selection" example.

https://gdevelop-app.com/game-example/object-selection

Bouh commented 2 years ago

I really like the new example but it should not replace the old one because the old one is very simple for a reason: It goes straight to the point, it is very small and gives the basic concepts without more (Extensions, handle of buttons in game, or any secondary things used to make the example game running.)

Your example is much more detailed and advanced, it will be good in addition or even in second scene of the basic example. In an "AdvancedObjectPicking" scene.

Also if we can avoid to rename the current example "object-selection" and just import your scene inside it'll be great I think.

Midhil457 commented 2 years ago

Hi, great example! here is my review:

:)

tristanbob commented 2 years ago

Also if we can avoid to rename the current example "object-selection" and just import your scene inside it'll be great I think.

I agree, we are getting an enormous amount of examples and combining the basic and advanced into one example (using two scenes) is a great idea. I'll do a PR that combines my scene into the existing one.

tristanbob commented 2 years ago
  • The Are All and Are All NOT shouldn't have a quantity

This is intentional! I was confused about how object picking works when writing an "all" or "none" logic, and I was shocked to see that they pick zero instances. I think leaving this as it is will help other discover how to deal with this in their games.

  • Unlock all the objects so that users can easily modify and test out the example.

Yes, I will do that when I submit my PR that adds my example into the existing one.

Bouh commented 2 years ago

If you want a review please ask for it :)

tristanbob commented 2 years ago

If you want a review please ask for it :)

Thanks! I'll see if I can work on this PR on the weekend.

tristanbob commented 2 years ago

@Bouh I merged the existing example with my new one here: https://github.com/GDevelopApp/GDevelop-examples/pull/235

Please review my submission on that PR. Thanks everyone!