Jump to content
Sign in to follow this  
Aleš Ulm

Dev Diary #165 - A different kind of scripting

Recommended Posts

Hey there, fellow ylanders.

After we‘ve talked about several Exploration improvements you will find in the next update 1.6, today we focus on something big that Creators will surely like (if you‘re interested in Exploration, don‘t worry, there‘s plenty more cool stuff in 1.6 we‘ve yet to talk about).

We‘ve seen a lot of amazing creations that pushed the limit of what is possible with visual scripting (and many time genuinely surprised us). Games like this make us, the whole platform, move forward, but it also showed more clearly what is not really surprising. Visual scripting is a great tool for learning, for making simple-to-medium complex games, but once the game complexity reaches a certain level, working with the visual script, navigating through it and in general making the code intuitive and easy to work with because really difficult.

That‘s why with 1.6 we‘re bringing you a beta version of non-visual scripting. You will be able to create text scripts, that can be attached to Entities and Game logic object in the editor and when the game runs this script will be executed in a similar way to the visual script.

 

Scripting.png

 

The fact is that internally the visual script has always been a visualization of javascript-like language so now you will get the chance to bypass the visual scripting and type in the code directly. Instead of describing these features in many more paragraphs, we put together a short FAQ that will, hopefully, answer most of your questions. We are looking forward to discussing with you this topic more in the followup discussion.

Q: You said „beta version“ - what does it mean?
A: This feature requires a lot of work based on a lot of feedback that we would like to get from you, the Creators. Therefore it is very likely that 1.7 may bring some changes and you will be required to go through your scripts and update them. Also, as always with a feature of such size, there may be bugs. The more feedback you provide, the better it will get.

Q: What language is it? What syntax can we expect?
A: The syntax and commands (the „generic“ ones, not the ones specific to Ylands) is pretty much javascript (even its file extension is .js). However, it‘s not 100% javascript, since it does not support some features, so you can probably think of it as a javascript subset. You will find more about this in the online documentation.

Q: Is this meant to replace visual scripting?
A: Absolutely not. For us, visual scripting remains the primary way of scripting and we will keep improving it in future. 

Q: Can we use both scripting and visual scripting in one game?
A: Sure!

Q: Will there be some sort of editor, IDE we will be able to use to edit the script?
A: No, not at this time. With so many cool editors out there supporting .js syntax we‘d like to focus on other areas of the scripting/game - at least for the time being.

That‘s it for today - don‘t hesitate to ask about anything that remains unclear and I‘ll talk to you next week. Until then - stay healthy and classy, ylanders!

  • Like 7

Share this post


Link to post
Share on other sites

Whooa, this was promised long time ago. Im very happy team is going to fullfill it ?

You just gave me a reason for me to get back into "normal" programming. Thanks 

So, then we just import the script files? If so, will they get updated each time we make changes? If not, will be a pain to re-import them.

Oooh man, im so exited about this ?

 

Share this post


Link to post
Share on other sites

Will it be possible to import ylands specific tiles as a package so we have them recognized into IDE and have a auto-complete? That helps a lot avoiding mistyping and in consequence no compile errors

Another question: for example, will I be able to use JS array class functions to manupulate an array or i still need to manipulate it with ylands specific Array functions?

Edited by jchob

Share this post


Link to post
Share on other sites

Finally! I have been waiting for this to be in the game for a long time. I do have a few questions about how this will work though.

  • After editing a script, will we have to reload the script into the game like how we load spreadsheets into datasets? Or will they automatically reload once the game has detected that they have been edited?
  • What will the errors look like if you load in a script with syntax errors? Will it tell you what line the syntax error is on or will it just reject the file and say there is a error somewhere in the script?
  • What kind of documentation will be provided? 
  • Will we be able to access and change more things in non-visual scripting compared to visual scripting?
  • Like 1

Share this post


Link to post
Share on other sites

GREAT NEWS ! I really liked visual scripting, but like jchob said, I am glad I could go back to "normal" scripting. This might take me back to scripting rigale actually ? 

Share this post


Link to post
Share on other sites

Hi,

I will not probably answer all of the questions and what I say may change before release of 1.6..

1) Scripts are updated each time you play test/export your game. You may reload your scripts in playtest with /reloadscripts command so you do not need to restart whole play test.

2) With lunch of the feature we do not plan to release a modul to any text scripting editor which would help you with auto-complete. We know it would be beneficial for all of you. We have to think about it what would be the best solution.

3) Ylands scripts vs javascript. We have our own scripting language but our goal is to have it work as much as possible as javascript works so any javascripts tutorials out there will be valid also for us. (our scripts miss many javascripts features but what is there (arrays, strings, Date, math, etc.) should work as it works in javascript)

@jchob do you have any example what you think is different for array scripting?

4) Error handling: you will see line number where is a problem with description of it. However, I feel, that there will be much space to improve this after 1.6

5) Documentation: we are reworking wiki for this. You should see full API since beginning. It will start rather "empty' but we plan to update it regularly with descriptions and more examples.

6) VS vs text scripting feature set: it is almost the same. Do not expect to be able to do much more. Yes, you can create own instructions which can get another functions in the arguments but you will not get access to Ylands features which are not available also in VS.

 

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

@Houp oh no no, not that

the array class was just an example (nothing to do with how it works or the functions they both have). You answered it when you said "arrays, string, date, math" should work

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×