[SOLVED] Scripts 1.0 Vs 2.0


#1

Hello, i was just curious about 1 thing, Does the performance change from 1.0 and 2.0? Is there a prevision of a 3.0 scripts? I ask this because if performance changes i plan to switch to 2.0 but if a 3.0 is about to come is pointless to convert it now. Thanks.


#2

From having just done the switch from 1.0 to 2.0 for major projects I’ve got the following observations:

  • Scripts 1 very much ties a script to a physical file, whereas Scripts 2.0 does not and allows you to define multiple behaviours in a single file.

That’s allowed me to build this and make it pretty easy to use:

  • Scripts 2 defines all attributes etc without the “magic” that existed for scripts 1. The format and syntax of these are different.

  • Scripts 2 hides the constructor (supplies it itself) so without modifying stuff you don’t get to be called before an item is enabled. (I have a patch for that in the project above because I need it)

  • Scripts 2 doesn’t make you write your scripts inside a closure supplying “app” - instead app is a property of the script this.

  • Scripts 2 naturally can put all of your files into a single script at build so that it loads faster (note above project does this in a different way, same result)

  • Scripts 2 scripts are just another asset in your project, no special case like Scripts 1.

  • Scripts 2 normally can’t be edited locally, only through the editor and they support collaborative editing (no points for guessing I’m not a big fan of this!) I’ve made a work around in said project to allow proper version control and local editing.

On the whole Scripts 2 is a move forwards, especially for me using the above template project meaning I can integrate PC into a professional continuous integration and build process without losing the ability to use the scene editor.

I’ve no idea on Scripts 3 of course!


#3

That’s a pretty good summary of the differences from @whydoidoit.

We don’t currently have any plans for a Scripts 3.0.


#4

Thanks for your explanation @whydoidoit i think your work with es6 and babel is a step above of what i can actually achieve with my level of knowledge, i am aware that my work will greatly benefit from that further step but i am still struggling with FPS performance and code optimization. If i would be able to use the engine as stand alone i would put all the game in my site and have also the advantage of the mysql archives that would lead to a faster multiplayer integration (yes i haven’t give up on make the game multiplayer). Of course with a proper team the project itself would be done very quickly and would result in something good enough to be shown in some exhibition. Since as @dave say there isn’t any plans for 3.0 i will try to bring it up to 2.0. Not sure about the success or benefit that i will get :smiley: Hope someone will join me in the project. Thanks a lot.