R0J0hound's Forum Posts

  • That's pretty much how you'd do it using the physics behavior. Set gravity to 0 and use linear damping to slow the balls down over time. One complaint I've seen is the collisions can be spongy at times. You can improve that by setting the iterations up higher in the physics settings.

    You could use the bullet behavior instead but multiple balls bouncing off each other won't be handled well.

    A third way would be to do to custom made physics. This is the very advanced approach, but can yield more precise physics. The ultimate would be to impliment 3D physics for the balls.

  • I guess one way would be to place a sprite down for every note and play each one as another sprite moves over them.

    you could even use one sound and change the frequencies.

    Here's my experiment on the matter:

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

    you could do it in a more programmy way using an array too i suppose.

  • There's nothing to it. Any capx would work. What you see is the viewport.

  • neoneper

    The plugin has expressions for isometric to layout position, but I guess it would be good to have conversions going the other way. For now here's the equations to do it:

    For a layout position x,y, you can find the isometric position ix, iy with this:

    ix = 0.5*x+y+iz-400

    iy = -0.5*x+y+iz-80

    You need to specify an isometric z: iz

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess you would have to count it manually. I can't really think of a use for being able to know the number of animations when your game is running.

  • 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

  • I don't understand. If one can be made, just add another.