Jump to content
NQ-Nyzaltar

DevBlog: LUA Scripting and Distributed Processing Units (DPUs)

Recommended Posts

Will you be able to make locations relative and will I be able to make systems communicate across multiple ships

I'm sure you will be able to get the ship's current position and subtract that from the cordinates to make them relative if they don't add a way to do that. Systems communicating accross mulitple ships I'm definitaly hoping for especially since I've heared some talk of autonimouse fighers being a possibility.

Share this post


Link to post
Share on other sites

I've been developing a programming language specifically for "sandboxing", or safely running untrusted code as discussed here. I've actually envisioned applying it to an open world game with programmable entities like this one. It should address the issues of limiting computation, data usage, stack usage, server hacking, etc. It's still in development, but please contact me if interested!

Share this post


Link to post
Share on other sites

I would guess to safely run untrusted code they would need scan the code before it is run to make sure it doesn't try to reference any system objects that have references to the executing environment that sort of thing. If we are going to be able to script some actual AI or drones then we might get some official libraries that have thrust calculations and path finding algorithms already made, those would be able to be implemented in optimized c++ that is called from the Lua script to save on cycle time on the server end.

 

I have a couple of questions:

  1. Data storage: Already been asked and I agree, if we are going to be able to make anything more than a fly-by-wire interface for ships then there will probably be need for some long term persistent data storage. At its most basic this would allow remote sensor probes, surveying mining spots, collecting data for tech research.
  2. Sensors: I don't think it was explicitly mentioned but we would need access to various different types of sensors, eg. gravimetrics, positioning, surveying, friend-or-foe etc. Would those be separate modules you add and then access through a specific interface?
  3. Communication: Autonomous drones would need some communication between each other and back to the base ship to propagate orders, will there be a messaging framework for this that would need to be coded or would work outside the scope of the scripting?
  4. Libraries: Will the code only exist on the unit that has it programmed or will there be an independent repository of code that each player has / can access that will then be deployed for execution? Similarly, will we have some sort of version control? I wouldn't be able to write much without an in-game git before it all became a mess.
  5. Testing: Could we have a sandbox within the sandbox to test code? If you were to write a drone AI it might decide to start attacking everyone and hurt your standing if you got some code wrong.
  6. Collaboration: Will groups of players be able to work on the same codebase to produce something that a single player wouldn't have the time or skill to make themselves?

I know all of this would start adding quite a lot of complexity to something that might not need to be (and maybe it is because I don't know that much about Lua), but the whole idea excites me with the possibility of lots of interesting and rich gameplay ideas. 'Scripter' could be a legitimate in-game profession if scripts and be written, sold and distributed independently of actually having something that runs it. Writing a decent drone AI might be outside the skillset of almost all players, but selling a library to manufacturers or having a scripting division of a corporation adds a whole extra level to the game. The ingame skill is a real skill rather than an eve-like wait-20-hours-and-you-can-do-it skill.

 

If communication is handled within the script then writing a communication protocol for drones would allow hacking to be a legitimate battle tack-tick. Finding a flaw in the protocol, deliberately confusing the sensors, running a DDoS attack on the baseship to block communications, destroy the communication array on the base ship and then the drones can't receive orders (without some mind bogglingly difficult code to resolve a new ship to receive new orders from without specifically having been instructed to do so), firing an EMP and wiping the installed scripts before it reboots, and so much more than I can even think of right now would all become possible.

 

The idea that most intrigues me is the idea of boarding a ship or space station and trying to take control of it. If everything is controlled by a control panel that is just an interface for calling procedures in the installed scripts then who controls say a space station or that sub system is the person standing in front of it. Does that mean that on a public space station there needs to be some locked doors to prevent people that shouldn't have access from entering the control room? Is that locked door controlled with a password? Can I get that password from a traitor or spy? Can I blow a hole in the side of the station to get me into the controlled area? Can I cut through the door? Can I lead a mutant with some other players to take over the station? Is there some subsystem outside the controlled area that I can use with a hole in the physical logic of the station to start gaining access? What if I own it and I've accidentally locked myself out? So many possibilities that would lead to some amazing organic gameplay that a game maker would never be able to design.

 

 

I'm getting too excited by this...

Share this post


Link to post
Share on other sites

I've been developing a programming language specifically for "sandboxing", or safely running untrusted code as discussed here. I've actually envisioned applying it to an open world game with programmable entities like this one. It should address the issues of limiting computation, data usage, stack usage, server hacking, etc. It's still in development, but please contact me if interested!

I have a couple of probable answers based on my knowledge of programming and server architecture:

  1. Data storage: Already been asked and I agree, if we are going to be able to make anything more than a fly-by-wire interface for ships then there will probably be need for some long term persistent data storage. At its most basic this would allow remote sensor probes, surveying mining spots, collecting data for tech research.

    There are several ways I think they will handle this but I think the most probable way is that certain Elements will have stateful variables and certain variables associated with the element. Think a guidance system will have variables for a "Home" or a home system or up to so many saved locations. What I think is less probable is a 'file system'. It doesn't fit with the architecture that has been laid out. As such, the saving and manipulating of large data stores doesn't seem likely.

  2. Sensors: I don't think it was explicitly mentioned but we would need access to various different types of sensors, eg. gravimetrics, positioning, surveying, friend-or-foe etc. Would those be separate modules you add and then access through a specific interface?

    Within the scope of what was laid out in this post, its probable that each type of sensor would be a separate "Element" that needs a plug-in slot to a DPU for processing. Each sensor could be accessed manually into its own GUI based on its internal DPU, but then would have variables and functions accessible by the host DPU it was plugged into to be able to react to events and situations presented by those sensors.

  3. Communication: Autonomous drones would need some communication between each other and back to the base ship to propagate orders, will there be a messaging framework for this that would need to be coded or would work outside the scope of the scripting?

    This would depend on if there is a communications 'Element.' If there is, it makes perfect sense that one of its functions accessible by the host DPU is to send and receive messages for rudimentary parsing. I would say this is likely with drones and such being mentioned as a definite, there would need to be some way of communicating commands and controls to this entity. That being said, the drone will probably receive the message in plain text. This means that your drones ability to weed out friendly communication from enemy communication will be important. You wouldn't want your enemy easily taking control of your ship because they happened to know the right commands to transmit to your drone/ship. This can probably be combated by having a "self.communicatron.receive('friendly', <msg>)" to where you only have the parsing of commands happen on a friendly message and not from just any passerby.

  4. Libraries: Will the code only exist on the unit that has it programmed or will there be an independent repository of code that each player has / can access that will then be deployed for execution? Similarly, will we have some sort of version control? I wouldn't be able to write much without an in-game git before it all became a mess.

    Based on what was said about the Elements, how they function, and how you can market the coded Element, it is very likely that the code is independent to each Element. Granted, nothing is stopping you from developing the code in github/some other repo that you then copy/paste into the game. But I will very much bet that there will not be universal libraries and that each code will only be for the scope of the Element it's tied to. This is because its the coder's lively hood to sell the better nav system, the better weapons system, and if the distros are all on libraries, then anyone can potentially poach the code and have the top of the line fighting system.

  5. Testing: Could we have a sandbox within the sandbox to test code? If you were to write a drone AI it might decide to start attacking everyone and hurt your standing if you got some code wrong.

    Based on the structure of this game, I can almost definitely state that this would not happen. The entire premise is a single uninterrupted server with no sharding/instancing. It will be part of the risk in developing AI code, and that goes for ship design too even outside of coding. Oh boy, I hope we put enough engines on this thing <crash>. Experimentation and development will drive the better codes/ships/buildings/designs. Go to a barren side of the planet, or test on a barren world like Char. Even if you make the next Borg, it'll be part of the fun that it will behave and interact in the environment that everyone is in. Just.. uhm.. be sure to warn everyone if you accidentally create the Borg please.

  6. Collaboration: Will groups of players be able to work on the same codebase to produce something that a single player wouldn't have the time or skill to make themselves?

    I can potentially see guild mates having access to guild systems and being able to modify the code on the fly. While feasible, I would suggest using a repository like Git in order to do more complex things. This is for the very versioning you mentioned before, as well as if a guildy comes on and totally borks your code, you have a distro that has it all saved prior. We would want to limit code injections though, because a guildy who may think they are making something more efficient or work, might do just the opposite. Your safest bet is with your own repo for copy/pasting which also lends to community modification on a guided path.

 

I hope I was able to help you with some of your questions!

Share this post


Link to post
Share on other sites

IIRC lua is quite secure/sandbox which is why it is often used for modding or scripting games. I love Python, but it is horrid in terms of sandbox security.

Share this post


Link to post
Share on other sites

Quick question. If there are boarding parties, shouldn't they go for your ship's data center and give the whole structure a, figuratively speaking, brain death? Cause that gives me some hope we might have plastic explosives in the game. Not strong enough to level a city, but enough to give a super stardestroyer a stroke.


And furthermore, can we extract events happening in a DPU's LUA scripts into a text document in our game's directory, in a way, creating a black box of sorts for when a ship is destroyed to keep a catalogue of what went down during the fight?

Share this post


Link to post
Share on other sites

If you have communication between DPUs then you just send off messages to a recorder elsewhere in the universe, no need to add something to the game that can be achieved within the game

Share this post


Link to post
Share on other sites

This system sounds awesome! I'm a web-programmer and I specialize in Flash, Action Script. I've never used LUA but after reading through this posted by NQ-Nyzaltar, I'm already feeling like I'm up to speed with this scripting language. It reminds me of AS1. There's just a few syntax differences from what I can see. Anyhow, I can't wait to battle my AI verses others AI. Let the drone wars begin.

Share this post


Link to post
Share on other sites

If you have communication between DPUs then you just send off messages to a recorder elsewhere in the universe, no need to add something to the game that can be achieved within the game

DPUs can't act remote, at least, now how you want it to. Having a txt file popping up in your directory is a simple thing to do in LUA, if the devs allow for it.

Share this post


Link to post
Share on other sites

This system sounds awesome! I'm a web-programmer and I specialize in Flash, Action Script. I've never used LUA but after reading through this posted by NQ-Nyzaltar, I'm already feeling like I'm up to speed with this scripting language. It reminds me of AS1. There's just a few syntax differences from what I can see. Anyhow, I can't wait to battle my AI verses others AI. Let the drone wars begin.

I don't know if Nyzaltar IS Jean-Cristopher Baillie, but those DevBlogs are written by JC Baillie on their main webpage off the forusm. So, yet for our Lord and Savior, JC Baillie, deliverer of coding for the masses.

Share this post


Link to post
Share on other sites

I can't belive that anyone has made this question yet

 

Will my constructs AI work when I am offline ?

Will my ship defend itself and my factory work while I am absent ?

Yes, that's the point. But don't expect them to self-correct without another ton of code to compensate for that. The constructs don't vanish when you log out, although, their fuel or power source could go out when you are offline.

Share this post


Link to post
Share on other sites

Wow, so quick !

 

Yes, that's the point. But don't expect them to self-correct without anothet ton of code to compensate for that. The constructs don't vanish when you log out, although, their fuel or power source could go out when you are offline.

 

That is just awesome !

Share this post


Link to post
Share on other sites

I'm just discovering this game project.

This is just... wow. All the concepts about this game are just crazy. It could be the dreaming space sim so many players are waiting for. And this DPU system is the cherry on the cake (possibly the cake under the cherry for me ^^).

Now if I can be a bit sceptical (blame the so many promising independent projects which have been so disappointing in recent years), I'm wondering what kind of alien servers and programming skills will you have to use to keep the game from being a massive buggy lag fest : single-shard universe with thousands of players (if not more), real time combat, procedural universe (with no limit ?), all things voxel editable (I can't imagine the exponential amount of data the last 2 points will cause), custom LUA scripts running everywhere...
I'll really believe it when I'll see it :lol:

Ofc as a lover of space sim and sandbox games, I really wish you'll succeed ! That's for sure the most interesting game project I've ever heard of.
I will follow this project very closely ^_^ Good luck !

Share this post


Link to post
Share on other sites

I'm just discovering this game project.

 

This is just... wow. All the concepts about this game are just crazy. It could be the dreaming space sim so many players are waiting for. And this DPU system is the cherry on the cake (possibly the cake under the cherry for me ^^).

 

Now if I can be a bit sceptical (blame the so many promising independent projects which have been so disappointing in recent years), I'm wondering what kind of alien servers and programming skills will you have to use to keep the game from being a massive buggy lag fest : single-shard universe with thousands of players (if not more), real time combat, procedural universe (with no limit ?), all things voxel editable (I can't imagine the exponential amount of data the last 2 points will cause), custom LUA scripts running everywhere...

I'll really believe it when I'll see it :lol:

 

Ofc as a lover of space sim and sandbox games, I really wish you'll succeed ! That's for sure the most interesting game project I've ever heard of.

I will follow this project very closely ^_^ Good luck !

Check the project's leader and NQ C.E.O. Jean-Christopher Baillie's field of expertise and books he wrote. You'll get an idea. I did.

 

 

 

They came up with a new server tech before they entered the game's full development if I'm not mistaken. This is what they bank on for the game.

 

