Enemy out of bound



  • Hi,

    I was stuck in a room cause an enemy was out of bound.
    That was my best run :’(

    I guess you need to add something to check if an enemy is not in the playable area and then kill or teleport it.

    You can see a screen-shot below, with the enemy OOB on the top left.

    Your game is great, you made a great job.

    Enemy out of bound


  • LDG

    Hi @duff, welcome to the forum :)

    Thanks for the heads up. I could’ve sworn that I eliminated that bug, but it keeps haunting me. :)

    I like your suggestion about killing or teleporting the enemy when it gets stuck, that sounds like a great fallback since it seems that I can’t prevent the collisions from pushing the entities into the walls on occasion.

    Glad you’re enjoying the game and sorry that this bug ruined your run!



  • Hi @geoffb

    Trust me, I know it really well ^^
    Bugs can be a nightmare, so sometimes add a “dirty” tricks can be a good thing for mental health :-)
    and of course to save time.

    I was stuck one more time, but i think this time, it’s not because an enemy was OOB.
    Your algo for open/close door seems to not work properly.
    I suggest that you implement a thing like a watchdog (i don’t know if you can do that in javascript/html5, it’s not a language that i know)

    Maybe something like this can do the trick :

    Room entrance
      while player is in room AND door is closed
          wait 10s // you must be able to interrupt this when player leaves the room
          bound = get area bound
          enemyList = get enemy list
          for each enemy in enemyList
            if enemy is alive AND is not in area bound // or stuck
              Kill / teleport/ ....
            end If
          end for
          call your function that open/close door
      end while
    

    And change a little bit the game because i think the problem come from the green enemy which can be in the floor (Muck monster), if we don’t know that it is here, the door is open but i saw many times with other kind of enemy the same things and i guess it’s a bug.
    I think let door closed while all enemy is not die can avoid this kind of bug.
    This, plus the “watchdog” is more easy to do than found where is the bug, so if i was you, i will do that and when you will have the time, try to find your bug.


  • Tiger Hat

    I’ve had the same problem >_>
    Screenshot


  • Patron

    @T2norway said:

    I’ve had the same problem >_>
    Screenshot

    Yeah, but your screenshot is way cooler!
    (sorry @duff, T2 is the media guy)


  • Tiger Hat

    Yeah, but your screenshot is way cooler!
    (sorry @duff, T2 is the media guy)

    Arrows for the win!



  • @Josue

    My game run under Linux and @t2norway under Mac os.
    I guess, now you know that, you will be more generous for my note :-)


  • Patron

    @duff said:

    @Josue

    My game run under Linux and @t2norway under Mac os.
    I guess, now you know that, you will be more generous for my note :-)

    Nope, you’ve got gimp and Inkscape!
    =P


  • LDG

    @T2norway
    Yikes, sorry that happened to you as well.

    @duff
    Thanks for the suggestions, I’ll definitely try to get this nailed down once and for all soon.


Log in to reply