lucid's Recent Forum Activity

  • 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.

  • Ashley - thanks. I mistook that as edittime stuff similar to C2.

    I got almost everything working. The API is excellent and thorough. I did run into a few things I can't figure out:

    1. I can't find anything about creating families and adding object types to them. Is this supported yet?
    2. I'm getting TypeError: eventBlock.AddCondition is not a function. The same for AddAction. In fact, if I log an IEventBlock to the console, it looks like it doesn't contain any properties or functions not derived from its parent:
    3. I don't seem to be getting the 'promise'd IAnimationFrame from ReplaceBlobAndDecode. I need it to specify the pivot point on the first frame. I don't see an option to remove a frame either. This works: currentFrame = await firstAnim.AddFrame(imageBlob, fileWidth, fileHeight); But for this currentFrame is undefined: currentFrame = await currentFrame.ReplaceBlobAndDecode(imageBlob); I tried using a separate variable to hold the result just to be sure there wasn't anything strange happening, and it had the same result.
    4. I couldn't find a way to make the first blank frame of an animation a specific size. IObjectType.AddAnimation would let me specify the first frame size, but I don't see a RemoveAnimation. IAnimation.AddFrame is the same situation with no RemoveFrame.
    5. IWorldInstance has GetOpacity but no SetOpacity. Is there any way to set the opacity?
    6. I'm still getting a bunch of these errors, though everything seems to be working anyway. Is it safe to ignore or will it cause issues down the line?
    7. How would I get a blob from an entry to use with IProject.AddOrReplaceProjectFile(blob, filename, kind = "general") - say I started with: const entry = zipFile.GetEntry(fileName); Also, how would I create a subfolder in the project Files and place it in there?
    8. Any way to import sounds yet?
  • Ashley - finally got around to trying this out on the Spriter plugin. I had a couple of questions. First, is this documented anywhere aside from the CustomImporterPlugin in the sdk?

    Could you please provide a link if so? I wasn't able to find it in the sdk documentation.

    If not, I had a few specific questions.

    1. How would I go about making a blank frame in a sprite of a specific size?

    2. How would I add additional frames to an animation?

    3. Is it possible to add events yet, and if so how?

    4. I'm getting a bunch of errors like this:

     main.js:63 Error loading texture: Error: no content set
     at n.ǃIkK (main.js:80)
     at window.ǃISB.ǃIkG (main.js:80)
     at n.map (main.js:80)
     at Array.map (<anonymous>)
     at window.ǃISB.ǃIky (main.js:80)
     at window.ǃISB.ǃIkN (main.js:80)
     at window.ǃISB.ǃIkR (main.js:80)
     at window.ǃISB.ǃIki (main.js:80)
     at window.ǃISB.ǃIgS (main.js:80)
     at n.ǃIgS (main.js:80)

    when attempting to load images from the Spriter json format. I've confirmed with console logs that it is correctly retrieving valid filenames that exist within the zip. Any ideas?

    Thank you.

  • NetOne - I won't get to working on the plugin until after Spriter 2 1.0, which will be a while, but that's the idea, yes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • XpMonster - thank you. There will be a new runtime for Spriter 2.

  • sagispin - That isn't currently supported. I can't give an eta for that feature, but that is something I want to add.

    - indeed. Again, I can't give an eta, but I do plan on updating the runtime as soon as I can.

    Here's the latest Spriter 2 gif:

    A new way to animate

  • - You probably know about this already, but just making sure.

  • Anyone following this thread, please refer to the main Spriter thread to avoid multiple posting each time. Thanks!

lucid's avatar

lucid

Member since 16 Jan, 2009

Twitter
lucid has 25 followers

Connect with lucid

Trophy Case

  • 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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

24/44
How to earn trophies