Jump to content

Wondering How Spiderweb Games Compile


BMA

Recommended Posts

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 comment
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 comment
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 comment
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...