BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

[V2] Play, Test and Test and Debug? what are they doing? #87

Closed Nodragem closed 5 years ago

Nodragem commented 5 years ago

Here is my experience:

Here are my question:

If I had to rename these options, I would suggest:

Now, if it is possible I would simplify things so that:

In other words, you could have the options:

The UI to chose the Play Mode could still be compact:

The UI for controlling the Play State would try to gather the pause, record, frame-by-frame, reload and stop buttons into one place: 1) When playing in Preview:

Hope that helps.

julien-moreau commented 5 years ago

Just to be clear (I'm writing the documentation about these buttons but it is not online so I can understand that it's not clear) I'll explain the usage of these buttons and what are my technical limitations

For now, I'm not able to load and unload at runtime custom scripts (like Unity is able to do). So to ensure the editor will not crash, I have to load a new instance of BabylonJS etc. (typically an iFrame).

The "Test" button just creates a new panel and runs the same code as "Test and Debug" but in a iFrame directly in the editor. The button "Test And Debug" just launches the same but in a window. The advantage is that you can type "F12" to open the devtools and debug your custom scripts you wrote in the "Code Editor", "Post-Process Editor" etc. (In Electron, the debug F12 window is opened automatically)

julien-moreau commented 5 years ago

Anyway, I'll not be able to launch a game with custom code in the preview panel. I can at least run in a new panel with an isolated iFrame.

I can change the name of "Test" and name it "Play". And change "Test and Debug" and name it "Play And Debug"

For the "Play" button (on the left), I think I'm going to remove it as I'm not sure it would be useful in any case. Do you confirm ?

Nodragem commented 5 years ago

Yep, I was starting to think the same as I read your explanation: the current play button may not be useful if it show a preview that can't run the scripts...

I know understand what "Test" and "Test and Debug" are doing and I agree they could be rename to "Play" and "Play and Debug". However, just to make sure that the current "Play" is useless, can you explain what is "Play" doing at the moment?

Finally, I notices that when I press the current "Play" button, the red ball is moving, and when I press "Test" the red ball is not moving... I don't think that is normal, right?

julien-moreau commented 5 years ago

I think that the play button (I renamed "Play All Animations") is not necessary useless so I'll keep it. Anyway, if it looks like nobody uses I'll remove it.

That means, when you click "Play", all the animtable objects are played. It should be the same when you click "Play and Debug".

What I purpose:

I think adding a tool to select all the objects you would like to play once the scene is loaded can be a solution.

What do you think ?

Nodragem commented 5 years ago

I am not sure I understand ... so I will just try to tell what I think would make sense for me.

Play and Play and Debug should simply run the game as the game is; without or with the debug tools, within an iframe or a new window. I think we kind of agree on that?

Then the Play All Animations may not be necessary but if it is, it could be moved to the Animation Timeline window, which seems to be a more relevant place.

Maybe more useful than a button "Play All Animations" would be the ability to select multiple objects in the scenegraph (and so, possibily all of them) to be played and/or edited in the Animation Timeline window.

Does that sound like a good solution to you?

julien-moreau commented 5 years ago

For now, I removed the "Play Animations" button and kept "Play" and "Play and Debug" I'm adding the new feature you just explained in my todo list :)

julien-moreau commented 5 years ago

Related to this one: https://github.com/BabylonJS/Editor/issues/115 Closing this issue but still in my todolist