MultipleChoice's Recent Forum Activity

  • Glad!

  • Great example, !

  • yeah, it never reaches the point, like the turtle and Achilles...

    nXFiles :

    you need a destination point, which must not be constantly relative to your Sprite.X.

    Since lerp sets SpriteX every time adds (StartX-TargetX+50*0.1) to your Sprite's position. Always the same amount, constantly, whoosh

    Think of a dog, with a stick attached to the back, having a sausage hanging down in front of the nose.. or just the tail catching dog.. moving infinitely toward it, but never getting grab of it.

    Try cosp by the way, eases in and out, works same way: cosp(Sprite.X, TargetX, 0.1)

    Target can be mouse-pointer X, or screen corner, or whatever...

  • @skyhunter93 , PaulGhs , Wertle

    The possibly simplest way to achieve this:

  • branolia You need to decide, which look you want to have. 1st person-3d is not an option in c2 (no 3d engine), platformer is not really best for this genre, so you end up with top down or Isometric view (like diablo, ultima, starcraft, wow,....) is possible even multiplayer.

    Take a look, this might be an option for you:

    I just this this for another Post here:

    Not finished yet, so check back there from time to time, to see improvement, if you like.

    (You can use it to start with as you please.)

  • If you run your preview as "Debug layout" , you can see the collisions there. also polygon-checks. very useful for your task, keep an eye on that!

    So what do you have there? Like a rough number? maybe a screenshot is easyest, of that part of the screen is enough

  • Radulepy Of course, like this, to give you a kick start

    Have fun!

  • I had all the journey like for half a year studying this. If you think, something does not work or dos not help, or you cant solve it, you know where to find me

    I would have loved to have help.. I had to read this all and try out, test on phnes so on. But it helped massively, so don'T worry too much. How man collision checks do you have so far?

  • @Facet : [quote:4ip79otq]huge loop for checkind what shoule be solid, what not

    well, if you have all stuff disabled at start, and just start selecting the ones, where collision is actually on, then checking, if they are off-screen, actually not at all

  • Hi Facet,

    it's hard work to find it all out, but possible in all these forums and documentations, tutorials. There are great guide here!

    First of all with families and collision-checks, you can take a look at this: download/file.php?id=10965

    (see post here: isometric-multiple-floors_t121850?start=30)

    I managed to reduce a lot of collisions here, not done yet. You have to be really informed and clever and read a lot, but I managed to work my way through in the past.

    Anyone, who can enhance the list with tips, you are very welcome to do so!

    Reducing collisions (collision checks) hardcore:

    • reduce not just off screen objects, but also objects further away then a specific distance > n, take care though, if you are too low, you might skip the object without colliding, if frame rate drops too much
    • disable not just collisions, but solid behavior as well. Since if you don't, your platform/8-dir-movement behavior gonna check ALL SOLIDS all the time. (since that's what they have to do to work as such on). Collisions also are good to be disabled, since when you check for collisions, they still count, if collision is on. so solid and collisions both on disabled, is important!
    • Turn off also solid engines, platform, 8-dir behaviors (all properly, not just ignore input set disabled, even here collision off, turn it on if you are in the appropriate distance, as described) or path finding (do that as rarely, as needed) and switch on, when approximately needed.
    • Destroy all objects you don't need. Maybe at the beginning already, stuff you need for structure, layout, but not in the game, or just at the very start.

    Use any collision-check-events wisely:

    (like "on collision", "when overlapping" (checks every tick for collision, a killer)

    • Try to abandon unnecessary collision checks, e.g with approximately round (e.g. hexagon) objects, where you can check distance, or squares, where you can compare the "CollsionBox" as coordinates
    • In your code, if you have the exact same collision check twice, it checks twice, thus multiplying your collision checks with times two each tick.. which is a lot.. usually, you should have a transparent object-oriented architecture, but in this case reduce all possible collisions you need to just one event each tick!

    ____________________________________________

    • also place them at the end of your chains, so instead of starting with "player > on collision with Object "wall", if "wall.LayerNumber=player.LayerNumber" rather "Wall.LayerNumber=player.LayerNumber" first, then "player > on collision with Object "Wall". This way, you reduce the objects actually getting checked for collisions. If you have a good chain, (with screen, distance and other conditions you can narrow down the selected possible colliding objects) you can have 2-3 collisions instead of 100.

    NOTE TO THE LAST ENTRY: I just read this, but to be honest, it was written for 155.. I am not sure, since I managed to reduce the displayed collision checks by a lot, and I am quite sure, it helped. Of course you need to be careful... Anyone knows about this more specifically? Now I'm confused <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    ____________________________________________

    Try all that, first the easyest thing, and you will lick blood <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> Like I did. Ending up with only 10% of the previous collision-checks, than before my optimizing trip (on this game actually: http://www.exitthegame.eu (you can skip through the levels with CTRL+ALT+SHIFT+N, pressed in game level. TAKE A LOOK AT LEVEL 12!)

    Though its not optimal, since I would start completely different today, it was my first game ever.. so I suffered badly with collision check. Used to have over 100.000, peaks even 200-300.000, managed to lower it down to around 1200, peaks at 2800-3500. But I have physics (also checking for each possible collision, multiplying), rocks (platform behavior 5 rocks is nearly 5 times the check), other players running around...

    Additional general advices:

    • Use in general rather tile maps, also background tiles, where you can do that instead of placing multiple sprites as a tile (like I did in exit mostly). Try to redraw everything only when needed with e. g. trigger once (instead of every tick, also the case, if condition left empty)
    • Avoid huge transparent stuff overlaying other things...
    • Set your background-layer "clear background"-option to "No", pixel rounding on (interpolation to point) helps as well (but is problematic)...

    Well, that's it for the first.. I might add some things, if I remember anything else, but that's pretty much I know <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Kyatric : You seem to be a crack, and might correct me easily, or give us some more tips on the fly? Wanna loose bad habits and learn <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> Please take a look. Thanks!

    Hope it helps. If you have any further questions to this, just ask.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • fawaznammoura Try this... is that alright?

    Basically, the "drop drag & drop" seems to be abrupt. it can be solved also with detecting the speed and angle of your movement, and apply it after drop, to have a continuous movement and slowdown. But I think, this simple trick might do the job just as good.

  • hm.. no idea.. if you can provide a capx, maybe?

MultipleChoice's avatar

MultipleChoice

Member since 25 Oct, 2013

None one is following MultipleChoice yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies