Adding new events to be handled by script part without recompilation of c++ source code

Posted by paul424 on Game Development See other posts from Game Development or by paul424
Published on 2012-11-23T12:08:00Z Indexed on 2012/11/23 17:20 UTC
Read the original article Hit count: 335

Filed under:
|

As in title I want to write an Event system with handling methods written in external script language, that is Angelscript. The AS methods would have acess to game's world modifing API ( which has to be regsitered for Angelscript Machine as the game starts) . I have come to this problem : if we use the Angelsript for rapid prototyping of the game's world behavior , we would like to be able to define new Event Types, without recompiling the main binary.

Is that ever possible , don't stick to Angelscript, I think about any possible scripting language.

The main thought is this : If there's some really new Event possible to be constructed , we must monitor some information coming from the binary, for example some variable value changing and the Events are just triggered on some conditions on those changes , wer might be monitoring the Creatures HP, by having a function call on each change, there we could define new Events such as Creature hurt, creature killed, creature healed , creature killed and tormented to pieces ( like geting HP very much below 0 ) .

Are there any other ideas of constructing new Events at the scripting side ?

© Game Development or respective owner

Related posts about scripting

Related posts about events