R0J0hound's Recent Forum Activity

  • The simplest idea would be to send lots of lasers from one object and let them bounce until one hits the other object, then you can discard the rest.

  • They do something entirely different to what my capx does. My capx loads an isometric tmx file to sprites, and those plugins help with motion and such in isometric. I couldn't tell you more because I've never used them.

  • It just loads the tmx to a bunch of sprites. After that you can do whatever you like with them.

  • Juicy

    You could make you're own loader for isometric tiled files. You'll just need to use sprites instead of the tilemap object.

    Here's an example:

    https://dl.dropboxusercontent.com/u/542 ... d_iso.capx

    The tiles are imported into the sprite's animation as a sprite strip, and the tmx file needs to be saved with csv encoding.

  • In the first link I posted I did show how to use interpolation for all easing effects. What I'm saying is only using a fixed value (0.1 is fixed) for the last parameter won't give anything but an easing out effect.

    Basically all the interpolation functions define some kind of curve from a to b. For example cosp() could look like this:

    a|--.
     |   `-.      
     |      `.
     |        `.
     |           |           \           
     |             |             \          
     |              \         
     |               `.         
     |                 `.       
     |                   `-.    
    b|                     `--,
     +-------------------------
     0                        1[/code:1n6dc089]
    
    The last parameter specifies a location along this curve from 0 to 1.  Now if you gradually increase that value from 0 to 1 you'll get whatever easing as the curve provides.  If you instead just use a fixed value for the last parameter and keep changing "a" then none of the functions will give any advantage over just using lerp.
    
    But the best proof is to try it.
  • akkthedev

    To detect a pixel you first need to paste that object into the canvas object, then use the canvas.rgbaAt(x,y) expression.

  • I haven't tested this, but it should work:

    // save sol of type to instList
    var sol = type.getCurrentSol();
    var instList = sol.getObjects().slice();  //the slice() function will copy the array
    
    // filter away instances that were deleted
    instList = instList.filter(function(inst, i, arr)
    	{
    		var iid = inst.get_iid();
    		var instances = inst.type.instances;
    		if( iid<instances.length && instances[iid]===inst)
    			return true;
    		else
    			return false;
    	});
    
    // set sol later
    var sol = type.getCurrentSol();
    sol.instances = instList;
    sol.select_all = false;
    obj.applySolToContainer();
    [/code:3lr99elb]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you need to copy the list. Your code above just references it. I forget how exactly but a searching for "JavaScript copy array" should give a way. Also when setting the sol you'll probably want to push a copy of the current sol first. I think there's a runtime function for that.

    A useful reference could be to look at the "pick all" condition or maybe even the "pick by uid" condition.

    For verifying the instances still exist:

    One way that would work could be to find each instance in their object type's list of instances.

    Another idea that could be investigated would be If instances somehow were marked as dead. If it wasn't then you'd need to check if the uid was the same. If it wasn't it would be a recycled instance.

    Just some ideas. I'm not near a dev PC to try any out ATM.

  • You can get a good speedup by utilizing an array to make the cell lookup faster.

    See here for an example:

    The slowdown you're encountering has to do with picking. Event 23 in your capx is the bottleneck.

    If you're using 40x40 then you have 1600 cells, and event 23 does this:

    cell: coordX = checkX //this filters the 1600 cells down to 40

    cell: coordY = checkY //this filters the 40 cells down to 1

    1600 times.

    The idea in my capx is to just do everything in the array, so I can lookup if a cell is on or off with a direct check. Then to update it visually I just loop over the sprites and set their visibility depending on the value in the array.

  • Make that part transparent so you can see the bricks behind it?

  • The difference between lerp and anglelerp is anglelerp lerps in the closest direction.

    Also I'd like to point out that while something like:

    lerp(a, b, 0.5) will give an easing out effect, so will cosp(a,b,0.5), qarp(a,b,c,0.5) ... etc.

    As long as a constant value is used for any of the interpolation functions it will only give an easing out effect.

  • Set some text to Canvas.RgbaAt(350,120) and see what the color is at that spot.