PDA

View Full Version : scripting engine



elite_coder
06-27-2004, 12:40 PM
Hi,
After reading how all the scripts are in the resource.dat zip and looking through it all, I was curious at how you made your scripting engine as i've been reading about those recently.

Are the scripts compiled at runtime into "native code" or into a intermediate bytecode that is used in a VM (Virtual Machine)? Or are the scripts just interpreted at runtime?

Are the "script entities" multithreaded?

From what books did you learn to make your scripting language/engine?

Seth
06-28-2004, 01:59 AM
no books, i just hacked it together. It converts the script into a kind of psuedo compiled mode, arranges the vars and procedures into a hashmap and some things for speed.

It uses internal microthreads, it's designed so thousands of active scripts can be run at the same time without speed problems.

elite_coder
06-28-2004, 02:18 AM
Quote[/b] (Seth @ June 27 2004,21:59)]no books, i just hacked it together.  It converts the script into a kind of psuedo compiled mode, arranges the vars and procedures into a hashmap and some things for speed.

It uses internal microthreads, it's designed so thousands of active scripts can be run at the same time without speed problems.
cool... what's an "internal microthread"??

Seth
07-04-2004, 01:12 AM
It's just what I call the internal method of keeping track of many running scripts - internal micro as opposed to a windows thread, which would really be a bad idea to have 1000 of those suckers going.

elite_coder
07-04-2004, 07:42 AM
IC http://www.rtsoft.com/iB_html/non-cgi/emoticons/tounge.gif ...does the Dink source code have some code for a scripting engine in it (im guessing yes, cause i heard it uses "DinkC")? And is it multithreaded (non Windows)?