R0J0hound's Recent Forum Activity

  • Sprite.ResumeAnim() works. If it's an action with no parameters it needs the () so maybe that's what was missing.

    For the 2nd edit, you can change the function from

    def save(filename, *objtypes):

    to

    def save(filename, objtypes):

    to make it use a list.

    Then call the function with:

    save("myfile.txt", [sprite,sprite2])

    instead of

    save("myfile.txt", sprite,sprite2)

  • It's basically just the view you have of your layout. If your layout was drawn out on the ground, and you looked at it through a camera. The camera would be the viewport.

  • You can do it with the "erase tile" action. You specify the tile to erase by it's column and row on the tilemap. If you want to delete at tile at an x and y position, the tilemap object has expressions to convert from an x, y to column and row.

    To drag and drop I think you'll have to create a sprite at the tile you clicked on, erase the tile, then drag the sprite around. When you drop, you'd set the tile the sprite was over, then destroy the sprite. I don't have time currently, but it's an idea you could play around with.

  • UrsuPolar

    There's nothing new to report, I lost interest coding it pretty quick. The Krestle Moon website has a slightly modified version of it with a few things added, but that's about it. I got it rendering without webgl somewhere on my pc, but I haven't gone through the trouble of updating the download, because it breaks compatibility with the modified version on top of not being finished either.

  • You don't destroy it, you use the tilemap's erase tile action to remove individual tiles. Another good reason to use the tilemap object instead of individual sprites for the tiles is it runs a lot faster.

  • Ok, here's the general purpose case with any ellipse bouncing on the floor with friction.

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

    Any other shape can work too, it just requires mass, inertia, and contact point calculations.

  • You can control the speed by changing the vx,vy, and w variables directly, but I guess that's enough about that.

    That formula only works for balls, and even that last link you posted will only work for balls.

    You could go for something more general purpose like this:

    r0j0-s-experiments_p955579?#p955579

    And the tutorial it was based on:

    http://allenchou.net/game-physics-series/

    You could also read here for info on how the box2d or chipmunk libraries work and use that.

    http://myselph.de/gamePhysics/index.html

    There's also this classic reference, but I guess it doesn't take into account friction:

    http://chrishecker.com/Rigid_body_dynamics

    In summery you either need to follow one of those, derive your own, or use a preexisting solution such as box2d or chipmunk. The first two will require you to ramp up your math skills.

    Edit:

    this link is also helpful:

    http://www.myphysicslab.com/collision.html

    edit2:

    It seems to have the math derived here:

    https://en.wikipedia.org/wiki/Collision_response

  • There are many different ways. Here's one:

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

    It's divided into multiple passes over the grid

    The first pass creates a hill using basically a sine wave,

    Then in that hill it creates a rock layer using a sine wave, a parabola, and some random noise with a falloff with y.

    It also speckles some gold below a certain depth with some random noise with low probability.

    The second pass digs out caves using bilinear interpolation over a smaller array of random values.

    The third pass removes single tile wide edges, and changes dirt to grass if on top, and gives it a chance to grown down further.

    This doesn't even scratch the surface of things you can do, and you can even get entirely different terrains by just tweaking numbers.

  • It doesn't work because the article you used made typos when writing the equations. Look at the paper it references for the correct formula. Also there's no need to use the custom movement behavior, it adds nothing but making the equations longer.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't understand. If one can be made, just add another.

  • Maybe -1?

  • It isn't the 6th sprite picked, it's the 6th sprite regardless.