R0J0hound's Forum Posts

  • It only happens when not using webgl, and only then if the browser does anti-aliasing. But no, there currently is no solution to remove it in that situation.

  • 1. "overlaps at offset" just moves the object, checks for collision then moves back. I've done your request before in events by resizing the object, checking for collision, then setting the size back to what it was. I do see how it would be tied in to request 2 since you would want to know the center to scale from.

    2. Would moving the hotspot leave the xy positions the same or would it also change the positions so the object would stay visually unmoved?

  • 1. Look at the AJAX object for a way to download files from websites. I hear you can get more complicated communication if you make the website with PHP, but that's outside the scope of what I'm interested in.

    2. You can either convert the text to an array with a for loop and using tokenat() and tokencount() kind of like in my capx, or you can directly add the commands to the array with the push action, one word at a time. After it's all in an array, you can use the array.asJSON expression to get a text representation of the array. In fact you can save a file with that to your website and use the array's download action and bypass the ajax object.

    3. My capx was a simple example case of this. You'll have to add events to handle every function you want to use.

    Overall the process to make an interpreter is much like doing it in any other programming language. It can get as advanced and complicated as you like.

  • It has a draw texture quad action that can do it. All you need to provide are the positions of the four corners and a object to get the texture from.

    There is an example of it here:

  • Hmm... It's still completely invisible for me in the first pic. Either way there isn't anything I can do about it in the plugin. One idea you could try is to start with the canvas completely white, aka not transparent at all...

    Just tested that and it doesn't work. If finally was able to see it by tilting my screen. I think it's caused by number rounding when the colors blend. A solution that works is to use an additive blend instead.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well to spawn on the edge of the layout you can do it with two events:

    system compare choose(0,1) = 0
    --- create object at random(LayoutWidth), choose(0, LayoutHeight)
    else
    ---create object at choose(0, LayoutWidth), random(LayoutHeight)[/code:3rlso663]
    
    You can then modify that to spawn further away from the edge (say 100 pixels) with:
    [code:3rlso663]system compare choose(0,1) = 0
    --- create object at random(-100, LayoutWidth+100), choose(-100, LayoutHeight+100)
    else
    ---create object at choose(-100, LayoutWidth+100), random(-100, LayoutHeight+100)[/code:3rlso663]
    
    Both those however only spawn along the edge of a rectangle.  To spawn in a random area outside the layout you can break up the areas outside into four rectangles in which you can create objects in the same way as inside the layout.  Keep in mind you need to define how big an area to spawn in.
    
    For example the whole area outside the layout up to 100 pixels away:
    [code:3rlso663]
    global number region=0
    every tick
    --- set region to choose(0,1,2,3)
    region = 0
    --- create object at random(-100, LayoutWidth), random(-100, 0)
    region = 1
    ---create object at random(100)+LayoutWidth, random(-100, LayoutHeight)
    region = 2
    --- create object at random(0, LayoutWidth+100), random(100)+ LayoutHeight
    region = 3
    --- create object at random(-100, 0), random(0, LayoutHeight+100)
    [/code:3rlso663]
    
    The formulas should be correct, but I haven't tested it.
    -cheers
  • abs(x1-x2) will give the x distance between two x positions.

  • I missed your capx but have a look at overlapping at offset.

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

  • I goes completely transparent for me on my computer. I don't know why it wouldn't... Does it fade at all?

  • This isn't really a beginner topic and since you said you've made an interpreter before you likely know better than I on how to make one but here is a way to do it.

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

    It's an interesting idea but it's probably better to just make the games in C2 and have one project that opens links to the other games.

  • openfocus

    Here's a way to do it with the same formula I used before.

    https://www.dropbox.com/s/eldpa0s7zvfr3 ... .capx?dl=1

    /examples22/orbit2.capx

    A family was used so I can pick two different instances of the same object type. Also all the numbers are kind of arbitrary, e.g. G, masses, velocities and positions. I just tweaked them until I got an acceptable motion. However there is no reason why you couldn't use scaled values from actual planet data.

  • So the frame and health ratios are the same so:

    Health/maxHealth = frame/28

    Solving for frame:

    Frame = Health*28/maxHealth

    Next we need to round it to a whole number, and since we want frame 0 to be used only if the health is 0 we will use ceil() to round up.

    So the formula is:

    Frame = ceil(Health*28/maxHealth)

  • I drew the lines in black, flood filled the areas to erase in black as well then flood filled with transparent.

  • For more planets change the "every tick" to "for each planet" and add another "every tick" event below and move the "set position" action to that.

    To make it work with the bullet behavior you'll have to covert the speed and angle of motion to vx and vy in an "every tick" before the events and back at the end of the events. Also the "set position" can be removed and the overlap and bounce event should be either before or after the events.

    Here are the conversion formulas:

    Vx=speed*cos(angle of motion)

    Vy=speed*sin(angle of motion)

    And

    Speed=distance(0,0,vx,vy)

    Angle of motion=angle(0,0,vx,vy)

  • You can, but it's mainly up to you to make the pieces.

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

    My workflow:

    1. clone the object that I want to fracture.

    2. open the image editor and draw lines on it to split it up into parts.

    3. duplicate that frame for every part.

    4. Then I edit each duplicate frame and erase each other part off the image.

    5. Adjust the collision polygons and crop. (don't touch the origin point)

    6. After that I had to click the Make 1:1 to fix the scale.