Scripts / ZOMBIE - AI Script - Strange behavior

Author
Message
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 22nd Nov 2016 22:14 Edited at: 25th Nov 2016 22:34
Help, Help someone!!! Should this be under bugs? Anyone find the same:

My Zombies are NUTS!

1) Sometimes they attack (ok)
2) Sometimes they run in the same place or do nothing (TREADMILL ZOMBIES)
3) Sometimes they run away from the gamer (CHICKEN ZOMBIES)
4) Sometimes they just bash their sculls against the wall and when killed they die fused into walls. (HALF TELEPORTING ZOMBIES)

Using:

Male Zombie Office
ai_fastzombie.lua

Setting:
View cone angle 0
View range 0 (this is infinite ...is it not)

- basic script not altered

Seeing this also with the Female Goth Zombie

Should each Zombie have its own Lua AI script assigned to it?
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Nov 2016 23:10
Where are the zombies located in your map?

On the terrain, on an object, in an object?

There are some locations and situations where AI just does not work, can you post a picture so I can see if its that?

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 23rd Nov 2016 16:29
Hello,

There is no sense in posting pictures. The Zombi problems are random. So I would be posting all day.

TERRAIN FLAT: (Little to no grass) I have noticed any terrain deviation is not good for Zombie movements.
DIRECTION: Zombies FACE the player, If they do not then you get to shoot them in the back of the head as the AI seems to be set to "NOT SEE" the player.

First level - Outside - At first some zombies do what the should - namely attack - then as the game proceeds they seem to not react as they did at the beginning of the game, in this case just FREEZE. Less strange behaviours 2/3 listed above.

Second Level: Most pressing scenario : - Inside - a tunnel totally flat terrain with ground sandy. Just 3 zombies at the end of a tunnel. Spread out.

1) Will not move FROZEN (office Z)
2) Will not move just ROCKS BACK AND FORTH (GOTH Z) - Another Goth Z in a room works fine.
3) I runs away. (Office Z) - Another Office Z in a room works fine and hall kind of work.

I believe, if I put a zombie too close to a cement tunnel wall it will turn around and bash against it.

I thought it would help to put down a "marker path" to get Zombies started in the direction of the player, (seemed logical)but this seems to not work in scenario two at all.

I will try different Zombies, but I don't think this will help.

Thanks for posting
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 23rd Nov 2016 19:38 Edited at: 23rd Nov 2016 19:54
How to reproduce some of the strange Zombie Problems in my post here yourself:

1) Create a new level no terrain flat.
2) From ENTITY LIBRARY ----> BRIDGES -----TUNNEL entity
3) Create the following pattern with 4 duplicate TUNNEl entity's. (CROSS CENTER OPEN)

Player ---> +

4) Put 3 or 4 Zombies (Office - Fast) or Goth Zombie (ENTITY LIBRARY ---->CHARACTERS------->Zombies) into the centre.)
Or/and Just inside the tunnel. Run the level to let the Zombi madness run. (Choose any other Zombies - The same results)

You should see:

1) Bad Zombi = SOME WILL RUN AND FACE THE WALL..... YOU have been very bad in school! I don't want to kill them for this.
2) What do we do Zombies?!!! Run away, huddled in a clump for comfort?
3) Run away Zombie....or Freeze in place and just look at you?

If someone programmed arms you could slap them to death.
You can choose a weapon, but really what is the point the Zombies are nothing more than decoration as the AI does little.

Does someone know what is going on? or how to fix some of this?

Thanks...
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Nov 2016 19:46
AI doesnt work inside very well, you must open the fpe file for any areas/objects the AI will walk on/in and add
Quote: "forcesimpleobstacle = 3"
in there.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 23rd Nov 2016 21:18
Ok, I want to try (smallg) and see what happens where exactly should I put "forcesimpleobstacle = 3:"

Given "fpe file" of tunnel entity I am testing bellow:

=================================
;header
desc = Tunnel

;visualinfo
textured = Tunnel_D.dds
effect = effectbank\reloaded\entity_basic.fx
castshadow = 0

;ai
aimain = default.lua

;orientation
model = Tunnel.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
scale = 0
fixnewy = 0
defaultstatic = 1
materialindex = 1
collisionmode = 1
strength = 0
isimmobile = 1
soundset =
soundset1 =

;Animationinfo
animmax = 0
anim0 = 0,0
============================================

Thanks
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 23rd Nov 2016 21:40
When I say post a picture, I don't mean of them bugging, I mean a picture of your editor, so I can see where thewy are placed in relation to other objects, as smallg said AI can be funny around certain objects. That's why I asked for a picture, that way we can point at the exact thing that may be stopping the AI working and day there it is.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Nov 2016 21:51
it doesnt matter where you place it as long as it's on a new line, the fpe is only structured for visual reasons, all lines are read regardless.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 23rd Nov 2016 22:23 Edited at: 23rd Nov 2016 22:33
Hello,

