Construct Classic R2 SDK Download

This forum is currently in read-only mode.
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hello!

    I'm looking to dive into the Construct Classic R2 SDK. Is it available for download anywhere?

    Thanks,

    Justin

  • The actual SDK is of version 0.99.3, compatible with R2, and you find it in the "Construct engineering" forum: http://www.scirra.com/forum/plugin-sdk-0993_topic37692.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello Tulamide! Thank you very much for posting the link! Is there any documentation anywhere regarding how to code, compile, and apply custom behaviours (via the behaviours tab in the object properties panel)? I've searched via Google and around the forum but have found very little resources on how to code anything outside of using the events sheet.

    I'm also interested in writing plugins but have found very little regarding documentation. I'm sure it's around somewhere but since the switch to Construct 2, it seems that some resources have become more difficult to find.

    Or alternatively, where can I view the un-compiled Behaviour scripts?

    ps - I'm working with Constructor Classic, not Construct 2

    Thanks in advance!

  • The source for quite a few of the built in behaviors can be found on the Construct Classic SVN. Source for many of the plugins is also up there. In addition, here's a basic plugin tutorial from the old wiki.

    It's recommended that you have a basic working knowledge of C++ to work with the SDK - not that I let that stop me. <img src="smileys/smiley17.gif" border="0" align="middle">

    If you have any specific questions on how things work, go ahead and ask - there should still be a few people around here who can help you out, myself included.

  • Thanks linkman2004! I'm fairly new to C++ but come from a PHP, Javascript, AS3 background so I hope the learning curve won't be too painful.

    Are behaviors written much differently than plugins? Are there any major changes I'd have to make while following that plugin tutorial for making my own behaviors instead?

    I tried to compile the 8 Dir Movement and the Platform behaviors and it would appear that I need either MFC or ATL (which doesn't come with the Free Visual Studio Express). Is this true?

  • The difference is mostly in how they're setup - in "Main.h" there's a line near the top that starts with:

    #define IDE_FLAGS

    Adding the OF_MOVEMENTPLUGIN flag tells the editor that you're plugin is a behavior, as such:

    #define IDE_FLAGS OF_MOVEMENTPLUGIN

    Additional flags can be added by using the bitwise OR operator:

    #define IDE_FLAGS OF_MOVEMENTPLUGIN | OF_NODRAW

    The area near the type has a list of other supported flags, but most aren't relevant for behaviors.

    The pLink pointer points to the object attached to your behavior, and you can access/modify it's attributes by, for example, using:

    pLink->info.x

    This will access the X coordinate of the attached object.

    With a normal plugin, you access its properties in a similar fashion, but instead of pLink you'd use this to refer to the plugin:

    this->info.x

    Those are the basic differences to be aware of - It's been a while since I've done any real SDK work, but the info I've give you should be about right.

    As for the ATL and MFC requirement, that is indeed the case - I believe someone may have made a version of the SDK that excluded those libraries, but I'm not 100% certain on that. If you're a student, you can always sign up for Microsoft Dreamspark to get Visual Studio 2008/2010 Pro for free.

    EDIT: This thread should help you out getting VS Express working with the SDK.

  • Thanks linkman2004! I've started getting my hands dirty and have a few questions I thought I'd post out here.

    Question 1: MFC Link Error

    I followed the steps on that thread about getting the ATL and MFC requirements to work using VS 2008 Express. It's working great and I can compile the template and some of the behaviours. However, for one of the main behaviours I'm trying to disect (8 Dir Movement), I'm receiving the error:

    LINK : fatal error LNK1104: cannot open file 'mfc42.lib'

    Any thoughts on how to get this reference working?

    Question 2: Referencing an external object from inside the behavior code

    I'm attempting to write a series of behaviors for the different enemies I have in my game. For example, for some enemies, I'd like them to attack the player object if the player comes within 100px of them (very simple behavior. The 100px parameter will probably be something the designers sets in the Constructor interface). I'm curious how I can reference the player object from within the behavior C++ code that I've applied on my enemy sprite. There will always be only 1 player object (named "Player"). I'm familiar in the past using AS3 to do something such as "if(object is of class Player){ //then do something}" But I'm not sure where to start.

    This is of course all very easy to script using the event sheet, however I don't want to have to copy this block of event sheet code onto all of my different layout "levels". And if I make a change to the behavior, I'd like to only make that change in 1 place and then it updates onto all the enemies in all of the levels where I have applied this behavior.

    Thank you!

  • Whoops, sorry I missed this - let's see what I can do for ya.

    Unfortunately I'm not sure I can answer your question about the link error - however, If I remember correctly, the 8 direction movement is working off a much older version of the SDK, and I believe some dependencies changed along the way, so that's probably the likely culprit.

    As for question two, I actually needed something similar for my gravitation behavior. What I'd suggest is adding a static CRunObject* to your class declaration in Main.h after the ACE function declarations. In Runtime.cpp you'll have to define it - I have it after the #ifdef RUN_ONLY line.

    Main.h:

    ////////////////////////////////////////////////////
    // Data members
    
    // Use when private variables (OF_PRIVATEVARIABLES) are enabled.
    //vector<ExpStore> privateVars;
    
    // Initialize the vector of object pointers for accessing data across objects
    static CRunObject* playerObject;

    Runtime.cpp:

    //////////////////////////////////////////////////////////////////////////////////
    // Runtime functions
    //////////////////////////////////////////////////////////////////////////////////
    #ifdef RUN_ONLY
    
    CRunObject* ExtObject::playerObject;

    After that, you can create an action where you provide an object as a parameter and slip it your player instance. All instances of your enemy behavior will have access to the pointer since it's static.

    On another note, In Construct have you heard of including event sheets? If you right click in the event sheet editor, there's an option to include another event sheet - just place all of the code you want to reuse in one sheet and include it wherever you need it. It's one of my favorite Construct features.

    I hope all this helps. Good luck!

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