lucid's Recent Forum Activity

  • First off, thanks for getting all the requests added and bugs fixed so quickly. Everything is working beautifully. The custom import now exceeds the functionality and ease of use it had for C2.

    For new SDK features, please collect a complete list of everything you need then post an issue to GitHub listing them all.

    Was this just for this initial run of trying to get the basics working, or would you generally like for SDK or importer related feature requests to be submitted in this way? (as opposed to through construct3.ideas.aha.io).

    I'll list the features here in case that makes a difference, and so I have easy access to copy paste them to the appropriate place.

    Make first party plugin ACEs and IDs public

    This would be mainly for plugin developers to be able to easily create and create events for built-in object types.

    The needed items would be:

    • The plugin id (for creating an instance)
    • The id for each ACE entry
    • The parameter list for each ACE entry (the id, the type, and the id's for combo items)

    This would allow a ton of flexibility and power to the SDK. The listed items are all that I believe would be necessary, but if it's more feasible to just publish the entire aces.json that would still serve the same function.

    Methods for retrieving instances of a type within a project or scene

    If it's the only possible one, being able to retrieve the instance of a single-global object like the Audio plugin would be immediately useful. For instance, I was going to make the import process automatically setup audio events if the Spriter project contained sound files, but aside from not being able to figure out the combo id's for the Play (by name) action, I have no way of checking if an Audio object already exists in a scene to use that.

    I would imagine that GetFirstInstance or GetInstances for non-single-global object types would be useful down the line, but I don't have any immediate use for that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • valerypopoff thanks!

  • captainsteff I will be putting the c3runtime on the backburner for now. Ashley recommended using the SDK as a template for a rewrite of the code. That will take some time, as the plugin is several thousand lines long. I'd rather take the time to do it correctly, rather than rush through it, leaving it difficult to maintain moving forward.

  • Ashley got it. Thanks. In that case, I will hold off on this for now, until I have a little more time to fully focus on it. I would rather take advantage of the opportunity for some much needed refactoring, rather than rush through it.

  • captainsteff I asked Ashley a few specific questions. Depending on the response, I might be able to take another stab at this before putting it on the backburner for post Spriter2 release.

    tunepunk No there is no specific feature like that for Spriter. We do have a tutorial video on using guide images though :

    Subscribe to Construct videos now

    Also, don't forget you can resuse animations for multiple characters if they share the same skeleton, using character maps:

    Subscribe to Construct videos now

    These types of features are a strong possibility for Spriter 2, but probably not coming until after all the more essential animation features are complete.

  • Ashley

    What is the bare minimum needed to convert a C2 runtime plugin to a C3 runtime plugin? I tried looking through the plugin examples and the SDK docs, but I want to be sure I'm understanding this correctly.

    From what I can tell, the following is needed:

    ACES

    • All ACES moved from plugin.js to their respective files
    • ACES work slightly differently now and need to use return instead of SetRet

    Plugin

    • Boilerplate constructor code and such under plugin class such as cr.plugins_.MyCompany_MyPlugin = function(runtime) gets moved to plugin.js and adapted to the new format

    Type

    • Code for pluginProto.Type needs to be moved to type.js and boilerplate code like pluginProto.Type = function(plugin) adapted to the new format

    Instance

    • Anything that was previously instanceProto is now moved to instance.js.
    • Loading resources and drawing work very differently and require adaption.
    • As in the other sections, boilerplate code, constructors, etc need to be adapted.

    Aside from small changes like properties being passed to constructor, as opposed to being accessed via this/

    Is there anything I got wrong, or I'm missing? Also, the meat of the plugin and js methods should all function the same otherwise, or are there any additional requirements or restrictions for general code?

  • Thanks a lot lucid! We really are looking forward to your updates! 😃✨👍

    You still do plan to upgrade to the C3Runtime after the Custom Importer?

    Eventually yes. Unfortunately, after a quick glance at the C3 Runtime API, the documentation seems to be geared more toward starting from scratch than updating a C2 plugin - so unless there is an upgrade guide somewhere it's a bit much to unpack until I have more time to really dig into it. I'm assuming there's a quicker upgrade path, if I were just to know exactly what sections of code will and won't need to be changed. But I can't spend too much time at the moment trying to figure it out, because there's still a lot to do to meet our Spriter 2 beta release deadline.

    And also lucid, may I suggest posting future updates of the Spriter Plugin into the Official Construct 3 : Addons Page.

    Thanks for the suggestion. I had forgotten about that. I just uploaded the C2 addon there. When I finish the importer stuff I'll upload the C3 one as well. I still need to go around and find all of our links to the old location and update them as well.

  • Hello again everyone. Just a progress update. Nothing to report on the C3 runtime, and that will likely take a while to get to. But, I started working with the Custom Importer API, and there are a few cool things on that front.

    The new import process will be able to import your drag and dropped Spriter project whether you're using the Self-Drawing method or the classic separate sprite methods. It will automatically determine which type of project it is and import it correctly with no additional steps.

    This means that when importing atlased projects, it will automatically set the draw self and filename properties, as well as set the image up in the scml object. It will also automatically take the steps necessary for hybrid style importing, like creating collision boxes and importing sounds for draw-self projects.

    While it will be necessary to zip your Spriter projects to import them, it will no longer be necessary to save both an scml and a scon file when importing your project with separate sprites.

    Finally, once the events are working in the SDK, I believe it should also be possible to make it automatically set up the basic sound events for you as well when your project contains sounds.

    I have to wait on Ashley to fix and add a couple of things before I can complete and release the updated plugin version.

  • K. I had filed a bug report already. I'll update it with a demo addon.

    Edit: The bug report is updated with the demo addon.

  • Thanks Ashley . That worked. I haven't tested sound yet, so the last question for now is:

    3) Every animation frame has its own origin, and the object itself separately has an origin. Sprites copy the animation frame origin to the object origin. It sounds like we need to make sure this happens when calling the SDK methods.

    Just to make sure, you mean this is something you need to fix in the SDK? Or is there some way for me to set the animation frame origin to the object origin?

  • 3) Just to be clear, you mean 'we' as in Scirra needs to make a change, or 'we' as in plugin developers using the SDK need to do an additional step to update the object to the animation frame pivot?

    4) I'm just trying to make the first frame of the first animation a blank frame of a specific size.

  • Thanks for the help.

    2) This is the code:

    const eventSheet = layoutView.GetLayout().GetEventSheet();
    const eventBlock = await eventSheet.GetRoot().AddEventBlock();		
    console.log(eventBlock);
    
    const systemType = eventSheet.GetProject().GetSystemType();
    eventBlock.AddCondition(systemType, null, "on-start-of-layout");

    which produces this output in the console:

    3) I misread the last sentence "Returns a promise that resolves when the image content" as "with the image content". I just re-fetched it from the array I got with IAnimation.GetFrames().

    There's a new issue though. I'll post it as a bug unless there's a step I'm missing. After changing the first frame with SetPivotX and SetPivotY, it shows up in the layout as if the pivot point is still in the center. If I double click the sprite, in the image editor the pivot point is in the place I had set. If I change the initial frame in the properties panel to something else and change it back, it corrects the pivot point placement.

    4) I meant specifically for the first frame. I can't find any way to remove an animation or a frame, and ReplaceBlobAndDecode only takes one parameter.

lucid's avatar

lucid

Member since 16 Jan, 2009

Twitter
lucid has 22 followers

Connect with lucid

Trophy Case

  • 15-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies