If anyone still goes to Grobb Undercity...

Although we've had a new scripting system using a real scripting language for a year or two now, most of our scripts still use our old ad-hoc scripting... thing. It's pretty terrible all around: scripts are retained as plain strings, copied, re-parsed, and modified in place to resolve variables (well, value-returning functions, there are no real variables) to their values -- textually -- before any logic happens, every single time an event with scripted behavior associated with it occurs. Not to mention that it does a lot of usually-unnecessary processing besides -- some of it even if there is nothing in the script associated with the event. It's basically an anti-programming language, and all the re-parsing, repeated allocations, and handling everything as text makes it about as slow as it possibly could be.

This is particularly bad for some of the later-made raid zones. The original scripting system scales poorly -- longer, more complex scripts take exponentially longer to process. This isn't helped by it not having reliable nesting of conditionals -- meaning complex scripts are also extremely repetitive out of necessity.

All the old scripts should probably be converted to the new language. This could probably be done, but it's not a very interesting project. The old system has a lot of odd constructions, quirks, and one-off functions that would be a pain to have to port over or write around. ("Variables" being pre-determined at the start of the event and therefore not updating in real time is just the tip of the iceberg.)

Instead of doing that, I decided it would be a good excuse for me to learn a bit about bytecode compilers and interpreters. Since the syntax of the old system is quite rigid, it was pretty easy. The upshot is that while the output behavior should be extremely consistent, it should process much faster. Trivial scripts go 10 times faster; one complex, highly-repetitive script (the old bounty quest giver that used to hang the zone for several seconds on hail on one of our old servers) was clocked at around 700 times faster. It might be hard to tell the difference these days, but for raid encounters that are already laggy due to spawning lots of adds and whatnot, any speedup should help.

The caveat is that a lot of stuff had to be re-written by hand. There may be some bugs. So, for now, just one zone is using the bytecode compiler. Grobb Undercity seemed like a fairly safe, low-impact raid zone to start with. If anyone goes there and encounters things not working the way they used to, please post about it or send me a PM. If things go smoothly though, I'll probably start swapping more of my zones over (spires, abyss) before maybe moving on to some of the zones with the most complex scripts (Clockwork in rust, lots of Marza's stuff, etc).
 
Back
Top Bottom