DLL plugin

This forum is currently in read-only mode.
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Construct needs a plugin that can load DLLs and call functions from them. I spent the previous weekend creating a DLL from some code I found on the internet, only to find that Construct didn't have a plugin to use DLLs like MMF does.

    The alternative would be to convert the DLL to a construct extension, but I would need to see some example extensions other than the blank template that is the SDK. The source code for the DirectSound extension would be a plus, as I might be able to remove the dependency on SDL.

  • Try examining Template SDK. Here are some tips:

    -> object basically consists of two classes - EditTime Object (this one you see and access thru layout editor) and RunTime Object - used when game's working

    -> in main.h you define all fields and Action, Condition, Expression methods (called ACEs in SDK), be sure to check #define IDE_FLAGS

    -> actions.cpp, conditions.cpp, expressions.cpp have implementations of these methods

    -> edittime.cpp - there is a place to make init of object when it's pasted on leyout editor. You define here also Properties

    -> to make extension "see" this methods, edit ACE Table.cpp - it's shown how to add ACEs and set its required parameters

    -> drawing.cpp contains methods for drawing object when in layout editor and when in runtime

    -> runtime.cpp - there are some initialization/freeing methods you could use for memory allocation and stuff. Most of work at runtime is done by methods in actions.cpp, conditions.cpp and expressions.cpp

    -> debugging.cpp, serialization.cpp - sorry, didn't learn how to use them, but names tells everything ^^

    Sorry for this kinda messed explanation, still learning C++ x(.

  • Also feel free to ask any questions about the SDK in the plugins forum, or in the codebase forum!

  • Try examining Template SDK. Here are some tips:

    -> object basically consists of two classes - EditTime Object (this one you see and access thru layout editor) and RunTime Object - used when game's working

    -> in main.h you define all fields and Action, Condition, Expression methods (called ACEs in SDK), be sure to check #define IDE_FLAGS

    -> actions.cpp, conditions.cpp, expressions.cpp have implementations of these methods

    -> edittime.cpp - there is a place to make init of object when it's pasted on leyout editor. You define here also Properties

    -> to make extension "see" this methods, edit ACE Table.cpp - it's shown how to add ACEs and set its required parameters

    -> drawing.cpp contains methods for drawing object when in layout editor and when in runtime

    -> runtime.cpp - there are some initialization/freeing methods you could use for memory allocation and stuff. Most of work at runtime is done by methods in actions.cpp, conditions.cpp and expressions.cpp

    -> debugging.cpp, serialization.cpp - sorry, didn't learn how to use them, but names tells everything ^^

    Sorry for this kinda messed explanation, still learning C++ x(.

    I've already figured that stuff out, though I'm still unsure about how serialization is supposed to work (though for my DLL, I don't think I will be needing it). I'm rather new to C++ as well, and I could really use some examples so I can figure out the little things. For instance, I know that MMF extensions had unique identifiers so that the main program could verify that you had the correct extensions required to view the project file, and I figure Construct has something similar, but I haven't found it yet. Examples would help me to figure these things out for myself so I don't have to ask so many questions :p

    ... But all of that is beside the point of this thread. A DLL object would be very useful, regardless of whether I make the DLL into a construct plugin or not. Converting my DLL to a plugin is just something I need to do due to the lack of a DLL object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • For instance, I know that MMF extensions had unique identifiers so that the main program could verify that you had the correct extensions required to view the project file, and I figure Construct has something similar, but I haven't found it yet.

    The plugin SDK has no such identifier; Construct uses the plugin filename as the identifier.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)