One feature that I think would be useful for new users of the tool, or even people newer to programming would be to disallow adding variable names that are not valid, or to show some type of validation error in the GUI if an invalid variable name is used.
In the inspector, if the variable name is set to 1, if you try running your game, it will fail due to the code that is generated:
// 1
const 1 = this.add.image(640, 288, "dino");
This makes sense why it fails, but this is not immediately apparent to the end user until they dive into the code, or until they are familiar with the GUI.
Steps to reproduce:
Update the variable name for a game object to be 1 in the inspector.
Save your scene changes and then start your game.
Game will not load and browser developer console shows the error.
When you view the code in the IDE, we see the error right away.
Example Screenshots:
Note: I ended up running into this issue when I uploaded image assets that just had numbers for the filename, example: 1.png, 2.png, 3.png, etc., and since the default variable name uses the filename, my variables were invalid right away.
One feature that I think would be useful for new users of the tool, or even people newer to programming would be to disallow adding variable names that are not valid, or to show some type of validation error in the GUI if an invalid variable name is used.
In the inspector, if the variable name is set to
1
, if you try running your game, it will fail due to the code that is generated:This makes sense why it fails, but this is not immediately apparent to the end user until they dive into the code, or until they are familiar with the GUI.
Steps to reproduce:
1
in the inspector.Example Screenshots:
Note: I ended up running into this issue when I uploaded image assets that just had numbers for the filename, example:
1.png
,2.png
,3.png
, etc., and since the default variable name uses the filename, my variables were invalid right away.Basic project as example: bug_example.zip