R0J0hound's Recent Forum Activity

  • it's basically a perspective transform, but it can be tricky to get it to match an effect by just tweaking. For the mode7 effect there's a capx that has the math worked out but it's not too pretty.

    A approximation would be to take a snapshot of just the ground with the effect applied. Measure the width in the middle and at the top. Then taking an object's y position you can calculate the scale with:

    Scale=lerp(widthtop/widthmid, 1, y/240)

    Or instead of 240, half the screen height.

  • neoneper

    I guess I don't understand what you're going for exactly.

    In that example there are two layers. One is a top view, and the other takes the top view positions and treats them as isometric positions.

    What I gathered from your question you wanted to be able to click on the isometric view and have that position converted to the map view. I that's the case then the equations I gave should do it.

    On mouse click

    --- player find path to 0.5*mouse.x+Mouse.y-400, -0.5*mouse.x+Mouse.y-80

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.