GDevelop-extensions
GDevelop-extensions copied to clipboard
[Auto PR] New extension: Sway
Description
Randomized sway useful for grass, fire, snakes etc
How to use the extension
Use Sway if you have multiple instances of the same object that you would like to move uniquely like grass swaying in the breeze. It could also be used for flames, smoke, snakes, ghosts etc.
Sway pivots the object and changes its Y scale in a tween that has a random time range. It's the random time range that creates the unique movement for each object.
Checklist
- [X] I've followed all of the best practices.
- [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
Example
Extension file
!update Sway.json.zip
✅ Successfully updated the extension.
Pretty nice stuff! 👍
Here are a few review comments:
- The Is Swaying condition isn't really useful since an object cannot not be swaying. Could it be possible to make the object stop swaying? If so, let's not do it through actions and condition on the behavior itself, but through the enabling and disabling of the behavior (e.g. to check if swaying, you check if the behavior is enabled, and the object only sways while the behavior is active)
- You should get rid of the for each objects in the doStepPreEvents: not only are they generally not needed for those events, but also behavior lifetime functions are not run with full objects lists, only with the object the behavior is on, so they are definitively useless and adding an unnecessary overhead.
- I know that tweens are using milliseconds, but timers are using seconds and those are generally more intuitive for users. Could the properties store the time in seconds instead of milliseconds please?
- Not 100% sure but do you think the easing is really that important for users to chose? Do you think it would be better to just use a good default easing instead? I am afraid that users might be overwhelmed if there are too many details like that, and the easing as far as I can see mostly doesn't change the result a lot, so maybe it doesn't need to be changeable?
-
Angle to the left (degrees) - Use negative number
->Maximum angle to the left (in degrees) - Use a negative number
(ditto for the right angle) -
Randomized sway useful for grass.
->A behavior to make objects (like grass) sway randomly.
- The tags are a bit... overexagerated? Wobble and shake are OK but I think "flower" for example is a bit too far fetched.
- For the description, adding a gif could be nice to really show users that browse the store what effect your extension adds. You can add one by uploading your gif to a website like imgur and using a markdown image tag to embed the URL as an image into the description.
Overall a pretty clean extension though 👍
Hello @thatbubblemaker 👋
A review has started for this extension, but a new option has presented itself in the meantime. We now have a list of unreviewed "Community extensions", and your extension can be added to it, bypassing the review phase.
If you chose to not take a review, you need to keep the following in mind:
- As of now, community extensions are not yet shown to users, but they should be until next update
- Community extensions will never be shown to GDevelop users directly, they will have to check a checkbox for them to be shown
- All community extension have a warning about them being unstable and unreviewed displayed on their store page
- Your extension will be added immediately, no question asked, and without you needing to do any changes to your extension
tl;dr You will not need to do any more work on your extension, but it might not meet the standards of all users, and reach less users.
If you chose to continue on with the review:
- The reviewing process might require of you to make some changes to your extension until it meets our reviewer's standards
- Your extension will reach more users
- You will be delivering a better extension to the community
- It will take a bit more time for your extension to be added to the store
tl;dr You will need to do a bit more work but deliver a high quality contribution that will reach more people
The choice is yours, please tell us how you would like to continue.
Hi @arthuro555 thank you very much for your helpful feedback, I would like to continue improving the extension based on your suggestions and am happy to go through the review process rather than join the community list. I will do the changes to the best of my ability and understanding in the next few days. Thank you for the opportunity.
Here are a few review comments:
* The Is Swaying condition isn't really useful since an object cannot not be swaying. Could it be possible to make the object stop swaying? If so, let's not do it through actions and condition on the behavior itself, but through the enabling and disabling of the behavior (e.g. to check if swaying, you check if the behavior is enabled, and the object only sways while the behavior is active)
I deleted the Is Swaying condition, I think that's it? Just delete it and the standard behavior is activated condition will be enough.
* You should get rid of the for each objects in the doStepPreEvents: not only are they generally not needed for those events, but also behavior lifetime functions are not run with full objects lists, only with the object the behavior is on, so they are definitively useless and adding an unnecessary overhead.
In my first upload I still had the doStepPreEvents function. It was there when I was figuring out how to do things and everything in it was disabled but I forgot to delete it. A short time after uploading the original I uploaded a new version with it deleted. So not sure if this is what you saw.
I'm not sure if I did it correctly but I did an update comment for it. I'll do the same after this post with the new version.
* I know that tweens are using milliseconds, but timers are using seconds and those are generally more intuitive for users. Could the properties store the time in seconds instead of milliseconds please?
All tweens are now in seconds with descriptions, parameter labels and extension options also updated to say seconds.
* Not 100% sure but do you think the easing is really that important for users to chose? Do you think it would be better to just use a good default easing instead? I am afraid that users might be overwhelmed if there are too many details like that, and the easing as far as I can see mostly doesn't change the result a lot, so maybe it doesn't need to be changeable?
Yep, not really a lot of difference with easings and some of them just work badly with it. Removed the easings options throughout and also in extension options description.
* `Angle to the left (degrees) - Use negative number` -> `Maximum angle to the left (in degrees) - Use a negative number` (ditto for the right angle)
Changed wording.
* `Randomized sway useful for grass.` -> `A behavior to make objects (like grass) sway randomly.`
Changed wording.
* The tags are a bit... overexagerated? Wobble and shake are OK but I think "flower" for example is a bit too far fetched.
Haha, looking at them with fresh eyes, yes what was I thinking? Removed quite a few tags.
* For the description, adding a gif could be nice to really show users that browse the store what effect your extension adds. You can add one by uploading your gif to a website like [imgur](https://imgur.com/upload) and using a [markdown image tag](https://webapps.stackexchange.com/a/29631) to embed the URL as an image into the description.
I did it but don't know if I did it correctly.
Thank you again for your comments, they were very helpful.
PS, I don't know what the error mentioned below is as it doesn't give any details. Should I start a new extension in Issues to find the error?
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extensions - please fix it before generating the registry.
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extensions - please fix it before generating the registry.
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extensions - please fix it before generating the registry.
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extensions - please fix it before generating the registry.
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extensions - please fix it before generating the registry.
The error is because there is already an extension Sway @arthuro555 but:
- it's surely because of the recent changes with the community folder
- the error message is not properly formatted, we're missing the first line.
I'll take a look at fixing this unless you can do it first ;)
The extension looks good to me code-wise now, but when I put the updated version in your example game it doesn't work anymore...?
The extension looks good to me code-wise now, but when I put the updated version in your example game it doesn't work anymore...?
This can happen if any function parameters have changed; even just changing the order breaks existing events.
I know, I checked that immediately, but the values of the parameters seem fine
I just tested this too. If I use the updated version in a new project it works. But if I delete the old version from an existing project and replace it with the newer one, it doesn't work.
Did the extension get renamed? That will also break existing events. Try deleting one of the broken events and recreating it.
I simplified my testing explanation too much. My updated version test wasn't with a project that had events. I did this: start new project, one sprite, no events, install old extension version delete extension, install new version
I don't think I renamed anything but I did have problems with the naming of the zipped folder. Originally I think it automatically named it to sway.json.zip when I first made the extension. But for this update it just called it sway.zip. So after I kept getting git errors, I manually renamed it to sway.json.zip but still got errors anyway.
The extension works fine, but as you changed the tween transition from millisecond to second, and that you didn't changed the value in object's behaviors, there is still 5000 seconds, so that why can't see the changes in-game. The delay is too long.
I fixed the delay on behaviors. So here the example with the latest extension version and the sprite moving correctly: SwayExample.zip
I have reread all the comments, and so I remove the for each
loop which is useless.
The category should be "Visual effect".
Thank you everybody for your work and thoughts on this.
Thank you @Bouh for fixing my mistakes.
I haven't looked into how to do updates once something is committed, will check in a few hours. I mention 'for each' in the description with a warning it could be resource heavy so this has to be removed. Also, don't think I have the imgur link correctly formatted. I'll check in a few hours.
Here's the part that needs updating with the part to be removed in strikethrough.
Please note:
This behavior uses For each object events so be aware of slow downs that may occur from many instances of Sway objects.
The behavior works best if both the Center and Origin points are at the base of the object.
Hmmm, I don't know how this works so will put the above comment in the other place, don't think anyone will ever see these comments anymore haha. Idk, will wait a bit and comment in the other place a bit later.
~This behavior uses For each object events so be aware of slow downs that may occur from many instances of Sway objects.~ The behavior works best if both the Center and Origin points are at the base of the object.
Fixed in https://github.com/GDevelopApp/GDevelop-extensions/pull/623
The category should be "Visual effect".
Fixed in https://github.com/GDevelopApp/GDevelop-extensions/pull/623
@Bubble-one If you want to submit the example you made, I think it will help beginners to undestand how they can use this extension.
- https://gd.games/bubble/swayexamples
Do you mean to submit it to gdgames? The Be on the Homepage form? I've never felt confident enough to submit anything. Is that what you meant?
And I don't know what was ever supposed to happen in the other Sway section: https://github.com/GDevelopApp/GDevelop-extensions/pull/623
I wrote the suggested changes for the description but it didn't get updated.
Do you mean to submit it to gdgames? The Be on the Homepage form? I've never felt confident enough to submit anything. Is that what you meant?
I meant as an open-source example in this repository:
- https://github.com/GDevelopApp/GDevelop-examples
This way, a link to the example can be added to the extension description and users can open it directly with the web-app.
I wrote the suggested changes for the description but it didn't get updated.
I'll take a look.
I understand now, thank you. I made some visual changes to the example and will do the submission (my) tomorrow.