Change round and roundTo to Round and RoundTo or add it to no matter which you type just like CursorX() and MouseX()

Best solution of two worlds
Make round and roundTo work at the same time as Round and RoundTo

By Reborn

Nothing would be lost only something would be given

In all expressions we are told they are case sensitive
And so all expressions start each word with capital character
WindowsBorderLeft for example

Well say hello to round and roundTo
image
Maybe there is a reason why it is as it is but i think round and roundTo should also have 1st character capital

My understanding is most math expressions are lowercase to match their equivalents in the Math JS api.

However, not all “math” expressions are from that API, so it’s not entirely consistent. (Random, for example)

I think consistency is good, but I also don’t know how they change this now without breaking any games using the existing expressions.

1 Like

I say break it and don’t care

This will be awesome opportunity to teach ppl about ctrl+F and replace all
Which works flawlessly a and i abused it a lot

And with that 1 single trick ppl will fix all their events containing “round” in a second

Troll :stuck_out_tongue:

Backwards compatibility needs to be maintained or GDevelop will lose some of it’s user base, and be less attractive to newcomers if they realise a game can compile and run today, but maybe not tomorrow. Engine stability is essential.


Not so awesome if you have dozens and dozens of scenes, and loads of external events.


A better approach would be to phase out or deprecate the inconsistent format, while introducing the new one.

1 Like

Actually i mean it
It should happen to teach ppl about find and replace
But i guess you are right doing it over 20 more scenes would be a little bit too much to ask

But maybe add to find and replace option to do it on all existing scenes?
Or maybe a parser which would convert all round to Round automatically?

I can think of many ways to solve this i just don’t know what would be possible

My MO is to save the project as 1 file, open game.json in a text editor, find & replace in that, save, and then reload the project in GDevelop.

Yeah i yesterday realized i can do that in notepad++ to batch remove all image smoothing
That should be explained somewhere for users who struggles with it so they don’t need to manually click it 1 by 1

I think all we talk about here could be solved if gdevelop had some more or less text editor to find and replace crap in json file instead only in events

Hey people… They can just update it and make the deprecated ones still work, just like you can still use “MouseX()” and “MouseY()” even tho they changed it to “CursorX()” and “CursorY()”

1 Like