Plugins system

  • Kavukamari
    10th Sep 2010 Member 0 Permalink
    I was imagining something akin to the powder coding that we already have (I haven't looked at it so I don't know it) but like in a separate file

    and there would be handlers for when a particle hits another particle, etc.. i dunno how this stuff works..
  • Xenocide
    10th Sep 2010 Former Staff 0 Permalink
    http://pastebin.com/4tG94w5e

    Just a mock-up of how it could look.

    Info: Author, version (so you can always have the newest), Timestamp (DDMMYY HHMMGMT+/-0000)

    Element:
    Base: the inital array, all *CFDS are implied
    States: the second array, what it freezes, melts, boils and ignites to.
    Weight, the final array, list the elements yours is heavier than and lighter than.

    Extras:
    SPRK: What to do if hit with a spark, if it reacts at all should it conduct, release some things, what can it recieve spark from, what can it pass it to and what should be ignored completely
    NEUT:Does it react with neutrons? if so what does it become?
    C:
    xLoopSize: How far should it check its x axis for particles? (3 is one px either side, must be odd and must return 0 if (xLoopSize-1)%2)
    yLoopSize: same as above but y axis.
    raw: Raw C code for stuff not in the XML file, XML.THIS refers to the element in this file.
    the following is implied:
    if(x+nx>=0 && y+ny>0 &&
    x+nx<XRES && y+ny<YRES && (nx || ny))
    {
    r = pmap[y+ny][x+nx];
    if((r>>8)>=NPART || !r)
    continue;
  • zc00gii
    10th Sep 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • devast8a
    10th Sep 2010 Former Staff 0 Permalink
    zc00gii
    Agreed. Also weight arrays won't work. A single value for weight per element would be better.
  • Xenocide
    10th Sep 2010 Former Staff 0 Permalink
    It was only a mock up and I realised some parts would not be do-able while I was typing it.

    A compiled shared library would have to be have to be platform independent to be truly usable, otherwise we'd end up with mac only parts, *nix only parts and windows only parts unless you are able to provide a compiler
  • Kavukamari
    10th Sep 2010 Member 0 Permalink
    I'll be happy if we can even get a beta of this that mostly works, with extra features to be developed and finished later


    I'm hoping this idea will somehow actually make it into powdertoy :D looks like it's definitely possible..


    (isn't there a way to make a powder out of just variables and if/then's or case statements? (variables for melt temp, melt to, all that junk, and also weight and falling speed, density, etc) and the cases or if thens would be for interactions or what happens under pressure or heat, I know that we could make more complex powders if we use the XML way, but with this method we could have small easy to make text files that do almost as much, maybe we could add this feature as well for the more lay-back members who want to make powders?)
  • deadhitter3
    10th Sep 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Rob215
    10th Sep 2010 Member 0 Permalink
    Or

    Name: _______
    Short Name (the 4 letters): _____
    Category: ______
    Reacting with _____
    How it does:______
    Other action ______
    Pressure: _______
    Colo(u)r: _________
    New Category? Yes or No
    File Location _______
    Powder Version ______
  • Xenocide
    10th Sep 2010 Former Staff 0 Permalink
    deadhitter3:
    ''If you're so good at coding, why wouldn't you code a program for us, with checkboxes, (Easy on this suggestion. Don't bash.) because I know, that everyone wants to mod, but it's so fucking hard, and you're the developers, so don't go like ''DUDE IF U WANT DO EET URZLEF.'', because I already mentioned that part.

    I understand people won't be able to understand a lot of it and it was only a mock-up intended for those who can read and understand it, any final version I would imagine to be completely different.

    I'm not really a developer, I tried doing Hello World in C from memory earlier and failed completely. If I was able to do this I'd certainly do it myself....

    *idea*
  • ZebraineZ
    10th Sep 2010 Member 0 Permalink
    Even if it wouldn't work that simple right off the bat, it's not hard to just do simple coding so that the program and whatnot can do all the complicated hard parts before hand, and those 'simple' stuff could be defined and stuff all behind the scenes by the program.

    If any sort of plugin system or add on system comes into play, I wouldn't be surprised if some generous person made a TPT plugin maker with a GUI, it would be pretty cool, just select whatever you want and write what you want, and it will automatically compile everything into a usable file to put in TPT and voila!