Detailed information about my game engine programming

    Synchronization - Triggers!



    Posts : 5
    Join date : 2009-02-05

    Synchronization - Triggers!

    Post by Demiurge on Thu Mar 12, 2009 6:08 pm

    Hi Oren,
    during these days I'm also designing a trigger system, and when I came up seeing your blog I've saw your post about triggering... Very Happy
    Anyway, do you plan to use scripting to define the consequences of a trigger? Or do you plan to design a simple hard-coded trigger system?
    I found really interesting thinking about trigger system, because it is a common task but it also very game-dependent.

    What's the focus of your triggering system?

    I've comed up to a very simple and scripted-based design, based on the fact that object can have triggers. This is really interesting because moves the problem of the owner of the knowledge to a more based object level and provide a good power of customization and is data driven. A great problem is to "expose" the methods and variables to be used by the script.
    Still, figuring out a clean design it really depends on your game.

    Is your design object-based?




    Posts : 11
    Join date : 2009-02-01
    Location : Isreal

    Re: Synchronization - Triggers!

    Post by orenk2k on Sun Mar 15, 2009 10:04 am

    my trigger system based on the fact the everything in the game is an entity and every entity can send messages to other entities (the trigger is also an entity)
    the trigger definition isn't scripted, meaning the logic of the trigger is hard coded (you can't define dynamic triggers or code you own in a script), every trigger have its own properties and you set them by a script.
    note that the trigger could also call scripted function/s and trigger more than one entity so its very flexible.
    you can program a system that let you run scripted triggers but that means your game engine need to expose a lot of things, also it means you need to update those scripts which means your code relay on how fast the scripting system you use, i can't see way a game need custom triggers.
    hope this helps.

      Current date/time is Wed Dec 19, 2018 1:27 pm