User Tag List

Results 1 to 10 of 32

Thread: Message system discussion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,961
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.42%
    Callbacks are in for stateful scripts (ie.; scripts with persistent stack space). For global callbacks these should be declared global procedures by scripts. I can add any procedure to call these on the script side easily, just need to spec the desired arguments and return values and then add them to ZC first.

    There's a slight annoyance with classes though: Script classes cannot inherit from application classes, so for example a scripted npc with an npc property can't do 'this.X = 0', but instead '(this.)npc.X = 0', which is weird. This requires an extra layer of a scripted base class to define these properties and get them from the engine... I *think*. The problem is we are short of people, especially with Saffith leaving. I wouldn't be surprised if npcs have to wait one version... :/ Unlimited screen scripts, map scripts, global scripts, and various callbacks might be enough for an initial release, which isn't so bad I guess.

    One nice thing is the memory usage isn't too bad. Compiling and updating 2048 global scripts -each script uses only a few kb.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.4%
    Quote Originally Posted by Gleeok View Post
    There's a slight annoyance with classes though: Script classes cannot inherit from application classes, so for example a scripted npc with an npc property can't do 'this.X = 0', but instead '(this.)npc.X = 0', which is weird.
    You can use virtual properties to work around that.
    Code:
    fix X
    {
        get const { return npc.X; }
        set { npc.X=value; }
    }
    That also has the advantage that the handle can be made private in the base class, so you can't accidentally point it to another enemy.
    One minor issue what that is that you can't use increment and decrement operators on virtual properties. I think it should be possible to add them, though, if you don't mind messing around with AS's code a bit. They were deliberately removed, and I forget the reason, but I think it had to do with multithreading issues that aren't relevant to ZC.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social