R0J0hound's Forum Posts

  • 1.

    That's not wrong. It's just in scientific notation. The e-02 at the end means move the decimal point left two numbers.

    2.

    Time and wallClockTime will be more or less the same except.

    WallClockTime is always advancing even from one event to the other.

    Time on the other hand updates only once per frame.

    So if you compare the two at the top of the event sheet they will be about the same.

    Now time is incremented by dt every frame, but dt is capped at I think 10fps so if the game ever dips below 10fps time will lag behind wallClockTime.

  • Search for "bitwise" with the forum search. The method is called bitwise tilemaps, and is usually done with terrain, but it would work perfect for roads.

  • If you want to create an effect like that you can probably look up on google for the math. You could also use the forum search to see an effect already exists that does that.

  • It might look a bit better than than the js but still. The resulting code will be very much dependent on their runtime and most things that would be possible to tweak would be better made into a plugin I'd think.

  • Search should give a few ways. In the case of a tilemap you first need to know the tiles the Sprite is overlapping. To help with searching, I've made a capx that does that.

    After that the location the two objects are overlapping depends on the shapes of the objects. Keep in mind two objects can overlap at multiple places. One simple way could be to use the midpoint between the two objects, which works well if the objects are the same size and shape. There are also some more involved ways, but search should give more info about those.

  • Probably not at all. I mean what would most users do with such source code? It won't look very readable since a lot of things would have to be done in c to match the events. It's kind of like manipulating the js of an exported project if it wasn't obfuscated.

    What get's me from watching the second video is it looks like things are still have the same design they had from Klik n play.

  • That one opened.

    Replace the line:

    zorder.sort()

    with

    zorder=sorted(zorder, key=lambda i: i[0])

    Then in a few lines below it loops over zorder. Add a check if obj is None, and continue if it is.

    for pair in zorder:
    		obj=pair[1]
    		if obj is None:
    			continue[/code:2trboehs]
    
    That seems to work.
  • It would help to see what you have, but basically you could do this:

    Then if a wall is in the way you could make them jump too.

  • That latest cap gives an error when opening.

    "An invalid object in a condition was referenced"

    I don't have time currently to dive into the cap file and find where the issue is. Basically it would involve opening the cap in python with capreader, going to where the object types are listed to get all the oids, then going through the event section and verifying the oid of every event is in the list.

    I've never enjoyed the python error reporting in CC, it's kind of broken since it only gives an error and doesn't say where it happens. The most immediate idea that comes to mind is since python is case sensitive you might get errors like that if the capitalization isn't the same.

  • I didn't look at your capx, but here's on possibility:

    Basically the first step is do a laser. Here used a sprite that is stretched from the gun to the wall. Then a new laser is created at the end and it's angle is set to the reflecting angle. In the link the direction is stored as a x difference and a y difference, then to bounce against a vertical wall the dx is negated. In a similar way horizontal walls are handled. The actual angle can be calculated with the angle expression.

  • Yttermayn

    The gist of it is it allows you to draw stuff. There is no documentation other than when adding actions and such there are little descriptions. Overall most of it is self explanatory imo, and it's simple enough to test things to see what they do.

  • Well, there is no plugin for it, and I'd do it all with events. The main difference is it would allow the ball to rotate in all directions like a real pool ball would, so you could get motion near exactly like real pool balls. It would just be the motion, to make the ball look like it's rotating that way is another thing entirely. Look at the wikipedia page about impulse to see some of the math involved.

  • bloodshot

    You can do that with the "set velocity" action, select polar and the first value will be angle of motion and the second speed.

  • Try Construct 3

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

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