lucid's Recent Forum Activity

  • nycgio There is an additional way to import Spriter files in both C2 and C3. Instead of using individual sprites, the plugin draws all of the images itself. The plugin runs much faster and uses less ram with this method, so unless you need separate sprite objects (for instance, to add an effect to some of the sprites that make up your character, but not others), you should always use this method. The import process is completely different than the other method. It looks like a lot of steps, but it's easy and quick to do once you know how.

    The first step is to have Spriter figure out the bounding boxes of each animation. This tells the scml plugin how much space it needs to draw each animation.

    To do this, click here:

    Use these settings:

    You only need to do this the first time you export it, or when you add a new animation. This only affects the bounding box of the animation (anything outside this box isn't drawn), so if you're tweaking animations and testing the game repeatedly, you don't need to do this every time.

    Make sure you have these options enabled in Spriter:

    When you're ready to export, go here:

    The settings I've marked in red are all mandatory. The other settings on the left you can tweak as you like. Spriter saves all of the settings in this dialog, so you don't have to check these every time.

    Next, click the dots next to base filename to choose the filename. You need to save it to a separate folder from your main project, and the filename you choose will apply to both the spritesheet and the scon file. Click Ok to complete the export.

    In Construct 3, create your scml file as you would any other object. Right click - insert new object - scml.

    When you add the object, C3 will open up the image editing dialog the same way it does when you add a standard sprite object.

    In the image editing dialog, click the folder icon to load an image, and choose the spritesheet png that you just exported.

    Import the corresponding scon file by right clicking on Files in the Project Pane and choosing Import Files, and selecting the file:

    And lastly, in the properties pane, set scml filename to the name of the scon file, and make sure that draw self is set to true.

    That should do it. Lemme know if you have any issues.

  • lucid - you've raised some good points, actually. Let me have a think about what we could do to solve some of these integration problems.

    For rendering deformed meshes, are you currently drawing degenerate quads? (i.e. make two points of the quad the same, so you get a triangle)

    he technique we use for constructing the meshes in Spriter 2 will easily adapt to either one. When I was experimenting with Construct 2's polys, whatever you had there was working fine. Regardless, whatever is most efficient will work for us.

  • Ashley, indeed!

    I have a small suggestion for the documentation.

    Please link blackhornet's plugin converter in the Porting Construct 2 Plugins/Behaviors section of the documentation. I only found out about it by luck when I came back to the forums to find the 'drawing plugins' thread again. I know there's probably not that many plugins with as many ACE entries, but for the Spriter plugin's 60-something ACE entries it would have been extremely tedious and easy to make mistakes.

  • Subscribe to Construct videos now

    Buy Spriter Pro:

    BrashMonkey Store

    Scirra Store

    Steam

    How do I import my Spriter project into Construct 3?

    Download the latest stable version here and report any issues in this thread.

    Just zip your project. Name the zip the same base file name as your scon file (myProj.zip for a scon file named myProj.scon). Drag it into C3, and it will handle the rest.

    Big thanks to Ashley and R0J0hound for their quick responses, and especially to blackhornet for his plugin conversion tool and additional help he gave me converting the plugin to C3.

    Tagged:

  • Hi everyone. Sorry for the lack of replies as of late. I will look into this stuff soon.

    In the meantime. Here is a C3 version to test. I got it playing an animation, but haven't tested much beyond that. At the moment it (and for the near future) it only works with self-drawing mode.

    https://www.dropbox.com/s/6fef4yt5q6jr9 ... addon?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks R0J0hound and Ashley

    Got it working.

  • I see. Well that's no fun.

  • I know I saw this mentioned somewhere, but now I can't find it. I just need to download the source for a couple of official plugins so I can figure out a few things.

    Also, if anyone has any ideas of where errors dealing with cors and 404 errors when using an XMLHttpRequest (to access project files) that were working in C2, any direction would be appreciated.

  • I really, really would so much prefer Spriter and Spine to not implement themselves as drawing plugins. This forces the plugin to reimplement a bunch of Construct features and actually limits other creative features too. For example:

    - you can't add a WebGL shader to just one part of a skeletal animation if the plugin draws the whole thing, but you can if it just controls sprite objects (e.g. make just the head flash red if hit, etc)

    - you can't test for collisions with just a segment of a skeletal animation if the plugin draws the whole thing, but you can if it just controls sprite objects

    - a plugin which draws the whole animation probably has to reinvent a whole asset management pipeline, but if it just controls sprites it leverages our project-wide in-editor spritesheeting engine

    - Construct's support for containers allows you to treat composite objects as if they were one instance in the events

    Personally I am convinced that these plugins should not use the drawing APIs and should simply act as controllers for sprites. This makes it much more flexible for the user, and avoids clunky reinventions of existing parts of Construct. I discussed this at length with a Spine developer a while ago and I thought they agreed; one of the outcomes of that discussion was the decision provide a custom import process so they can conveniently generate all the necessary sprites on import, so I filed this issue as a TODO for that work. Perhaps not all the Spine developers are aware of this approach.

    We could add the drawing APIs they want, but one of the reasons we're holding off is because those features don't work in the canvas2d renderer. From the user's point of view, this will manifest as the plugin randomly not working on a small percentage of devices. I intend to make the C3 runtime the point where we unilaterally drop the canvas2d renderer, at which point we can go to town with these kinds of features. However even then it has the drawbacks listed above, and the C3 runtime is still some way off.

    Rather than adding new drawing APIs, I would much rather add any extra APIs to allow them to act as controllers, and have a good workflow for importing and updating. That's why I filed the custom importers TODO issue. I am totally willing to co-operate with any developers who want to take this approach and refine the SDK to make it work well. I can't force them to, and they might make drawing plugins anyway, but I hope at least one of them take me up on this offer!

    Spine, Creature, and Spriter 2 would all use polygon meshes to render their parts, as opposed to rigid sprites. As far as rigid sprite animations like Spriter 1 (or if C3 gets a deformable polygon mesh object, and we went with that), the only issue was that since all objects would be in a single container, they would all need to be present at all times (unless containers don't work like that anymore). This means that if you have sprites that only briefly appear in one of the several animations, or small objects composed of several sprites, of which there would be hundreds of instances, there comes an ever increasing overhead of sprite objects created that don't do much but sit around, invisibly, and wait to be used. Even when I added functionality to disable all animations on objects that were off screen, having hundreds of idle Spriter objects in a level (composed of more hundreds of individual sprites), the overhead of having all of those idle sprites made it run much more slowly than when I enabled the self-drawing mode, even though animations weren't being calculated or applied at all.

    [quote:3p2kc0q6]a plugin which draws the whole animation probably has to reinvent a whole asset management pipeline, but if it just controls sprites it leverages our project-wide in-editor spritesheeting engine

    'm not sure why this would be. The C2 plugin for Spriter was eventually expanded to allow users the choice of the import process we worked together on, and control individual sprites, or to allow them to load a single spritesheet image and draw itself. The plugin handled the splitting up of the spritesheet itself, though, so perhaps this is what you mean?

    [quote:3p2kc0q6]you can't test for collisions with just a segment of a skeletal animation if the plugin draws the whole thing, but you can if it just controls sprite objects

    this does pose a problem. For the Spriter plugin, in self-drawing mode, you had the option of having the plugin still create just the collision sprites, and so the API you mention would still be quite useful. Another alternative would be if there was the ability to have multiple collision types/shapes on the same object, and plugins could test if any or a particular one registered an overlap or collision.

    What about the issues of using sprites for everything?

    For example you can't define hotspots, or image points at any other time than on import.

    Another might be that you can't decide what frames are loaded on creation.

    These should be features accessible to the object, and not only available to a behavior.

    or the hotspots with the scml plugin on C2, since Spriter has animatable pivot points, we just had all of the sprites generate as 0,0 hotspots, and then the plugin did the hotspot math to compensate.

  • You can use safe-mode:

    https://editor.construct.net/?safe-mode

    Thank you.

  • Ashley -

    To enable Developer Mode, open Construct 3's settings dialog and click or tap the dialog caption 10 times

    I'm not sure how to open the settings dialog, as that error appears as soon as I click 'Launch Construct 3'. Is there a way to access settings before you open C3?

    blackhornet - Awesome. Thanks for the awesome tool, btw. Saves hours of work for plugins with a lot of ACEs.

  • stricky - working on it, possibly gradually depending on the resolution to the below

    blackhornet - any plans/eta on updating your indispensable Plugin Converter?

    Ashley - It appears I may have made a mistake converting the Spriter plugin. After I installed the addon I get this error as soon as I launch the C3 editor, so I can't remove the addon to try again:

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