I think my point is more than well illustrated with the default tunnel scenario which takes less than 2 minutes to set up for our initial discussion. The cross structure with the Tunnel. You will see Zombies heads go through concrete walls and such. Get stuck at the pillars. If shot embed themselves in walls.

I had a look at the ASYLUM ----> fpe WARD (Long) and @smallg ...I can confirm that this models FPE does indeed have the command "forcesimpleobstacle = 3:" at the end of ; orientation strings in this model. Exactly like you say.

I tried adding this in the Tunnel model FPE scrip.....No go. Nothing improved.
However, this was a new one on me. One Zombie through another Zombie??!! This is pretty bad.... useless.

After more than a year LOOK AT MR_Holaa(Fin) posts here on ZOMBI AI:

https://steamcommunity.com/app/266310/discussions/0/217691032440255698/#c217691032442034851

I don't know where he put the extra lines of script. New, to LUA. So if someone can elaborate/ improved on Zombies AI (Fast LUA) please post here. They really, really suck inside structures.

I agree with what he said, you can't commit to a project with this kind of useless code. Still not resolved after so long. Seems like more than a year now.

Thanks
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Nov 2016 01:07 Edited at: 24th Nov 2016 01:18
OK, I've tried what you listed.

The office zombies seem to work fine for me, they have the occasional hook up on corners, and they stop running if you get a certain distance from them, that's normal.

At first the goth zombies occasionally ran the wrong way, but i noticed the goth zombie has offy = -3 and if you change it to offy = -1 the goth zombie runs and detects you a lot betterr (make sure to delete the mobzombie1.dbo and restart after changing the fpe)

I also had to add forcesimpleobstacle = 3 to the tunnel.fpe, but they worked fine after that.

When you changed the tunnel.fpe and added forcesimpleobstacle = 3 did you delete tunnel.dbo and restart gameguru? Some changes won't take effect until you delete the dbo file and restart the client.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 24th Nov 2016 17:52
Hello @Belidos,

Very good....You are 100% right for the model setup...I made the changes you suggested:

Summary:

1) off = -3 to off - 1 (Goth Zombie fpe) Although I did not note deviation you say. Sometimes Zombies veer left or right before attacking. This might be on purpose.
2) deleted "mobzombie1.dbo" ---- How does this get messed up?
3) Restart GG
4) forcesimpleobstacle = 3 placed in the entity tunnel.fpe

@Belidos. - Fast Zombies will indeed attack you now when they "see" you Goth/Office in all parts of the cross tunnel with changes.

================================================

However, In my main game there is little/no change. Same cross setup with the tunnels. Same changes. The zombies in the first main tunnel work now. (facing the player).

But those in the centre just "treadmill" and those in the three other sides do nothing but "freeze in place" .....Stuck with Office/Gotth as tests.

I tried to delete other mobzombie.dbo's in Zombies directory. i assume they rewrite fresh copies.

EXAMPLE:

mobzombie3.dbo
mobzombie5.dbo
mobzombie8.dbo

This does nothing. I don't understand why the model setup here works great now, but the original one I built does not.

Does someone have any suggestions as to possible .dbo's messed up or something extra to try? The terrain is flat and I painted it with sand texture. I can't see how this matters.

*** It just occurred to me to try to deleteI the tunnel.dbo.***
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Nov 2016 19:01
The .dbo is a gameguru internal file, its created every time you use an entity for the first time in gameguru, its kind of a cache file that gameguru uses to speed up processing the model.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 24th Nov 2016 19:15 Edited at: 24th Nov 2016 19:17
Nope!

Deleting the tunnel model .dbo will do nothing to fix the situation in my game model level.

Anyone?... At least it's good this Zombie AI thread seems to be producing results.

I just looked at Zombie settings in the ASYLUM example. If anything this should have some kind of clue.

In Zombie settings. Everything is the same except "Spawn At Start?" variable there is set to "No" there. "Spawn At Start?" it is set to"Yes" by default in Goth/Office Zombie. What difference does it make? Also, the "Amim Speed" is just a bit faster 100 vs 200.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Nov 2016 19:57
Quote: "Deleting the tunnel model .dbo will do nothing to fix the situation in my game model level."


It fixed most of the issues for me. Are you definitely deleting the .dbo files before running gameguru?

1. Close gameguru
2. Go to the tunnel.fpe and add forcesimpleobstacle = 3 anywhere in there, save and close the fpe.
3. Delete the tunnel.dbo file
4. Go to the Goth Zombies fpe file and change offy = -3 to offy = -1, save and close the fpe.
5. Delete the mobzombie1.dbo file
6. Load GameGuru.

