Scripting design.

Share your server scripts with the community! ( After those lazy developer bums implement scripting support )
Post Reply
User avatar
nemerle
Posts: 398
Joined: Thu Jan 10, 2013 3:40 pm

Scripting design.

Post by nemerle » Wed Mar 06, 2013 1:00 pm

Since I've been working on designing proper scripting support, I've put some of my current thoughts here:
http://redmine.nemerle.eu/projects/segs ... ntegration

Some questions You might have regarding the whole scripting thing.
  1. What will be scriptable ?
    In the best possible world: everything ;)
    For now, the goal is to move all event processing to scripting language. Incoming commands and responses to them should be implemented in scripting language, all queries requiring fast processing ( distance, visibility, statistics etc. ) will be implemented c++-side.
  2. Why have You dropped multiple-language support that was planned ?
    Not enough brains for my army of zombie-robot-code-monkeys.
  3. Why ruby ?
    I like foxes, and chunky bacon
Needs moar questions !
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

User avatar
Sergio526
Posts: 6
Joined: Fri Mar 22, 2013 2:39 pm

Re: Scripting design.

Post by Sergio526 » Mon Mar 25, 2013 4:52 pm

And just to be clear, everything in every zone that moves, essentially, needs to have a script to govern those assets on the server side? So citizens and how that react to cars and heroes. Cars and how they follow traffic patterns, how they react (or not) to traffic lights, signs, citizens, and heroes. The traffic lights themselves. Mobs, how they spawn, how quickly they respawn, concentration of minions and lieutenants, agro radius based on level, distance between agro-ed enemy and hero that the enemy gives up. Plus a million other things I haven't thought of. Do all of these things, for each and every occurrence have to be uniquely scripted or are any/all of these things prewritten within the client code either at a full map level or at least in little class pockets, like (sudocode) [area(01), pos(x129,y317), clockwork_grouping_09, respawn(240)]. In my overly simplified and optimistic example I'm trying to create a preconfigured grouping of clockworks at a specific possition that respawn after 4 minutes.

So my roundabout question is, do these groupings already exist at the client level? If so, is it for each and every occurrence throughout the map, or is it already set at the client level for the map and the client just has to check with the server to synchronize with other players? Or, more likely, does all of this need to be written from scratch?
I can do anything, the impossible just takes longer!

User avatar
nemerle
Posts: 398
Joined: Thu Jan 10, 2013 3:40 pm

Re: Scripting design.

Post by nemerle » Mon Mar 25, 2013 5:36 pm

Sergio526 wrote:And just to be clear, everything in every zone that moves, essentially, needs to have a script to govern those assets on the server side?
Yes.
Sergio526 wrote:So citizens and how that react to cars and heroes. Cars and how they follow traffic patterns, how they react (or not) to traffic lights, signs, citizens, and heroes. The traffic lights themselves. Mobs, how they spawn, how quickly they respawn, concentration of minions and lieutenants, agro radius based on level, distance between agro-ed enemy and hero that the enemy gives up. Plus a million other things I haven't thought of.
Almost all of those will need at least a little bit of scripting on the server, yup. ( at least my current plan is to enable scripting for all of those things )
Sergio526 wrote:Do all of these things, for each and every occurrence have to be uniquely scripted or are any/all of these things prewritten within the client code either at a full map level or at least in little class pockets, like (sudocode)

Code: Select all

[area(01), pos(x129,y317), clockwork_grouping_09, respawn(240)]
. In my overly simplified and optimistic example I'm trying to create a preconfigured grouping of clockworks at a specific possition that respawn after 4 minutes.
That's the interesting thing, we have a language, but we can and will provide additional facilities in that language to help defining things like that, ex.

Code: Select all

def initialize_spawns
  ...
  spawn_clockwork = SpawnGroup.new(Adversaries.get('clockwork'))
  spawn_clockwork.level 10
  spawn_clockwork.respawn 240
  map.add_spawn(Location.new(129,317,0), spawn_clockwork)
  ...
end
So to answer Your question, those are all server side, but I sincerely hope we will be able to reduce the amount of work to minimum by using helper code.

Code: Select all

  map.add_spawn Spawns.spawn_from_template('clockwork',10,240)
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

User avatar
Sergio526
Posts: 6
Joined: Fri Mar 22, 2013 2:39 pm

Re: Scripting design.

Post by Sergio526 » Mon Mar 25, 2013 6:33 pm

Blathering blatherskite, that's going to take some time. I'm going to have to double my efforts on learning this stuff! I hope to be contributing to the efforts some time soon!
I can do anything, the impossible just takes longer!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest