As I mentioned in my intro post, I'm working on having a full scripting interface within the game, so players can automate their world. This can either be used for practical purposes like efficient resource gathering, or just cool decoration.
Here's a video of the basic scripting engine in action. I have given the Javascript interpreter access to the ship's thrusters and a basic 21x4 character console for output (computer 3D model took 5 minutes to make - I plan to make it much nicer eventually).
Eventually, I want to have a GUI for writing, organizing, and debugging your code - but for now it's just a hard-coded string in C#. It definitely works though - the video you see shows the Javascript code fully controlling the thruster power and console status text based on the current time (basically toggling every 2 seconds).
Here's a screenshot of the code that's running right now. The "Update()" function is called by the system every frame.
Note that you can have persistent variables over time - so you can even keep track of the world's state how you see fit - say, by organizing all the planets you've scanned for minerals in a sortable database.
That's it for now! Right now I'm working on
No comments:
Post a Comment