Remember, stable servers > any gameplay.

Share this post


Link to post
Share on other sites

I must admit he has an... unusual and very interesting profile ^^
Their approach to firstly develop the technology before the game is also very interesting and probably linked to the J-C Baillie's career.

To stay on topic, this DPU system would be so rewarding. You said emergent gameplay ?... Right on the mark sir ! :)
One of the most important parts will obviously be the diversity of triggering events and conditional status we'll be able to detect, compare, and process. Can't wait to see it in action, even if, I guess it's remaining only ideas for the moment and won't be one of the first things they'll develop.

Share this post


Link to post
Share on other sites

I must admit he has an... unusual and very interesting profile ^^

Their approach to firstly develop the technology before the game is also very interesting and probably linked to the J-C Baillie's career.

 

To stay on topic, this DPU system would be so rewarding. You said emergent gameplay ?... Right on the mark sir ! :)

One of the most important parts will obviously be the diversity of triggering events and conditional status we'll be able to detect, compare, and process. Can't wait to see it in action, even if, I guess it's remaining only ideas for the moment and won't be one of the first things they'll develop.

One does not simply transition from robotic engineer to Game Developer and don't carry all the habits of an engineer along with him :P In my opinion, Baillie has done what I've been asking of devs all these years. Work on your servers before working on your gameplay.

Server stability > gameplay, allways.

Share this post


Link to post
Share on other sites

Will there be components that can build?

I would love to see automated shipyards!

Yes, there'll be an element able to build constructs, provided a blueprint and resources

Share this post


Link to post
Share on other sites

Something along the lines of Doom's Snapmap logic chains would work well here, for those of us without .Lua know how, some of the more basic commands and functions, at least you could partially script your stuff without external help then.

Share this post


Link to post
Share on other sites

Something along the lines of Doom's Snapmap logic chains would work well here, for those of us without .Lua know how, some of the more basic commands and functions, at least you could partially script your stuff without external help then.

Yup, that's their idea for an auto-configurator, a way to make scripts up automatically. Of course, Lua is meant for fine-tuning anything you uild.

Share this post


Link to post
Share on other sites

I'm very hopeful that in time, and with a good community, those who had never been able to use LUA and scripts may be taking their first steps into the world of coding and through such the game promotes interactive teaching to people who had only dreamed of being able to write their own scripts. That would be another great stride forward for NQ and DU!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×