Advertisement

Newbie ? : Script Sections

Started by July 14, 2004 02:28 PM
3 comments, last by Wuntvor 20 years, 4 months ago
Hi, I've written my first test app now and was wondering what are the benefit of script sections or how are they best used? It looks like they are to be used like blocks of script code. For instance, I could add 5 blocks of script code from the same number of text files into a single module, and then build them all at once. Sound right? Also, if I add script code and then build a module at the beginning and then later add another section to the module and re-build, do I lose the original code added? Thanks, Tony
Correct, on both questions :)

You can think of the script sections added to the same module as source files being compiled and linked into one program. When the compiler finds an error it will report the script section name and position where the error was found.

You can think of the modules as different programs running on the same virtual machine. They don't share script code, but they do share the same engine configuration. In the future the modules will also be able to make calls between modules.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
So each Compile does delete everything compiled beforehand? Hmm..:( So there is no way to add code to a module after it has been compiled? (Besides adding all scripts again, but I don't like that solution either)
When you call Build() that module is recompiled from the new script sections added. Any other module is left alone. There is currently no way to alter an already compiled module, except by adding all the code again for a new build.

The next version (or the one after that) will allow calling functions from another module. If things goes as I want, you will be able to recompile either of the modules without changing the other as long as the interfaces are kept intact.

I am also playing with the thought of recompiling individual functions in a module. This would work as long as the interface isn't changed. But any implementation of this would be quite far into the future as there are so many other things I want to add first.

May I ask what you have in mind when you want to be able to change a module after it has been compiled? What you tell me may change my priorities ;)

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Well, it isn't all that important to me.. I just wanted to keep it simple and not use any modules, but it actually shouldn't be a problem as the scripts that would be added later don't really have any connections to the earlier ones. So don't worry, I guess this would be the proper way to do it anyway. :)

This topic is closed to new replies.

Advertisement