Headbang Games's Forum Posts

  • QuaziGNRLnose

    What about 3d animation support?

  • You need to take a few things into consideration:

    1. add another 2 image points at the right and left edges of your sprite - for all the frames and animations (we used bbox bottom in our case for Y, but you can use an image point), this is done so when you mirror the image the shadow will mirror too.

    2. spotlight.Y represent the position of the light source, you can alternatively add a var to your sprite with this value, if you want to create a sun lightsource for example you'll need to push it to really high to around -20000 on the Y axis, so it's probably better using a var.

    3. Sprite.X and Sprite.Y represent where the light source is falling, should be the lowest ground point on the same X point as the spotlight.

    The rest is general, you don't need to change any of it.

  • Here is the test capx for creating shadows with paster:

    [attachment=0:2qap4181][/attachment:2qap4181]

    Note, if you have webgl effect on the object you're pasting (like tint for example in my case), you can't paste the object with opacity, so in my case i create a separate paster for each light source and for each character on start of light and assign it to the character and then i set the paster object opacity instead, it's heavier on performance this way, but i couldn't find another solution.

  • Here is a little shadow test with paster, finally some real shaped shadows!

    You can drag the character and the light spot around, "S" will stop and start movement.

    Not perfect as 3D shadows, but good enough!

    https://c784d66a80c4c3e91d4c1db3ba975cb ... ZNankyd2c/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • nevermind, i just figured out i need to draw the quad points in a different order to get a flipped effect.

  • I am trying to make some shadows with this plugin, i have a character with lots of animations, i want to paste it as a shadow, i added tint to make it black and i am pasting it with draw quad texture for skewing.

    My problem is i can't figure out how to flipped the paster.

    Is there a way to do it, besides creating another instance before pasting and flipping that one?

    Scratch that, even if i add another sprite, inject the current frame and flip it, draw textured quad draws it not flipped.

  • set animation speed to 0

  • The object is placed only inside the tutorial layout and it is global, never destroyed and never recreated.

    When i switch layouts with a global object, does it reload all assets into memory?

  • Ok i've isolated the problem, my main character has 15 animation, 16 frames each, 512x512 size and he will have more.

    If i remove all the animations and leave just one (i didn't try to see where is the breaking point), it runs smoothly.

    I know it's a lot, but i have a I5 3.4GHz processor and 16GB of ram, this should be a walk in the park and it does works good in preview mode.

    Ashley Do you have any suggestions? maybe load the animations on the fly from a url?

    A preload/load on demand property for animations within the sprites would be great for issues like this.

  • I tried rounding the values, didn't help

  • zenox98 Thanks for testing and i am glad you liked it!

    Ashely I tried it in firefox, same jitters, on IE it doesn't load at all, but i don't really mind.

    What really baffles me is that it doesn't happens when i preview the project, in preview it runs smoothly, is there any difference in rendering between preview and export?

  • I tested it on two machines, I didn't try ie or Firefox since nodewebkit is chrome based but ull try when I'll be next to a computer.

    How does the node version runs on your machine?

  • Ashley It happens in both, just more severe in nodewebkit which is the platform I want the final product to run on.

    I am not home now and I didn't upload the 181 version, but here's the 180 one which works the same:

    https://googledrive.com/host/0B3JLq-yXZ ... /lofPC.zip

  • Ashley I update the link with an export from 181r, it still happens (it's more severe in node-webkit, on 180 as well).

  • No i didn't see there was a 181 version, downloading it now!

    GREAT feature addon - global layer, brilliant!