Welcome to all!

Hi to all! I’m Nicola Castellani, a full stack web developer based in Verona, Italy.

I’ve used Unity for almost 8 years in my free time, now I want to develop games using JavaScript, my main dev language, and I’ve found GDevelop!

GDevelop is really cool, I want to collaborate, maybe help with core development too (I’d like to create a dark theme mode, my eyes are crying :smiley: ).

Currently, I’m trying to replicate everything I’ve done with Unity in GDevelop, starting from camera zoom lerp, which is a cool improvement on game appearance.

Take a look here:
https://www.loom.com/share/ab05586439e04b7d9ff3b9382ee1f177

I wish to help and to share ideas, and to learn every day!

1 Like

Welcome on the forum :slight_smile:
Camera zoom looks pretty cool. In GDevelop you can develop your own functions and behaviors and submit on GitHub to be included. It is looks something that would be useful to have in GD.
All contribution is welcome :+1:

1 Like

Ciao :slight_smile:
There’s a dark theme in File/Preferences, though not perfect. I think almost everyone is using it :sweat_smile:
On the Github and the Trello, you’ll find everything you need to contribute to the software, including bugs and feature requests :grin:
Cheers

1 Like

Yeah that’s cool! Do you have any advice on how to develop a custom function? I think camera zoom interpolation could be a great boost

Thanks dude! You saved my eyes <3

1 Like

You can read about it on the wiki how to do event based behaviors, functions, extension and expressions so don’t need to touch the source of GD:
http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/events-based-behaviors
http://wiki.compilgames.net/doku.php/gdevelop5/extensions/create
.
But in case you would like to create extensions using JS, you can read about that here:

1 Like

Thanks, I’ll read this and try to submit so :wink:

Hi dude, I’ve maded my custom behaviour but I can’t use function and/or behaviour properties in my actions:

lerp(GlobalVariable(zoomCamera), 1.5, .1 )

I want to handle the target zoom using the behaviour properties but I can’t access to them, something like:

lerp(GlobalVariable(zoomCamera), Behaviour.ZoomTo, Behaviour.Interpolation)

Do you know hot to handle this? Thanks in advance

I never used Behavior properties so I am not sure but the expression editor saying you can use the expression Object:Behavior::PropertyPropertyName() to get a property value within the behavior.

lerp(GlobalVariable(zoomCamera), Object:Behavior::PropertyZoomTo(), Object:Behavior::PropertyInterpolation())

It is if the name of the behavior properties are ZoomTo and Interpolation
Hope it works. Otherwise I’m not sure.

1 Like

Nop it doesn’t work, I’ll try in other ways but thanks for the tip :wink:

It seems the expression works only with variables?
I created a quick test and the expression did not work when I used it directly but if I was use it to assign the property value to a variable first and then use the variable, it worked.

So you can try something like this maybe:
Do = Object:Behavior::PropertyZoomTo() to scene variable ZoomTo
Do = Object:Behavior::PropertyInterpolation() to scene variable Interpolation
lerp(GlobalVariable(zoomCamera), Variable(ZoomTo), Variable(Interpolation))

Properties should work wherever variables work :slightly_smiling_face:
Use the expression editor (button on the right of a field) to find them - the names are case sensitive :slight_smile:

1 Like

Hi @4ian, nice to meet you, first of all I want to congratulate you for your great job.
Anyway, I can’t use function parameters inside my custom extension actions.

The goal is to create a function to handle a custom target zoom (for example in specific game areas).

I’ve made a custom function called “KeepZoom” which accepts 2 parameters:

  1. targetZoom
  2. zoomInterpolation

but I can’t access to those properties, with variable inspector and Object.Behavior::PropertytargetZoom() too.

here there is the extension:

https://drive.google.com/file/d/1Z04WriMofUhyv2vOzy2fgn2AabMmR6gz/view?usp=sharing

I think a tutorial on how to use action and function parameters is a must, what do you think?

PS: here you can find the project: GitHub - NicolaLC/platformer-gdev: GDevelop test case

I’ll take a more in depth look tonight, thanks for sharing the extension/project :slight_smile:

I suspect though, as it’s working with scene variables, that properties are working well but not necessarily the way you would expect them: remember that contrary to the scene variables, they are specific to each and every instance of the behavior.
They are akin to object variables

Let me know if this was clear for you or not?

I think a tutorial on how to use action and function parameters is a must, what do you think?

Yeah ideally that would be the case. Any help for doing it on the wiki is welcome - I’m mostly spending time on the software so it’s hard to make up time to write tutorials. I do write the help pages though for new features, in this case on this page: http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/events-based-behaviors

There is the section called “Add and use properties in a behavior”. I do agree it’s fairly short - let’s identify what piece is missing and add it :slight_smile:

1 Like

Yes, it is clear to me, but I don’t have any tool to inspect them or just reference them in my functions.

I think having a shortcut to reference these behavior variables could be a great improvement in usability.

There is the section called “Add and use properties in a behavior”. I do agree it’s fairly short - let’s identify what piece is missing and add it :slight_smile:

I think is missing a specific example on how to use Behavior global properties and Function related properties, I think this is a must and I can extend the wiki by my self to help others reaching complex behaviors development.

The best way to handle this is to create a real use-case example, like I’m doing for my AdvancedPlatformCamera behavior, to introduce newbies to the custom Function/Behavior development.

I think this is a great way to extend GDevelop with new cool features!

PS: check out the update on the behavior here:

https://www.loom.com/share/3f0c648a2d024a0190b89be0be9a15e0

Thanks a lot for your time anyway :wink:

Looks really cool! Definitely something that would be a great addition to the list of downloadable behaviors.

Custom behaviors and extensions are super important for the future of GDevelop and the community.

I created a card for adding example/help links to behaviors on the roadmap.

Let me take a look at your behavior properties.

So seems that the distinction is not clear, but you created all your functions as “free functions”, that are not part of the behavior. So you won’t have access to any of the behavior action/condition or expression to set/get the properties :slight_smile:

On this screenshot your functions are on the left:

But should be on the right.

You have to create a custom function by clicking on “Add a new function” in the list on the right:

You can verifying that you’re “inside the behavior” because the first two parameters are grayed out and are called Object and Behavior.

This function is attached to the behavior. You can use the “Object” and its Behavior inside it… including the properties :slight_smile:

You might want to activate the new action/condition editor in the preferences, because it will ask you for the object first when adding a new action/condition. This will help you to see what’s available.

You’ll find the expressions at the end of the list when editing a formula and opening the list of expressions :slight_smile:

1 Like

Dude, what a mess :joy::joy:

I’ll try it out today, I didn’t know about free functions, I was thinking they were behavior-related functions ^^

Dude I’m sorry but I can’t reach function related variables, I’ve removed each behavior parameter because I want to keep a single dynamic function to handle the zoom, but I can’t take the function parameters:

Do you have any idea of why the function props are not displayed?

Thanks in advance.