Author Topic: A Collaborative Server - PW Project  (Read 3815 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
A Collaborative Server - PW Project
« on: March 21, 2016, 12:16:31 pm »


               

I am beginning a server / PW Project, aimed at collaborative and modular development in mind.


Eg: Deploy your scripts and content via svn and the content gets packaged up into hak packs which become server side content thanks to nwnx_haks.


 


I've got this wild idea of making a PW Server that is modular and expansive enough, that other PW Authors could potentially commit their content and have their own world hosted in parallel within the same server. 


The project is in its infancy, but I've got the build and deployment system all up and running.


Uses SVN and Jenkins to build content into a module and haks.


 


The idea behind this is to potentially create a framework that allows PW Server authors to have their own script engines in place which can coexist with other authors systems, perhaps even compliment them, integrate with them allowing the world to grow organically.


 


If anyone is interested in this project, let me know.


 


 


 


 



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #1 on: March 26, 2016, 01:22:40 am »


               

This sounds good, but how could worlds designed with different balance methods and power levels in mind coexist on a single server without breaking gameplay completely?



               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #2 on: March 27, 2016, 04:05:47 pm »


               

The idea isn't so much around taking existing game-worlds and merging them into a single server, its more about designing the new PW with NSS API that all collaborators can use, and integrate into.


When I say about PW Authors submitting their own content, it was more along the idea that they create their own areas, creatures, items etc 


But the underlying scripting of the world uses include files that each collaborator has access to and can integrate with their own content.


 


Eg: I am currently working on a Ability/Subrace system - which is based loosely on the concept of Genetics. Each player has a genome, which is a collection of one or more genes, and each gene controls / governs passive or active abilities that the player can be granted.


(If you think about it, thats how a subrace would work realistically - Elves get Night Vision, because they inherited that gene, Half-Elves, may also inherit it also, but there is a chance they may not.) 


 


This being the case, People in this project could then use the scripting / includes I am using, to script a placeable that will only activate for people with a certain gene.


Another system could be the dynamic loot system - all authors could contribute to and arrive at a consensus on how to balance dynamic loot.


 


Because the world I am designing is being built, then stored as its loose files in an svn repository, it gets built, compiled and then packaged into a module, then deployed to the server.


This idea means that there is always traceability of what goes into the server, when and who by. It also means that by using nwnx_haks we can have as many server side hak's as we need, in order to keep frameworks packaged like jar/dll libraries.


 


Its all theoretical at the moment, 


For the time being I am just expanding my genetics system, and using my linux server as a test box.


But if anyone is interested in collaboration - let me know.


               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #3 on: March 27, 2016, 06:18:07 pm »


               

He's offering exactly more or less what Niv has already made with SILM.



               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #4 on: March 27, 2016, 08:00:12 pm »


               

Does SLIM have a website I can have a look at?


               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #5 on: March 27, 2016, 11:26:29 pm »


               

silm.pw


 


It's S I L M for SILver Marshes I believe. Not S L I M  for a dieting site '<img'>


               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #6 on: March 29, 2016, 09:01:12 am »


               

Looks interesting, It looks like they initially restrict nss updates.


Would be nice if there was a way of moderating script uploads / builds via some sort of framework.


I get that script uploads/additions are risky, since it basically gives god access to everything.


               
               

               
            

Legacy_niv

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #7 on: March 29, 2016, 12:52:36 pm »


               


Looks interesting, It looks like they initially restrict nss updates.


Would be nice if there was a way of moderating script uploads / builds via some sort of framework.


I get that script uploads/additions are risky, since it basically gives god access to everything.




 


I wouldn't neccessarily call it "risky", more like "asinine". There are consequences on handing out access to untrusted upload of executable you might not have scoped out the full depth of:


 


- accidental abuse. nwscript does not have any limits in place w.r.t. resource usage and runtime (apart from TMI, which is worthless for scripts from multiple authors), and since all scripting runs in the main thread, it all counts against a lag-free experience, which is the spacing and aggregated timing of your scripts before it starts to affect the game experience. You need to keep track of that and put very hard limits on it. (To preempt you: Adding a threadpool into the mix will not help matters). There is also the issue with how both the action queue concept and the script scheduler works, it is not designed to be compartmentalised; scripts are not idempotent in most cases. You cannot split nwscript up into robust plug and play components.


 


- social abuse (it will happen, trust me), for example someone uploading a script to clear our all player's inventories and rewrite their character files. Unless you have a very solid detect/backup/recovery strategy in place (hint: svn revert isn't it), this will not be something you can deal with.


 


- exploit of your setup: if nwscript has access to certain nwnx plugins, or allows sidechannel attacks, for example on variables used for those, then you might as well just post the ssh key on your forum.


 


The way I was planning to do it is to offer a sandboxed scripting language - I picked js at the time, because everyone knows it. LuaJIT might be another option; whatever floats your boat. Either way, you will have to design a new api specifically tailored to the kind of things players are supposed to do; reusing the existing one will just give you headaches. This all boils down to implementing a new scripting VM that supports the usecases you are looking for.


 


Needless to say, this is a very tiny part of a rather involved project. I've been working on FWN on and off for years now and I'm still nowhere done with what I want it to be. I am planning on offering it as a service too in the near/far future (time permitting), but it will look rather different from the concept work you are lining out.


               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #8 on: March 29, 2016, 10:57:50 pm »


               

It would be interesting if it were possible to sandbox the script engine to specific areas.


 


Eg: You as a script author, can do anything you want to any object, as long as they are in areas that have X identifier.


Eg: Gives administrative control, over areas belonging to an author.


 


But anyway, nice ideas.


Cheers



               
               

               
            

Legacy_niv

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
A Collaborative Server - PW Project
« Reply #9 on: March 29, 2016, 11:13:22 pm »


               


It would be interesting if it were possible to sandbox the script engine to specific areas.


 


Eg: You as a script author, can do anything you want to any object, as long as they are in areas that have X identifier.


Eg: Gives administrative control, over areas belonging to an author.


 


But anyway, nice ideas.


Cheers




 


 


Not without hooking in a great many places; at which point you might as well design a new, clean API that doesn't suffer from the other drawbacks I mentioned.