Spriter/C2 update 11/2 bug fix for performance mode

Discussion and feedback on Construct 2

Post » Mon May 23, 2016 8:26 pm

@Sethmaster - this looks like it'll be a lot of tedious work to make sure I get every instance selected... but it's definitely a solution
B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Mon May 23, 2016 9:03 pm

mudmask wrote:@Sethmaster - interesting. So when you pick a specific instance of a spriter object, you're able to reference all those spriter sprites as well? is that because it's a container?


You got it right

mudmask wrote:@Sethmaster - this looks like it'll be a lot of tedious work to make sure I get every instance selected... but it's definitely a solution


If you use it in a function, you only need to do it once, tedious and all, and then reference it whenever you want it to be used.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Wed May 25, 2016 2:20 pm

Brashmonkey wrote:
sman118 wrote:@brashmonkey My thinking was that the new pictures would take on the custom pivot point because they were all the same size as the original art. Regardless, I'll just start over using the bones exclusively. Thanks for your help and all your work on the plugin.

-Ben


You likely don't need to start over. There's a fast way to copy your pivot points to images of same name and same size. (if they are in a different sub-folder as the original images.)

look here : https://brashmonkey.com/spriter_manual/ ... ffects.htm

At the bold text just before step 3

cheers.
-Mike at BrashMonkey


@lucid and @brashmonkey I checked out the link provided and it seemed like it was the steps for creating a new Character Map and didn't mention carrying over the new default pivot points.

Regardless, I did another test and edited the pivot points on the layout (which is actually my preferred way of working) and not by double clicking the objects and setting before importing. The new test worked perfectly so that is how I will do it. I wasn't too far into the animations so I can just start over.

Thanks for your help. I'm looking forward to getting it finished and up for people to use.

-Ben
B
40
S
11
G
6
Posts: 228
Reputation: 6,951

Post » Wed May 25, 2016 3:50 pm

Hello,

Just wanted some clarification—Spriter supports animated hitboxes, sound effects, and most if not all other features when importing into C2? Meaning I don't have to manually add in sound effect timing etc. in Construct? (Sorry if this has been answered before—couldn't find a clear answer after 20 minutes or so and I figured asking would be easier than searching this entire thread...)

Thank you~
B
9
S
4
Posts: 27
Reputation: 727

Post » Wed May 25, 2016 4:12 pm

B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Wed May 25, 2016 7:47 pm

EDIT: If your project was created with an older version of the plugin, and you want to continue to use the old mode for the plugin, you will get an error when you launch C2. Please download this version of the plugin if you don't plan to convert your project to the new mode. I am checking into whether there is a way to get the edittime to load without errors even without converting, and if I can find a way, I will update the plugin accordingly.

thanks @mudmask. @bballer1337, yes it supports all non-experimental features (everything except deformation), though sub-entities currently have a manual import process I can repost here if you need it.

@everyone - the performance mode/self drawing update is here
It requires the new version of Spriter Pro (or auto-update your current version)
The download for the plugin is here.

Again, consider the new mode to be in a beta state, until it's had some time to get tested more extensively by the Scirra community.
To use the new direct drawing mode. Use the following steps:
  • In Spriter, make sure your project is already saved normally.
  • Go to File|Generate spritesheets for project images
  • Select a different folder from your current Spriter project folder to save your spritesheeted project
  • Make sure 'padding' is set to at least 1 pixel or C2's linear smoothing will cause images to bleed into eachother
  • Make sure 'save spritesheeted project' is checked
  • Make sure 'save as scon' is checked
  • Make sure 'embed spritesheet info in project file' is checked
  • Make sure you keep the 'multiple spritesheets' setting to 'Never generate multiple spritesheets' (default setting)
  • All of the above settings (with the exception of the output folder) will be saved after the first time you use them
  • Create a new project with C2
  • Add an scml object in the same way you would any other C2 object (do not drag the scml file into your layout)
  • When the image dialog pops up (or double click the scml object to open it), choose the generated spritesheet image from the output folder you selected
  • In C2's project pane, right-click on 'Files', and select 'Import Files', and choose the scon file from the output folder you selected
  • Select the scml object, and in the object properties pane, for SCML file, type in the filename of your scon file
  • Set 'draw self' to 'true'
  • Run your project, and report any issues or bugs to this thread.


