Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New extension: Grid system #921

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 4, 2023

Description

This extension adds some useful tools to connect, move, and push objects around on a grid.

  • Grid object behavior (handles most of the stuff behind the scenes)
  • Actions to connect objects to each other (making them act as one bigger objects (these are called grobjects))
  • The ability to move multiple objects at once.

How to use the extension

(copied from the extension's description)

  1. Add the Grid object behavior to all objects that can interact with each other.
  2. Set the grid size with the Set grid action.
  3. Connect objects together to make more complex Grobjects (see below)
  4. Flag objects that you want to move with the Flag for moving action.
  5. Use the Calculate movement action to calculate which objects will move.
  6. Use the Can move condition on the objects, and move them accordingly.

Important!
The extension often refers to things called "grobject". These are made of one or more connected objects with the Grid object behavior. Objects in the same grobject will stick to each other when calculating their movement.
It is important that you don't mix the two things together. An object is an object, and a grobject is one or more objects connected (yes. a single object on its own is also a grobject)!

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

GridSystemGameExample.zip

Extension file

GridSystem.zip

@github-actions github-actions bot requested a review from a team as a code owner July 4, 2023 12:04
@github-actions github-actions bot added the ✨ New extension A new extension label Jul 4, 2023
@github-actions github-actions bot mentioned this pull request Jul 4, 2023
3 tasks
@pampogokiraly
Copy link

pampogokiraly commented Jul 4, 2023

Also here is a list of ideas that I didn't implement, but might return to in the future:

  • Object and/or grobject push limit
  • Pulling
  • Friction. grobjects moving when next to a moving grobject (but wouldn't be pushed)
  • Angle to direction expression

@D8H
Copy link
Contributor

D8H commented Jul 4, 2023

Thank you for submitting another extension.

Do you think your extension could be useful for this example?

If so, making an update of this example could be a good way to test the extension.

@pampogokiraly
Copy link

Thank you for submitting another extension.

Do you think your extension could be useful for this example?

If so, making an update of this example could be a good way to test the extension.

While it works, I wouldn't say this is a great example. Most importantly it doesn't show off the object connecting feature, which is kind of why I made the extension in the first place.
Also clearly the project wasn't made with the extension in mind (the player's origin is at its center ??), and also the extension wasn't made with 3d in mind (the behavior only works on sprite objects, though that can be easily changed to any object to make it work with 3d objects as well).

For such a simple game like sokoban, I don't think using this extension is easier (though its easier to understand than the while event stuff in my opinion), but it was never made with simple games in mind.

sokoban.zip

@D8H
Copy link
Contributor

D8H commented Jul 4, 2023

Ok, it makes sense.

@pampogokiraly
Copy link

pampogokiraly commented Jul 5, 2023

Quick update fixing a critical bug with the Connect by numbers action (no idea how I didn't notice it before, but oh well its fixed now), and also added a new basic expression.

GridSystem.zip

@VegeTato VegeTato added the 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. label Jul 7, 2023
@VegeTato
Copy link
Contributor

VegeTato commented Jul 12, 2023

Hello @pampogokiraly Thank you for submitting this great extension ! 💪
It will come very handy for the users.

Quick update fixing a critical bug with the Connect by numbers action (no idea how I didn't notice it before, but oh well its fixed now), and also added a new basic expression.

GridSystem.zip

Can you please update the example and the extension in this PR to the latest version?
For the example, just drop it in the comments.
For the extension, you must use this code !update (your extension file.zip here)

So we can review the latest version of the extension and see it in the example.

@GDevelopApp GDevelopApp deleted a comment from github-actions bot Jul 12, 2023
@GDevelopApp GDevelopApp deleted a comment from github-actions bot Jul 12, 2023
@github-actions
Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'CountdownTimer':

  ⟶ ❌ (🔧) [Dots in sentences]: Field 'sentence' of the function 'StartCountdown' has a dot, but it is forbidden there!


❌ 1 Error found in extensions - please fix it before generating the registry.

1 similar comment
@github-actions
Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'CountdownTimer':

  ⟶ ❌ (🔧) [Dots in sentences]: Field 'sentence' of the function 'StartCountdown' has a dot, but it is forbidden there!


❌ 1 Error found in extensions - please fix it before generating the registry.

@pampogokiraly
Copy link

!update
GridSystem.zip

@github-actions
Copy link
Contributor Author

✅ Successfully updated the extension.

@pampogokiraly
Copy link

GridSystemGameExample.zip

Here is the updated game example as well.
I also added an "interact" property to the behavior (if turned off, objects will not interact with each other when calculating movement).

"fullName": "Grid system",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdyaWQtbGFyZ2UiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNCwySDIwQTIsMiAwIDAsMSAyMiw0VjIwQTIsMiAwIDAsMSAyMCwyMkg0QzIuOTIsMjIgMiwyMS4xIDIsMjBWNEEyLDIgMCAwLDEgNCwyTTQsNFYxMUgxMVY0SDRNNCwyMEgxMVYxM0g0VjIwTTIwLDIwVjEzSDEzVjIwSDIwTTIwLDRIMTNWMTFIMjBWNFoiIC8+PC9zdmc+",
"name": "GridSystem",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension name is not precise enough.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well... I couldn't really think of anything better. I'm open to suggestions though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants