RayKst's Recent Forum Activity

  • there's an alternative that i think uses a similar method but maybe would be more efficient, the technique used on http://bit.ly/49np5J . You select the sprite in the spritesheet and it then shrinks the boundary to cover exactly the sprite frame. Then it exports the animation coordinates "map" as XML like <Frame1>rect(x,y,w,h) etc... Though you have yet to adjust the offset sometimes... I'd like to have the source code of this program :

  • yeah i know there's some restrictions when using this method. I've read the code that does this. it basically receives a png file , x, y and alpha limit by parameter. It then stores all pixel data in a matrix, reads it pixel by pixel beginning on position x,y , left from right , top to bottom, tests alpha value of pixel , if greater than alpha it marks it as opaque. In the end it returns all rects corresponding to the sprites in the spritesheet. How exactly the algorithm works i couldn't understand

    one implication of this algorithm is that all sprites must be alligned by Y. example:

    <img src="http://dl.getdropbox.com/u/2472278/spsheet.png">

    it would get the purple square first, not the blue one as it is expected, cause it is above the others

  • one feature that i think would be really useful is import frames of a spritesheet by alpha-clipping it. In my opinion this is much more powerful than the default grid clipping method. There's a 2d game engine(clanlib) that uses this method so i thought it would be great to have it on construct.

  • If you want the trail particles to live longer than its "master", you could set a private variable in each of them with the UID of the "master", then when a "master" object dies you would look up their children comparing their private variable with the UID of the dying "master" object and set off a timer behavior to kill it later.

    Doing so would kill the whole trail at the same time but a little while after the "master" dies.

    Of course, you could also have the timer event set off timers for other children, in which case you can arrange some pretty complex dying orders just storing the proper UID in the proper particle.

    interesting , it is more realistic that way ... the way i did the particles dont disappear right away... i'll do that thnx

  • thank you guys i made it by associating and comparing UID's ! it works

  • oops.. how do i get the object's UID ?

  • yeah it' the second case.. i will try storing and comparing the UID's then.... thnx !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi! i've discovered construct some months ago and been using it and loving it since then. up until know i had no doubts but now that i'm starting a serious project i came into a problem : ex.: there's a bullet and its trace made of particles.. when a bullet hits [solid] it is destructed ... ok but how do i destroy its trace at the same time? is there some way to associate both of them at creation? (i know there's the containers but....) dont know if i made myself clear enough but thats my problem

RayKst's avatar

RayKst

Member since 22 Jul, 2009

None one is following RayKst yet!

Connect with RayKst

Trophy Case

  • 15-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers

Progress

17/44
How to earn trophies