Element modules

  • Colton-Bates
    27th Jun 2011 Member 0 Permalink
    I was wondering if it would be possible to have the core code compiled in a single executable, then have the property tables in an .ini file, and then compile each element's update_() function in individual DLL files (application extension). Then the engine could read the INI file to see what DLLs to call, as well as density, melting points, etc. This would help because:
    1) It would be easier to compile. You would only have to compile a single dll file and change the .ini and then run the core executable.
    2) It would take less time to compile. If you only have to compile 30-60 lines of code, It will take significantly less time.
    3) It would still have anti-n00b mod protection because you would still have to code the element.
    4) When you code a new element, you just put up the DLL, and that's all people have to download to add that element to their Powder Toy.
    5) It would be extremely easy to adjust the melting/freezing (element transitions) with the INI file.
    Some negatives to this idea are:
    1) It would discourage people to improve the core engine.
    2) If you have to make an adjustment to the engine itself, you would still have to recompile that monster file powder.c.
    3) Lots of coding...
    4) It would lag a lot if it had to re-read the DLL function every time it updated the element, so it would help to read the functions to memory, then execute them.
    5) If you don't have the exact right order/combo of elements, saves will be broken

    I don't need a whole load of people yelling at me. I'm not suggesting it for someone else to do, I'm just asking if it would be at all possible. I'm a horrible coder and my new computer doesn't like any compilers.
    Edited by Colton-Bates, 2011-06-25 22:00:05
  • pilojo
    27th Jun 2011 Member 0 Permalink
    Possible yes. Will it happen no.
  • BlueAmulet
    27th Jun 2011 Member 0 Permalink

    Deleted

    Edited once by BlueAmulet. Last: 11th Apr 2024
  • Colton-Bates
    27th Jun 2011 Member 0 Permalink
    Okay, thanks for your input.

  • jacksonmj
    27th Jun 2011 Developer 0 Permalink
    https://powdertoy.co.uk/Discussions/Thread/View.html?Post=130595
    DLLs are not cross platform.
    Edited by jacksonmj, 2011-06-25 22:41:44
  • Colton-Bates
    27th Jun 2011 Member 0 Permalink
    Well, there goes one idea...
    If I were a decent coder, I'd probably do it for personal gain...
    Edited by Colton-Bates, 2011-06-25 23:03:35