R0J0hound's Recent Forum Activity

  • The idea isn't super difficult but i guess explaining it with text and implementing it is tricky.

    1. we first need to know if the player is colliding with a tilemap. This is dead simple with one event.

    2. we need to know what tiles the player is overlapping. This example here does that:

    viewtopic.php?f=147&t=123332&p=877612&hilit=overlapping+tiles#p877612

    3. So now we have a list of tiles overlapping the player. Here's a collection of ideas that search gives to get a rough collision point between two objects:

    how-do-i-get-coordinates-of-span-class-posthilit-collision-span_p983039?#p983039

    Guess one idea would be to get an average of all the tiles and use that.

    Here's an idea to take the example from two and only use the part of the tile that's overlapping:

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

    works well if the sprite is only slightly overlapping the tiles

  • [quote:2qlqyoaa]one question though, how do I actually pick by UID? I can add System.Object With UID(Function.Param(0)) Exists", but that doesn't seem right.

    The array object has a pick by uid condition.

  • That's a handy idea.

  • That's still acceptable in my opinion. There's probably some more details about it in ashley's blog or something. What it comes to is if you need to measure a timeframe that matches the real clock, use wallclocktime.

  • Good point, could be interesting if changes in the code could reflect in the editor.

    That's not really possible since you can do things in js/c that don't translate directly to events.

    The modular idea sounds good but it'll have to wait to see how it works. For construct this is tricky because events are all over the place, so it's hard to handle all cases.

  • Try Construct 3

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

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