If you've done it all in that order exactly, and it isn't working, then I have no idea what's wrong, because after doing that everything works for me. There are the occasionally glitches, sometimes they stop and turn then turn back and run at you, sometimes they stop when you move too far away, sometimes if you go around a corner too tight they get stuck on the corner trying to get to you, but all that is normal for GameGurus AI, it's object detection isn't very good.

As to spawn at start: The reason the zombies are set to "no" in the Asylum game is because the game doesn't load them at the start and as you go through certain trigger zones they spawn them.

The anim Speed: Exactly as it sounds, the speed that the animations run, with it set higher the legs will move quicker (the character won't move any faster though), I've noticed with some of the zombies if you increase the animation speed the run animation looks a little better, but when they stop running they kind of slide along the ground a bit.


i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Nov 2016 21:20
it's likely in your actual map you have other things causing obstructions - maybe some water or decal on the ground, maybe doors or archways etc, all these things can stop the AI from working.
turn off physics for as much as you can get away with and then make sure you have set forcesimpleobstacle = 3 in all fpe files for anything that the AI will walk on / under or through.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 24th Nov 2016 22:21
Hello,

UpdateBelidos...@smallg thanks for the help here. Much appreciated!

I had to recreate much of the level. It must be something really silly. Some kind of obstruction or the cash not totally clearing in the tunnel or mobzombie1.dbo for some reason. It's half working. The Zombies seem to kind of work for a while and then get all messed up again. (Mostly just Freez in place) If you run the level too many times the Zombie performance seems to degrade.

@smallg; Please be more specific - Turn off Physics where? You can't mean Zombies. Do you mean physics in tunnels or objects? Or Floors? That seem counter-intuitive. I don't have any floors now just painted texture on the ground.

I will continue to try different settings. @smallg in another post you're suggestion to turn "occlusion" to ZERO for missing entities was dead on.

Thanks to both of you.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Nov 2016 23:04 Edited at: 24th Nov 2016 23:06
no, not the zombies, just physics for general objects that you can't touch.
for testing you can slide the debug visuals slider up until it shows a path for the AI (make sure you do slide it though as simply clicking it to move it up/down will not register)
this will show white boxes and paths which the AI are trying to take (the filled white area is their view area, if you're not in that then they might not have paths if they havent spotted you yet)
also note that at setting 100 AI will not function so move it to about 40 ~ 50 should be fine.
edit for pictures (see attachment)

if you give us some pictures we might be able to help more.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 25th Nov 2016 22:13 Edited at: 25th Nov 2016 22:38
Hello @smallg : UPDATE

I don't think a picture will help. Zombies in the center still freeze.

I posted in the other thread I started about SOUND part of bellow..... Thanks for showing me the debug control in the Matrix it does help. I see the Zombi paths to the user that should be adhered to by the code.

The game is running @ 1920 x 1080 on my system tried lower settings on my station to some improvement.

Wasted most of the day on silly Zombie behavior again...Updated my Nvidia Drivers. Laptop trials.... i7, Windows 10, 500M Nvidia. it does not help GG not using more than one core in the game engine.

FOUND OUT/Noted:

QUOTE:

"The way I understand the GG engine is that it will pick the "best" resolution and scale game performance depending on monitor settings.

CONFIRMED:

(****By the way Zombies run faster better AI.... I just found this if you lower screen resolution to something like 1280 x 720. I tried it on a laptop with Nvidia 500M with great improvement in game play over the laptops native 1366x768 resolution***)

So main Title 12:

1024 x 768
1152 x 864
1280 x 720
1280 x 800
1280 x 960
1366 x 768
1440 x 900
1600 x 900
1600 x 1200
1680 x 1050
1920 x 1080
1920 x 1200
= 60 screens to change/account for"

Want to pack everything on a hard drive and move to a different station to see results, but no doubt this will mess file locations and .dbd files.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 25th Nov 2016 23:14 Edited at: 26th Nov 2016 10:50
Quote: "I don't think a picture will help."


And yet people keep asking for pictures... I wonder why that is .. maybe it's because it will help them figure out problem better.

No disrespect intended, but if you want help then provide the information asked for, otherwise, don't expect help to come quickly.

Edit: sorry that sounds harsher than I intended, I just meant that it would take longer to work out the problem without the info we request, not that we wouldn't help.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 26th Nov 2016 19:45 Edited at: 26th Nov 2016 19:47
Who is "Yet people"? You want pictures Belidos. Do we have a following I don't know about? I appreciate the help and we did get far on this thread....but how much further can just three of us get? LUA code at this time is what it is. The AI is what it is I guess.... deleting mobzombie. dbo clears some things up. That was great!

You both said it. Zombies are tricky. The results with ZOMBIES from tests are that they are spotty/inconsistent. I can tell you this goes from System to System specs with GG. (Have been trying since early October... Zombies actually seemed to have worked better in an older GG trial. )

You want Pictures to prove how hard: Ok ATTACHED example screens: In this scenario, Level one ---- with fences start in my game. The user initially needs to collect things at the end of a fence and complete a mission. The Zombies are outside the fence and when he learns the objective / picks a weapon moves down the fence Zombies need to "see" and begin attacking.

***** Now you would think changing the "forcesimpleobstacle = 3:" would help ZOMBIE AI with fences... Well, it does little/nothing. See yourself ENTITY (SCENERY --->Wire Fence (Chain Linked).

In fact running the game works better without the command change in the fence fpe. Go figure?

Sometimes the Zombies won't go around the fence. Often times they will - Eventually, but less so in a Standalone/depends on specs. Or most notably, get hung up at the end of the fence and then go around after a while. INCONSISTENT AI behavior. (Same as tunnel)

Putting down partial "path markers" would make sense here to get around the fence, (THEN Attack)...but Zombies don't seem to follow paths....tried.

OK...think turning "physics" off fences helps? NO WAY... Zombies get "SUPERPOWERS" they will walk right through the fence. "Of course" @smallg is probably having a good laugh at this experiment. I guess, if you want them to go through tables Ghost/Zombies now exist ....I call dibs on Copyright to this.

Oh, don't get too close to a fence Zombies can kill you through them apparently. I think a partial path idea is good, again in test mode seems the path is there.

Thanks all...

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 26th Nov 2016 20:03 Edited at: 26th Nov 2016 20:03
No, zombies do not follow waypoints, that's not an AI issue, it's just that whoever wrote their script didn't bother adding it. You can find zombie scripts with the additional waypoint systems and some AI tweaks here.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 27th Nov 2016 20:34 Edited at: 27th Nov 2016 20:41
UPDATE on "Crazy Zombies":

Zombi Game Tests: "LEVEL 1" (Outside)

@Belidos thank you very, very much for pointing out the Waypoint Script - Zombie AI it is very useful. @smallg wow man... this script improved the "fence" level I was working on 100% (Attached overhead View Picture 3) amazing work on this. You are a very LUA talented script writer.

Test results with @smallg script: I can confirm that Zombies are better able to navigate an object like the fence now. The waypoint path need not go directly to the player just far enough to get around an obstacle. The Zombie AI will "kick In" and attack the player. Much faster than just the native "ai_fastzombie.lua" in the scriptbank. Seems the calculations it needs to do are reduced by directing its navigation with Waypoints. I thought this might work as a solution.

I still get the random problem of Zombies running in place. (Treadmill Zombie) (PICTURE 1)

Zombi Game Test "LEVEL 2" (Tunnels)

Waypoint AI now makes a Zombie reach places faster. However, I don't know why fast zombies and others freeze if placed in the center of the cross created in the 4 structure tunnel or in the other 3 adjoining tunnels.

Tried "Marine Zombie 9" main script default in classics\ai_classiccharacter_apocalypse.lua in the left tunnel. I

I call him "FLAPPING WINGS ZOMBIE" now as he stands in place and....you guessed it, he flaps his arms like a bird in place. I don't think the "Walking Dead" would want him. He is not very threatening. (PICTURE 2)

Anyway Thanks again.

Attachments

Login to view attachments
Game_Making
8
Years of Service
User Offline
Joined: 7th Oct 2016
Location: Canada
Posted: 1st Dec 2016 21:09 Edited at: 1st Dec 2016 21:11
Hello,

This is driving me nuts....Can someone explain why Zombies further in the tunnel "treadmill" just get stuck. AI for Zombies seems really bad/inconsistent with my strain51L2.fpe. vs a plain Cross Structure.fpm to compare.

Attached are scripts. Samples...Tunnel has changes discussed here i the thread:

1. Close gameguru
2. Go to the tunnel.fpe and add forcesimpleobstacle = 3 anywhere in there, save and close the fpe.
3. Delete the tunnel.dbo file
4. Go to the Goth Zombies fpe file and change offy = -3 to offy = -1, save and close the fpe.
5. Delete the mobzombie1.dbo file
6. Load GameGuru.

Cross tunnel scenario seems to work flawlessly with New Flatt Terrain/default Zombie AI FAST.

You will need to use/add smallg AI Waypoint script to see improvement of ZombiesAI on Way points. My project sample strain51L2.fpe.

Thanks

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-12-22 23:23:00
Your offset time is: 2024-12-22 23:23:00