rfisher's Forum Posts

  • Looks like that code would be easy to convert to javascript and turn it into a plugin. I just don't remember if this has been done before. You might want to visit this url

  • Your game looks AMAZING. Will definitely help you out on Kickstarter.

    Did you use any 3rd party plugins/behaviors?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just bought the version for the iphone. I like it.

  • Event 42 uses the distance function and references the position of the bee. You have 3 bees, use a "for each" and event 42 will run for each bee.

  • Make the System Rotation a OR Block, that way it only execute 1 action.

  • I have created a behavior that learns to navigate a maze. Its a very modified A* algorithm.

    Demo

    Mazenav Behavior

    Mazenav CAPX

  • I'm making a behavior and i passed the contents of the tick function through the Google Closure Compiler. The results are that it appears faster, but the code is virtually unreadable. Has anybody else tested the Google Closure Compiler to optimize their code and what results did you get?

    Disregard, it looks like this is already being done. http://www.scirra.com/forum/plugin-developers-please-test-with-the-minifier_topic45502.html

    My next question would be, do i have care about optimizing my code since its being pushed through the Closure Compiler?

  • 00Rez

    How will this handle objects/obstacles that move?

  • Ashley

    Thank You

  • var loccnt = 0;

    this.inst.y += this.Mazenavdistance;

    this.inst.set_bbox_changed();

    var collobj = this.runtime.testOverlapSolid(this.inst);

    if ( collobj )

    {

        loccnt += 1;

    }

    this.inst.y -= (this.Mazenavdistance*2);

    this.inst.set_bbox_changed();

    var collobj = this.runtime.testOverlapSolid(this.inst);

    if ( collobj )

    {

        loccnt += 2;

    }

    this.inst.y += this.Mazenavdistance;

    this.inst.x += this.Mazenavdistance;

    this.inst.set_bbox_changed();

    var collobj = this.runtime.testOverlapSolid(this.inst);

    if ( collobj )

    {

        loccnt += 4;

    }

    this.inst.x -= (this.Mazenavdistance*2);

    this.inst.set_bbox_changed();

    var collobj = this.runtime.testOverlapSolid(this.inst);

    if ( collobj )

    {

        loccnt += 8;

    }

    this.inst.x += this.Mazenavdistance;

    this.inst.set_bbox_changed();

    This is the code i'm using to check if there is a solid object in the up, down, right, and left direction. It seems slow to actually have to move the object to the location and then check to see if its overlapping. I would like to use the

    runtime.testAndSelectCanvasPointOverlap function, but every attempt has failed(javascript error). I did look at the mouse plugin, but it didn't help me solve the problem.

    Any help

  • I'm trying to use the function

    runtime.testAndSelectCanvasPointOverlap(type, x, y, inverted)

    to test if a point is overlapping a solid. I'm having trouble with not knowing what is returned by this function and referencing the type variable.

    I gave up on using this function and used

    runtime.testOverlapSolid(inst)

    But this seems the wrong way to go about this.

    Any Help

  • Joannesalfa

    <img src="http://www.jenpop.com/demos/draw2sprite1.png" border="0" />

    This is how you used the plugin. The format for the set string is (x,y,direction(l,r,u,d),distance).

    <img src="http://www.jenpop.com/demos/draw2sprite2.png" border="0" />

    Here is a example of it working.

    I guess i need to put some error checking into the string parsing part of my plugin.

  • Yanen

    * MY COLS AND ROWS ARE BACKWARDS IN THE PLUGIN *

    Here is a live demo show what the post exception string can do.

    Live demo

    CAPX

    The post exception string for this maze is "0,3,8,5,0,1,8,3,2,5,5,4"

    3 numbers seperated by commas make up one exception. The first number represents col. The second number represents row. The third number represents the wall of the maze cell to remove. Think of the cell as a box with 4 sides. The top side is defined as 1, right side as 2, bottom side as 4, and the left side as 8.

    Also note that this maze dimension is 6x9 and when you reference a cell its done like you do an array, (0,0) is the upper left corner and (5,8) is the lower right corner.

  • Joannesalfa - send me a capx

    draw sprite set string examples:

    "10,10,dul,3" - draw sprite at x=10, y=10, diagonal upper left 3 sprites.

    "10,10,dur,3" - draw sprite at x=10, y=10, diagonal upper right 3 sprites.

    "10,10,dll,3" - draw sprite at x=10, y=10, diagonal lower left 3 sprites.

    "10,10,dlr,3" - draw sprite at x=10, y=10, diagonal lower right 3 sprites.

    "10,10,ulc,3" - draw sprite at x=10, y=10, upper left corner 3 sprites.

    "10,10,urc,3" - draw sprite at x=10, y=10, upper right corner 3 sprites.

    "10,10,llc,3" - draw sprite at x=10, y=10, lower left corner 3 sprites.

    "10,10,lrc,3" - draw sprite at x=10, y=10, lower right corner 3 sprites.

    "10,10,l,3" - draw sprite at x=10, y=10, left 3 sprites.

    "10,10,r,3" - draw sprite at x=10, y=10, right 3 sprites.

    "10,10,u,3" - draw sprite at x=10, y=10, up 3 sprites.

    "10,10,d,3" - draw sprite at x=10, y=10, down 3 sprites.

    You can chain these strings together.

    Another CAPX more examples

  • bowiz2

    I added how to use the maze part of the plugin. I will add the other soon.