MultipleChoice's Forum Posts

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

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

  • lennaert : Nice solution. I would love to see, how you did the z-index part. On the other hand I am not sure you can handle walls/furniture on different levels colliding/overlapping with both players at the same time, when the lower one has to pass through, but not the upper one. Maybe yes, then it would be even more exciting to see your solution. I added the multilayer-feature aswell, as you noted. Feel free to optimize or comment on anything you notice.

    Everade: Did you take a look at my stuff at all? I really hope it helps you man (Wenn ihr hilfe gebrauchen könnt, meldet euch einfach mal gerne bei mir...)

    Passing beneath/above object (being on different floors)

    Finally all the basic features are included. Not using solid-behavior or pushout absicly at all, since you have to be able to pass under walls, which must be colliding with the player on the same floor. (There still can be some reduced even now, eg "guides"). Players can just swap places, like with the wall being put in the foreground or background according to any layers, which is not implemented yet, but easy from here.

    No Solids

    Obviously, you can work more with collisions, also adding solid behavior -- which is more stable and might be necessary especially on slow devices to prevent passing through walls when slowing down to few ticks per sec. --, and just use this method when both players are on different floors, to disable solid temporarily, but enable the collision-control-lock. But I don't know, how many objects you are going to end up with.. it's always good not to have too many collisions, especially, if you plan to play it on phones/tablets. So its a balancing...

    Formula, Family and Harmony

    Also, it is just a sketch, I'm sure it can be optimized a bit. Sorry for any longer Formula, but I try to work with families and relative values, to build up a proper engine with all object types are being easily replaced or added easily, without further coding basically, so anyone can use it to start with. Of course, most of them will be registered, to provide some more transparency, (as I did already in this file). I am also thinking of putting them as a collection online somewhere in this forum, since I really enjoy developing different ones and got a bunch of them by now.

    CONTROL KEYS:

    Player A = AWSD

    player B = L/R/UP-ARROWS

  • Radulepy https://www.scirra.com/manual/143/gamepad <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    and apply 8-directional movement behavior for the car object:

    https://www.scirra.com/manual/87/8-direction

    peace

  • Everade, lennaert, newt

    Just for fun, I enhanced the layer solution. Now the "engine" has all features you need.

    • You can easily register any new elevation type (e. g. ladder, as I already added, or elevator)
    • Different types of walls or furniture (with any size)

    Of course the same can be done with overlapping, but I restricted collision-checks for the 8-dir-behavior and collision checks in the code as much, as I could.

    What do you guys think about it? If there is any part, that can be solved better, still working correctly, I would be keen to know!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • < guannstar :

  • < Radulepy One way of doing it...

  • marcel1980 : you can get it smooth, just not perfect...

    Still, no idea, when there is a chance to get rid of it completely. The problem has been there for a while now, but was not much noticed, and I preferred coding instead of writing my post about it. It took me a while

  • nice

  • Unnatural20: no idea of an ideal solution, but I export always 44.1 kHz, 16bit, stereo (2chan) (CD standard btw). Never had any issues, use music and foley-sounds intensively. I still have the feeleng, it's related...

    I don't think .mp3, .ogg and all that can be 1 channel mono, so that can def. cause problems.

    So if you guys try to save your wave-files or convert it in this Format helps?

  • Everade : Since I actually never did an isometric engine, I found it interesting to try out, if my proposal works fine.

    So here it is:

    * No Variables needed

    * Good for you to Layout, since you can build your floors on different layers, or even using more layer per floor

    * Complete Floors will set to solid off, and if you even switch off collisions of those families, you will save a lot of performance (way less collision-tests)

    The only issue you have to solve is when the player turns around after colliding with the stairs (on the stairs, without entering the top floor. Now that messes up the right floor actually. That can be fixed of course, but since its way beyond your issue...

    Take a look at the capx-file and Enjoy!