Monster 0.8 + Tutorial
Nicolay Korslund
korslund at gmail.com
Sat May 10 02:50:34 PDT 2008
janderson Wrote:
> On most of the projects I've used game scripting languages on, design
> would simply run a bat file and instantly the running application/game
> would update with their new script. A message would be displayed in the
> running app, "script blar.m reloaded.".
That's a pretty neat feature. I'm not sure what would happen when a script is
reloaded - as Monster is very object oriented, you would in fact be reloading a
class when you reload a script. So would the changes affect existing live
objects of the class (which could have "interesting" side effects for some
changes), or only affect newly created instances?
I guess that depends on what the scripts are being used for. What kind of
tasks did you script in your projects?
> To save you some time if you plan to do this, here are some pointers:
> 1) Don't try date scanning lots files, this is fast for a couple of
> files but will thrash the disk for lots of files, leading to noticeable
> delays in the app. Instead I recommend writing to an index file with
> the files that have changed. Then monitoring that file for changes; Or
> using some other communication method.
It could be faster (although more complicated) to do this using file system
notification (FindFirstChangeNotification on windows, inotify on linux) and let
the file system notify you when a file changes. But I don't have much
experience with this, maybe you do.
- Nico
More information about the Digitalmars-d-announce
mailing list