+ Reply to Thread
Results 1 to 9 of 9

  Click here to go to the first Rift Team post in this thread.   Thread: Technical information

  1. #1
    Shadowlander
    Join Date
    Feb 2011
    Posts
    31

    Default Technical information

    I'm really looking forward to this, I love developing addons! I can't test it myself right now, so there are some questions/suggestions.

    1) How often does client run GC? I ask this because for example in wow it is being ran once per five minutes or so and that means you really have to watch out and create as few tables as possible. I know it is not good practice to create many tables anyway, but with low GC interval you can afford to make some without being yelled at that your addon is consuming 5 MB of memory.

    2) Are you considering using some implementation of OOP for the framework? No big deal if not, lua is so versatile that we can simply write our own, but it would be nice feature.

    Official example: http://lua-users.org/wiki/SimpleLuaClasses
    Very simple, but powerful example: https://github.com/Kryso/Tukui_Confi...ter/Header.lua
    More complex, but even more powerful and more user friendly example: https://github.com/Kryso/kCore/blob/master/Core.lua

    3) Is there any "addon scope table"? In wow you can put to the top of one file
    Code:
    local name, internals = ...; 
    internals.test = 1;
    and in another file (within same addon)
    Code:
    local name, internals = ...;
    print(internals.test);
    and it will print '1'.. this is very useful for saving stuff that you need in multiple files but don't want to expose to other addons.

    4) What about dependencies? For developers it is essential to be able to keep framework and consuming project in separate addons and not to copy paste framework to each project on every change.

    Thats all for now, thanks

  2. #2
    Champion Lorandii's Avatar
    Join Date
    Jun 2011
    Posts
    516

    Default

    Not certain about the rest, but dependencies are easy. For example, LibCallbackHandler-1.0 has LibStub as a dependency.
    Code:
    RunOnStartup = {
        "LibStub\LibStub.lua",
        "CallbackHandler-1.0.lua",
    }
    As you can see, LibStub is in LCBH's directory as a subdirectory. For a dependency that is a completely different addon, it probably is something like "\AddonOne\AddonOne.lua" but I haven't tested to be sure.

  3. #3
    Shadowlander
    Join Date
    Feb 2011
    Posts
    31

    Default

    Thats not what I mean. You would have to include all framework files in RunOnStartup and thats just wrong. Also I'm talking about addon dependencies, imagine following:

    Code:
    MyAwesomeFramework
     |- Locale
         |- Locale.lua
         |- enGB.lua
     |- header.lua
     |- core.lua
     |- MyAwesomeFramework.toc
    
    MyAuraAddon
     |- header.lua
     |- core.lua
     |- MyAuraAddon.toc
    
    MyBarsAddon
     |- header.lua
     |- core.lua
     |- MyBarsAddon.toc
    
    MyBagsAddon
     |- header.lua
     |- core.lua
     |- MyBagsAddon.toc
    
    MyOutfitAddon
     |- header.lua
     |- core.lua
     |- MyOutfitAddon.toc
    Now all of addons use functions defined in MyAwesomeFramework, that would mean that I have to include all 4 lua files from framework in all addons (if /MyAwesomeFramework/ or ../MyAwesomeFramework/ works). Also it would re-load all of MyAwesomeFramework files each time any of consuming addons loads.

    What I would like to see is "DependsUpon = { "MyAwesomeFramework" }" or something that would ensure that MyAwesomeFramework will load prior to any addon with its name in DependsUpon in toc file.

  4. #4
    Soulwalker
    Join Date
    Jun 2011
    Posts
    6

    Default

    From what Zorba said in the irc channel, iirc, it shouldn't currently be a problem with addon dependencies, but he was thinking about making some sort of system for ensuring addon X was loaded and ready before addon Y.

  5.   This is the last Rift Team post in this thread.   #5
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Pushad View Post
    Now all of addons use functions defined in MyAwesomeFramework, that would mean that I have to include all 4 lua files from framework in all addons (if /MyAwesomeFramework/ or ../MyAwesomeFramework/ works). Also it would re-load all of MyAwesomeFramework files each time any of consuming addons loads.

    What I would like to see is "DependsUpon = { "MyAwesomeFramework" }" or something that would ensure that MyAwesomeFramework will load prior to any addon with its name in DependsUpon in toc file.
    Right now that's the best option available for embedded libraries. A better solution will be showing up, as will dependencies. As usual, no ETA promised, but I know it's important.

  6. #6
    Rich Aemry
    Guest

    Default

    Quote Originally Posted by Pushad View Post
    4) What about dependencies? For developers it is essential to be able to keep framework and consuming project in separate addons and not to copy paste framework to each project on every change.
    I'd really love to see a full blown repository too. It would give a large number of advantages.

  7. #7
    Champion Lorandii's Avatar
    Join Date
    Jun 2011
    Posts
    516

    Default

    Quote Originally Posted by Rich Aemry View Post
    I'd really love to see a full blown repository too. It would give a large number of advantages.
    http://rift.curseforge.com is working on making their repository system compatible with Rift addons Stay tuned!

  8. #8
    Rich Aemry
    Guest

    Default

    Quote Originally Posted by Lorandii View Post
    http://rift.curseforge.com is working on making their repository system compatible with Rift addons Stay tuned!
    With self satisfying dependencies, and auto updates? I've done a bit of that in the past, and would love to help out!

  9. #9
    RIFT Fan Site Operator Cairenn's Avatar
    Join Date
    Jun 2011
    Posts
    154

    Default

    Quote Originally Posted by Rich Aemry View Post
    I'd really love to see a full blown repository too. It would give a large number of advantages.
    We've got our SVN up and running already and we're working on getting our Git repository online as well.
    "My friends, love is better than anger. Hope is better than fear. Optimism is better than despair. So let us
    be loving, hopeful and optimistic. And we’ll change the world."
    Cairenn, Co-Founder
    and Administrator, RiftUI

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts