Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Newbie ? : Script Sections


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 tcabe   Members   -  Reputation: 122

Like
0Likes
Like

Posted 14 July 2004 - 08:28 AM

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

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3444

Like
0Likes
Like

Posted 14 July 2004 - 08:49 AM

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

#3 Wuntvor   Members   -  Reputation: 170

Like
0Likes
Like

Posted 14 July 2004 - 10:44 AM

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)

#4 Andreas Jonsson   Moderators   -  Reputation: 3444

Like
0Likes
Like

Posted 14 July 2004 - 03:11 PM

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

#5 Wuntvor   Members   -  Reputation: 170

Like
0Likes
Like

Posted 14 July 2004 - 09:07 PM

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. :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS