Results 1 to 3 of 3

Thread: Creating add-ons for games and NovaShell?

  1. #1
    Lesser Wizard
    Join Date
    Nov 2006

    Default Creating add-ons for games and NovaShell?

    Im getting the impression reading through the tutorials that it will be possible to create additional UI elements and add-ons to "all" games via creating new objects+lua scripting. I'm wondering what is going to be the recommended way of doing that. Will there be a "3rd party extensions" folder? Or will it simply be organic - which seems like it might become chaotic quickly when you have to try to figure out if one extension is clobbering another, etc. etc.

    Also - will it be possible in some way to extend the Novashell UI itself via add-ons?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002


    I too would like to iron out a "preferred method" to share things before release. Currently, the way would be like this:

    Graphics only addon, like a tileset:

    You would make a Map called "Inside Cave Palette" or perhaps "RT Inside Cave Palette" (RT being some abbreviation of your name or company name to avoid map naming conflicts. On the other hand, if this happened, it's not a big deal to rename the map, doesn't break anything)

    Inside, you also put your images with a similar naming scheme: rt_cave_floor.png, rt_cave_walls.jpg. This is very important, as this WILL cause conflicts with other files with the same name.

    And you neatly lay them out and label them in the "RT Inside Cave" map data itself.

    Now, for someone to use it, they would only have to cut and paste that map into their maps directory and the "palette" would show up in the editor.

    Pro: One cut and paste to install, easy to drag and drop art out of it. The map palette can neatly be laid out with text labels, like the system palette is

    Con: Only works for non-scripted things.

    Graphics that also need script support

    This method would be similar to the above example, except you would also need to copy a dir called "RT Inside Cave" into your scripts directory. (scripts, xml based graphics, audio, etc would be placed here)

    Things in the script directory are not as picky about names; you can use a script called "gun.lua" or "gun.png" without worrying about conflicts, as the entity data in your "Palette" has to reference the script with the full path. For example, it would assign "RT Cave Inside/gun.lua", not just gun.lua.

    Pros: Has the advantages of the first method but also allows scripted entities, xml data, sound, animation data etc

    Cons: Requires two directory pastes, one for the map dir, one for the script dir, so a bit more tricky to install.

    Third way - Packaged as a world

    In this method, things are setup the same as above, but packaged into their own world, called, say, RT_Cave_Inside_Palette

    To use this "addon", you only need to add it as a dependency in your worlds .novashell file and everything magically works, plus you can override any script or graphic just by having it exist in YOUR world directory tree, without actually modifying the addon.

    The "Mouse test example" uses this technique to steal all the art and data from the RPG example. (any world(s) can be used as addons, there are no internal limits)

    Pros: Simple and organized, and later, it may be possible to include it as one file, like RT_Cave_Inside_Palette.novashellzip, a compressed version that can me moved around as one file.

    Cons: Internally, the engine mounts each mods filesystem in the order they are added, if you mounted 10 or maybe 20 it's possible this could noticeably slow down your mod, because it has to check to see if files were overridden or not.

    Other kinds of addons like UI, things that need scripts to be autorun from hooks like when a new game is started or saved, not tied to entities

    Well, this is more tricky and currently is more like Torque or something where you have to cut and paste and kind of hand-do it by adding a RunScript("AddonName/run_this_at_start.lua"); in your game_start.lua or something like that.

    But one idea is I could allow a way that your RT Cave Inside Palette map could optionally run its own scripts at startup - and could register its own callbacks or whatever it wants.

    In fact, I could say if a "script" directory exists inside of a map directory, it's automatically mounted, eliminating the need to cut and paste another dir inside of your scripts dir, so only "one paste" could handle everything, and even self run scripts.

    The disadvantage here is, is it overly complicated to have scripts installed in more than one location? It would mount them transparently so you don't notice a difference, but it may still be confusing that they can exist inside of map directories too.

    On the other hand, you could always just cut and paste the maps script dir into your real script dir if you didn't like it, so maybe it's the best way to go, because it makes removing an addon very simple, delete one directory, it's map directory.

    For addons that don't need a palette all of this can apply as well, if an underscore is put before the name, it isn't processed as a map, but could still do the scripting part.

    Wow, that was long. Any ideas? Now is the time to design stuff right.

    PS: It just occured to me maybe you meant addons as-in .dll C++ additions such as brains? I expect those would be placed in map directories and can all be loaded at the start simularly to how maps are. So installing them would still be akin to cut and pasting a map.
    Last edited by Seth; 11-27-2006 at 11:41 PM.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Wizard
    Join Date
    Nov 2006


    It may be worthwhile to look at other extensible games / applications and see what works and what doesn't in that context. I like the idea of having the scripts/tiles etc all in one location. Note that some folks may like the idea of just creating extensions and not really have any corresponding level in which to contain it (i'm still figuring this terminology).

    If the idea is simplicity (which I gather it seems to be) then keeping things enclosed allows developers to just release a single zip that could be placed directly into a folder (without having to unpack it -- not sure if your engine supports that). Somewhat like how apps are packaged in OSX.

    However I also like the idea of just dropping another script into a special location. Enforcing the namespacing idea is a good one - you might even want to reserve certain filenames for yourself for future development.

Similar Threads

  1. what games (other than RTsoft games) do you play?
    By Cleatus in forum RTsoft Tavern
    Replies: 40
    Last Post: 04-30-2013, 11:08 AM
  2. Can one sell games based off of NovaShell?
    By whisperstorm in forum Novashell Game Creation System
    Replies: 2
    Last Post: 12-20-2006, 07:38 AM
  3. other games
    By Zexer in forum RTsoft Tavern
    Replies: 3
    Last Post: 02-17-2005, 08:12 AM
  4. Creating TGA files...
    By Akolade in forum RTsoft Tavern
    Replies: 3
    Last Post: 02-20-2003, 04:31 PM



Posting Permissions

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