Jump to content

Wondering How Spiderweb Games Compile


Recommended Posts

In BoA, at least, the scripts load as you get to each area, so a town script loads when you enter the town, and comparable things happen with the other scripts (the scenario script is loaded when you enter the scenario).

 

I believe that the script is compiled when it is loaded.

Link to post
Share on other sites

Older SW games have the data stored as binary into a .dat file, with some stuff hard-coded iirc. However, the newer games also use an avernumscript-like format for some things.

 

The game then acts like a scripting engine, loading the scripts as it needs to and compiling them to bytecode in real-time. This is how most script languages (Python, PHP, prolly perl, etc) work.

Link to post
Share on other sites

But what about the extra time taken in compiling each each script each time, in games like Geneforge where the script isn't normally expected to change between program executions ? I don't understand why Jeff took the trouble of creating a whole customized compiler (assuming that is difficult to do) unless he wanted players to understand what is actually going on, and create script-cheaters and AI-variations for his games (and that's improbable).

 

I was reading Scripting language and Softcoding. I understand that none of this actually matters to an end user, but I'm curious about why Jeff's doing things this way.

Link to post
Share on other sites

Post-BoA, most stuff is scripted, but a few things are still written into the program itself. Shop inventories for starters. (In Geneforge 5, Special Items and Quests are hard-coded too.)

What is Jeff doing? He may not mind script cheaters at all, I have never seen any evidence that he minds.

Link to post
Share on other sites

But what about the extra time taken in compiling each each script each time, in games like Geneforge where the script isn't normally expected to change between program executions ? I don't understand why Jeff took the trouble of creating a whole customized compiler (assuming that is difficult to do) unless he wanted players to understand what is actually going on, and create script-cheaters and AI-variations for his games (and that's improbable).

 

The advantage of using a custom scripting language is that it can be designed specifically to make it easy to do the kinds of task you want to do for a specific project, rather than wrestling with the complexity of a full general-purpose programming language. It also makes it easy to make small changes to the game during design and testing without having to recompile it every time.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...