KeeghanM's Forum Posts

  • Want to extend a huge thank you to dop2000 who has helped me work out a solution for the combat system.

    It all came down to one Condition.

    And the solution, just use some maths!

    Well, now I can move on... put it in the past... Ice my head from all the banging on tables... and start implementing magic!

  • Something I have been stuck on, figured now that I have a solution it would be helpful to share

    Category: "Picking an Instance" or "General"

    Question: How do i check for overlap, regardless of collision enabled/disabled.

    Link to the answer: Specific post with commented CAPX

  • dop2000 I'll have to experiment with using the pick all by evaluate, and compare it to how I've now got it. See which performance is better.

    I've got a demo CAPX (LINK) working with the following code, will now port to my actual game and test performance.

    Thanks for all your help.

  • I'm sure you can find a workaround. If your playerMeleeRange and Enemies objects are close to a circle shape, then instead of the overlapping check you can do something like this:

    > Enemies pick nearest to playerMeleeRange.x, playerMeleeRange.y
      distance(playerMeleeRange.x, playerMeleeRange.y, Enemies.x, Enemies.y)<=(playerMeleeRange.width/2 + Enemies.width/2)
    [/code:3d1sy4x5]
    
    Or you can pin an invisible sprite with collision:enabled to your Enemies and check overlapping with that sprite.
    

    I think I'll have to go with the first solution.. use some maths. Your example would work for testing one.. But I'll need to come up with a solution that checks multiple. Thinking a For Each and Is On Screen might do the trick. Will update this thread when I find a solution.

  • Ashley appreciate the response! (p.s happy birthday)

    I'm disabling collisions due to the isometric display, have to be able to walk behind things. The performance is not an issue, trust me I love the perfomance of this engine. I have a terrible 2GHZ Cpu and 4GB Ram laptop.. even with 1000 entities being sorted every tick I get 45 FPS.

    Unfortunately I need a way to detect overlapping of objects while the collision is off on one of them. Is there anyway to do this natively? Or will I need to write my own plugin to handle it?

  • *insert expletive here*

    Guess I need to find a workaround, or a plugin that does the same thing minus the need for collision enabled. I can feel my game grinding to a halt already...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok dop2000 , small update. It's to do with the "Collision" Property of the Goblin (or anything in the family)

    The overlapping only detects when collision is TRUE.

    Never if it's FALSE.

    Made a very small CAPX to demonstrate this. https://drive.google.com/open?id=0B5cW0 ... G5iNDdwbXM

    In my opinion this is a bug, Overlapping should be a simple pixel calculation nothing to do with collisions.. thats what the "On collision" event is for.

    Ashley can you confirm if this is the expected behavior? If it is, what is the suggestion to do what I want, detect overlap regardless of "Collsion" Property?

  • I might be able to share the CAPX privately with you, I can't remove enough stuff to make it shareable here.

    I know the two threads you mentioned, I read both.

    There is only one playerMeleeRange in the world. And as said I tried removing the goblin (the one that always has issues) from the family and just checking overlap against that (again only one instance). Nada.

  • Anyone got a working link for this?

  • You could try just setting the position to that imagepoints X & Y

    Now it's origin is sitting at that point, so you can move around that.

  • Not sure if this is a bug, or me doing something stupid.

    Probably the latter.

    I have an overlay object, and I want to detect whether it's overlapping any member of a family.

    The members of the family are always moving layers in the project, however the overlay is always on a single layer above all the rest.

    But its weird, If I have three members of the family, each spaced out around the layout. It will sometimes detect the overlap, and sometimes not. On one object it NEVER does. On one it ALWAYS does, and on the other it depends whether my Y value is greater or lower than the Objects Y...

    Heres the very simple code I'm using:

    And here you can see the result (Click for full size):

    The green circle is clearly over the goblin.

    Things I have checked:

    Collisions enabled / disabled

    In family /not in family

    same layer / different layer

    visible/invisible

    100% Opacity / 50% Opacity

    My entire combat system is hanging on this overlapping, I narrowed all my bugs down to this one thing. And even supersimplified as you saw above with just a single Event-Action ... Still. Not. Working.

    The last 2 days of my life have been trying to work this out.. please someone help me before I go crazy.

  • And that marks the completion of the save system! I'm sure some bugs will surface, but from my testing so far, it seems to hold up pretty well.

    Unfortunately I somehow broke the combat system, so now for the 3rd time I will be redoing the combat. Fun!

  • I have downloaded caps and from the first view its looks interesting. However the scirra arcade example doesn't work (not for Chrome and not for FireFox)

    Hmmm, you're right. That's annoying. Works in them all running from the capx.. wonder why it's not working on the Arcade. Ah well, I'll remove it.

  • Set myself a little challenge to see if I could make something akin to the classic Doom or Wolfenstein rendering systems.

    I accomplished this with a raycast technique. Every tick I have a sprite rotate through the FOV, going up 1 degree of angle per loop iteration. It grows until it touches a wall. At which case it sets one of the vertical "Pixels" to a certain height based on the distance to the wall, and then also a colour.

    Because it uses a while loop to grow until it touches a wall.... The performance lags when the walls are far away (like long corridors). I'm sure there are ways to fix this... increase the growth steps... or some other method of checking the distance.. But it seems to be OK.

    Heres what mine looks like:

    And here is the method code:

    If you want to have a walk around, I have uploaded it to the Scirra Arcade. *NOPE, doesn't work in the arcade, refuses to load*

    You can also get the capx here!

    All in all this took me about 2 hours to create. I'm sure there's much much better ways to do this, but I thought it was a fun wee challenge and I'm pretty happy with how it turned out!

    Lemme know your thoughts, and how you would go about doing this! Always interested in hearing other peoples ideas.

  • megatronix I haven't had any issues with the current script. I did have bugs like wall glitching and getting stuck. But I've been testing this current method for 2 months now.. Seems solid.

    The idea is that as soon as I contact, I set speed to 0. Then once I release the input key, I set the speed back. No getting stuck! I also have a strict 4 directional movement, so it could be to do with that...

    The code is this: