optimise many monsters obstacle map, &other stuff

0 favourites
  • 3 posts
From the Asset Store
Obstacle Impacts and Cartoon voices, will makes your game more funny!
  • i ve got a question on the pathfinding behavior.

    i'm working on a top down shooter, and i have a lot of monster using this behavior.

    when i open a door, or when i break a wall, i need to regenerate the obstacle map of all monster, and its pretty cpu intensive, so i get some freeze when it happens.

    is there a way to pick only monster concerned by this changement of obstacle map and regenerate only them ?

    (for example, others monsters still captured in another room doesnt need to be regenerate)

    another issue i have, is when i die and restard layout, some monsters still use the ancient map obstacle and are able to go through doors instead of regenerate the obstacle map correctly and behave like the layout is runned for the first time. dont understand why.

    im also looking a way to make ennemy outisde the screen or far from the player to be "asleep" so i can release some cpu charge.

    anyway i have a lot of questions on many other points, so if someone is ok to help me with this project, that would be awesome.

    here is the last build of the game :


    feel free to ask me if you have any question on how it works.

    move : zqsd

    shoot : left click

    special power : right click

    reload : R or click when magazine empty

    toggle inventory : I

    pause : space

    revive : enter

    shift : aim long distance

  • well, i guess i'll be on my own.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello manukeo,

    I have been working on pathfing intensive game myself and saw your post as I was searching for clues.

    I noticed that if you use a big layout, regenerating obstacle map takes long time. But with small layouts, it's very fast. If you could break down your levels into smaller chunks, it may help. Otherwise, you are stuck as I am. But ashley has a to-do-list which includes partial obstacle map regeneration, which will hopefully solve our mutual problem. Unfortunately, my game doesn't work with smaller layouts, hopefully yours will.

    The entity-based regeneration of obstacle map is under works I believe.

    About the re-start with old map issue, I am fairly sure you can fix it with your events. Restarting has some tricks to it, I am sure you are skipping a line or sth. Just regenerate the map on restart and it should fix.

    About enemies outside view sleeping, it really seems smaller layouts are your ultimate solution. But you shouldn't worry about enemies outside your view dropping performance. If it's an issue, just don't create them untill player aproaches close to them.

    Hope you keep working on your project.



Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)