To change your existing project to use the new direct drawing mode:
  • Follow all of the above steps until you get to the part where you would start a new C2 project.
  • BACK UP YOUR CURRENT PROJECT TO A NEW FILENAME IN CASE ANYTHING GOES WRONG
  • Remove all the sprite objects associated with your Spriter object from the project
  • Remove the previously generated initialization event from your project
  • Remove the previously imported scml and scon file from your project
  • Start from the step above where you double click your scml object to choose the spritesheet image
  • If your project was started with the previous version of the plugin you will most likely get an error when you run it. This has to do with the previous version of the plugin having no image. To fix this, simply save your project, and reload it.

Enjoy! Hope this comes in handy.
Last edited by lucid on Thu Jun 23, 2016 9:46 pm, edited 3 times in total.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed May 25, 2016 9:37 pm

@lucid - hey man, this works great. you also forgot to add that weg gl effects work :D also those weird extra sprites that were showing up in the corner of the level are gone too. nice work guys!

I did run in to an issue when I was trying to convert an existing spriter object over to the new format. I seemed to narrow the problem down to when I loaded the sprite sheet in. here are some screenshots of the two errors I got (in chrome):

Image

Image

since I'm using families for my enemies, I was just able to create a new object and follow the steps and everything worked fine. it's not a huge issue for me to work around it this way, but either way I hope this helps!
B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Wed May 25, 2016 9:52 pm

@lucid - one more quick question, every time I edit my scml files, do I need to edit the non-spritesheet versions and then save them as sprite sheet projects each time?
B
57
S
15
G
8
Posts: 365
Reputation: 7,884

Post » Wed May 25, 2016 10:12 pm

@mudmask - Thanks, I will look into those bugs. And yes, you do have to edit the non-spritesheet versions and save as spritesheeted each you want to reimport.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri May 27, 2016 10:13 pm

Thanks for the earlier response, I've been playing around and got a lot of things to work, and it's great so far. Unfortunately I have run into some concerns.

f̶i̶r̶s̶t̶,̶ ̶n̶o̶t̶e̶ ̶t̶h̶a̶t̶ ̶I̶ ̶s̶e̶n̶t̶ ̶a̶n̶ ̶e̶-̶m̶a̶i̶l̶ ̶a̶b̶o̶u̶t̶ ̶t̶h̶i̶s̶ ̶t̶o̶ ̶s̶u̶p̶p̶o̶r̶t̶ ̶a̶l̶r̶e̶a̶d̶y̶,̶ ̶j̶u̶s̶t̶ ̶p̶o̶s̶t̶i̶n̶g̶ ̶a̶ ̶b̶i̶t̶ ̶i̶n̶ ̶a̶ ̶p̶u̶b̶l̶i̶c̶ ̶m̶a̶n̶n̶e̶r̶.̶ ̶T̶h̶e̶ ̶p̶l̶u̶s̶-̶s̶i̶d̶e̶ ̶i̶s̶ ̶t̶h̶i̶s̶ ̶c̶o̶u̶l̶d̶ ̶h̶e̶l̶p̶ ̶o̶t̶h̶e̶r̶s̶ ̶o̶r̶ ̶I̶ ̶c̶o̶u̶l̶d̶ ̶g̶e̶t̶ ̶o̶t̶h̶e̶r̶ ̶p̶e̶o̶p̶l̶e̶'̶s̶ ̶f̶e̶e̶d̶b̶a̶c̶k̶,̶ ̶t̶h̶e̶ ̶d̶o̶w̶n̶-̶s̶i̶d̶e̶ ̶i̶s̶ ̶t̶h̶a̶t̶ ̶i̶t̶'̶s̶ ̶a̶ ̶p̶r̶i̶v̶a̶t̶e̶ ̶p̶r̶o̶j̶e̶c̶t̶ ̶w̶i̶t̶h̶ ̶c̶o̶n̶f̶i̶d̶e̶n̶t̶i̶a̶l̶ ̶i̶n̶f̶o̶ ̶a̶n̶d̶ ̶a̶r̶t̶ ̶s̶o̶ ̶I̶ ̶c̶a̶n̶'̶t̶ ̶s̶h̶a̶r̶e̶ ̶t̶h̶e̶ ̶C̶A̶P̶X̶.̶ OK, apparently I can't get help through private channels, so I have to go off messy explanations since I cannot publicly share screenshots or the CAPX or anything.

Anyway, I'm trying to figure out how to set up enemies in my 2D action game. In it, you can attack with one character and hit an enemy. I figured having a family for all enemies with common instance variables and behaviors would be a good idea, so I did that. For the object, I set it to the SCML one. Probably I'll do it so that each enemy has its own scml file, for about 20 different enemy types (including bosses).

The issue is that the SCML objects have their own collision box and this is used by Construct 2 for:

- general collision detection, of course
- shadows (shadow light object + shadow caster behavior)
- interactions between solid objects

When checking interactions between two objects with the "solid" behavior, C2 uses the collision mask of the object with the behavior. I can adjust this slightly by linking the scml to another object and changing said object, but in the end its collision mask is not going to match every frame of every animation--it's just going to be something static. So... what am I supposed to do if an enemy is say, lying down on the ground or in some other pose where their shape changes dramatically and a single rough & static collision mask won't fit the object?

Shadow issue is basically the same thing from what I can see, just a different application. It's using the SCML object (or in the player character's case, the sprite object that is pinned to the SCML object) and using that to draw shadows.

I tried maaaaany different things and did hours of researching or I wouldn't bother rambling about my problem here. There were issues with putting the shadow caster behaviors on many different places (such as the sprites) and I think it's just going to be difficult to handle this when it's not integrated into the Spriter object behavior and I don't fully understand how exactly the Spriter object does what it does.

I could do without shadows, but objects not having solid behaviors would just look and function oddly. As for the collisions, it's extremely confusing and I'm not sure what to do but at least I have control over the interactions, unlike the Solid behavior.

Thanks for any advice/help anyone can offer.



UPDATE: After a ton of thinking, research, and coding, I managed to work around the collision boxes issue by using families, containers, and some crazy code and as of right now I think I've got everything working, though it needs more testing. I still haven't fixed the issue with the solid or shadow caster behaviors though.

I also have some issues with Spriter I'd like report... hopefully it's just me being bad, which it usually is.

Spriter Issues

Sometimes renaming files at the top-left doesn't work, if I try to like, rename something and then rename another thing. I haven't been able to figure out what exactly causes or fixes the issue but it can be somewhat inconvenient when I keep double-clicking and it won't rename. Maybe there is some trick to it I'm missing or maybe it's a bug, I don't know.

Meta data: when I adjust basically anything in the timeline, the existing meta data I have (just tags for now, but I want to try out variables in C2 as well, since I haven't found anything on how they work) just disappears. The key frames for them or whatever disappear and I have to re-add them, which is... well, obviously not cool.

I feel like I'm doing something wrong in adjusting the tags, but I can't figure out what. :
As always, thanks for any help.



Update 2: Meta tags just... aren't working for me. Aside from being glitchy in Spriter, after several hours and various code tests I cannot get the different tags to function correctly in C2 either. I checked the JSON file and it seems like it's right (though I couldn't tell you confidently without a little more info about the format) but I'm just having no luck.
B
9
S
4
Posts: 27
Reputation: 727

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: austinblackbelt, Televangelist, TRMG, Yahoo [Bot] and 5 guests