optimise many monsters obstacle map, &other stuff

Get help using Construct 2

Post » Mon Sep 30, 2013 11:50 am

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 :

http://www.trotar.fr/game/index.html

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
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Tue Oct 01, 2013 10:20 am

well, i guess i'll be on my own.
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Wed Nov 13, 2013 5:25 pm

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.
Regards;
-Wind.
B
17
S
4
G
1
Posts: 332
Reputation: 3,099


Return to How do I....?

Who is online

Users browsing this forum: newday198913, rotacak and 7 guests