dim3 Forum

dim3 Other => Idle Chatter => Topic started by: Galavant Garde on December 27, 2016, 02:19:30 PM

Title: One Of Them
Post by: Galavant Garde on December 27, 2016, 02:19:30 PM
(http://cayelanmendoza.com/OneOfThem.jpg) (http://cayelanmendoza.com/OneOfThem2.jpg)

I finally have a name I'm happy with for the zombie game, also Dropbox is about to change Ts & Cs meaning all the pictures from the previous thread will disappear, so time to start a new thread I guess (images won't vanish on this one because I'm using my own website server)

I'll post updates and info here from now!  Currently working on making the zombie look meaner/better - the above artwork is just a quick experiment
Title: Re: One Of Them
Post by: Logan on December 27, 2016, 02:25:52 PM
Sweet! Still watching this
Title: Re: One Of Them
Post by: Galavant Garde on January 03, 2017, 04:20:32 PM
In order to help the enemy AI work out how to engage the player when there are other enemies/objects/obstacles in the way, I'm developing a new vision routine.  Here are some beta shots:

(http://www.cayelanmendoza.com/BetaRays.png) (http://www.cayelanmendoza.com/BetaRays2.png)

Green means no risk of friendly fire, red means there's a risk of friendly fire, blue means clear shot.  It needs a lot of tinkering before it's ready for the prime time, but the idea is this will help particularly in tight spaces (such as the pictured hallway above) so that if lots of bots are in one tight space they'll be able to know when to hold fire and wait, or when to start shooting/attacking.  In the first picture, you can see the bots either side of the zombie have clear (blue) shots, whereas in the second shot, the bots up the back are at risk of friendly fire if they shoot (hence red) so they'll hold fire

I need to do this because the sight test built into the engine can see the player through some pretty tight spaces, so if I use that as the only deciding factor when the bot decides whether or not to start shooting, it's very easy for friendly bots to get clipped by projectiles.  Indeed my bots kept killing each other when trying to shoot the player because of this.  I'll need to use the built-in sight check to decide whether the bot can see the player or not, but then use this additional vision routine to decide whether or not to shoot.

Note those lasers are spawned by the invisible 'sight' projectiles the enemies use to scan their surroundings to help me see what the enemies are up to.  They're just to help me while testing - you won't see them normally when you play
Title: Re: One Of Them
Post by: Galavant Garde on January 13, 2017, 06:14:27 AM
Enemy AI progress:

The new vision routine is working great!  It's not perfect, but enemies are now effectively deciding whether or not there's a risk of friendly fire and not killing each other all the time.  Also they don't get stuck on each other as frequently (it does occasionally happen if you let them all clump in a small corridor, but it's eons better than it was) and now they're excellent at hide and seek.  If you run off into the darkness, they're pretty good at working out where you 'could' be, and as one of them spots you he tells all his friends.

To test it out, I've been getting deliberately spotted, then running off and hiding to see if they can find me.  9 times out of 10, they do!  And when they don't, they start a randomised frantic search and rake the map until they eventually find you.

Basically, when I play without using the invincibility cheat on, it's actually a challenge!

I've also randomised the majority of the delays between chains so that the enemies don't tend to do things in sync with each other too.  This variable reaction speed makes the game less predictable, so in some scenarios you'll have a lucky escape whereas in others it's game over!  I'll drop an updated download link asap  ;D
Title: Re: One Of Them
Post by: Galavant Garde on January 18, 2017, 02:12:09 AM
Try out this demo:

https://dl.dropboxusercontent.com/u/46335427/One%20Of%20Them/One%20Of%20Them.zip (https://dl.dropboxusercontent.com/u/46335427/One%20Of%20Them/One%20Of%20Them.zip)

This update is all about the enemy AI.  What you should hopefully see is:

- No more friendly fire
- Should hardly ever get stuck on each other
- No more synchronised behaviour (waits/delays are all randomised)
- Better team work
- They spread out when searching

It's still very beta so you'll see all sorts of odd messages in console I've been using to find leaks/breaks in chained functions.  If you want to toggle the rays the bots project to visualise how they see and navigate, open the console and enter 'lasers on' or 'lasers off'
Title: Re: One Of Them
Post by: Galavant Garde on January 19, 2017, 04:21:30 AM
Working on the enemy models finally.  Starting with experimenting with flashlights:

Title: Re: One Of Them
Post by: `teh1 on January 19, 2017, 09:10:39 AM
The amount of effort you've put into this shows! Well done. I did cause the AI to break one time when I got caught up in a corner. They started standing inside of each other to shoot me, and shot very slowly even though I was in plain view and was not running. Eventually they walked on top of me and I sat there for a good 30 seconds with 3 of them on me before they finally shot me to death. I think they were having trouble acquiring a lock.
Title: Re: One Of Them
Post by: Galavant Garde on January 19, 2017, 11:57:49 AM
Yay thanks Ryan!  I was hoping that scenario with bots stuck on bots was a thing of the past but sounds (quite hilariously and annoyingly at the same time) like it's still there...  As for their ability to land a clear shot, yeah lemme look at that  :-\ I'd guess it's when they're in a bit of a clump or stuck on each other, their lasers are going to hit their bot friends because they're standing too close

PS the bots will have new models in the next update  8)

Title: Re: One Of Them
Post by: Galavant Garde on January 23, 2017, 04:49:10 AM
Bot update - how they avoid getting stuck on each other:

- When bots touch, the one with the smaller ID will turn off contact then try to run to a 'dodge' spot it calculates by firing projectiles at the ground around it in a circle until one returns with free space
- When they reach their 'dodge' spot, if they are not obscured by another object they'll turn contact back on then carry on as normal
- If they reach the dodge spot but are obscured by another object, they memorise an array of nodes including the one closest to it and any nodes directly connected to that one
- They'll teleport to the closest node
- If they are obscured by another object at that node, they will teleport to the next node in the array then memorise all nodes connected to that one
- If they continually land on nodes obscured by other objects, they will simply follow the node path until they find an unoccupied node

Sounds clunky, but it works faster and smoother than you'd imagine (because the level is so dark and there are flashlights drawing your attention away)

It's tricky to code around the fact that their models get stuck on each other when they run into each other (this is why I'm turning off contact) but I'm thinking more and more that the way to go is to build levels with as few narrow corridors as possible, or perhaps only making narrow corridors at parts of the map between zones where stuff happens, and once you leave a zone it seals.

Anyway here's a screenshot showing the new guard models all clumping around the player but not getting stuck on each other while using flashlights:


EDIT - the download link has been updated - it has the changes to the enemy AI I mentioned above, and new enemy models.  Also when you throw rocks at enemies it's pretty satisfying - I think I might make that a thing you can actually do in the game (at the moment it doesn't hurt them but it looks pretty funny)
Title: Re: One Of Them
Post by: Galavant Garde on January 26, 2017, 05:02:29 AM
Still not perfect but guards are grouping together and not freaking out/getting stuck anymore :-)


Have also started building the escape route:

Title: Re: One Of Them
Post by: ggadwa on January 27, 2017, 07:26:17 AM
That last shot is very pretty!

[>] Brian
Title: Re: One Of Them
Post by: Galavant Garde on January 29, 2017, 05:30:01 AM
Thanks Brian :-) and it's aaaaaall Dim3
Title: Re: One Of Them
Post by: c^5 on February 01, 2017, 06:26:13 PM
Haven't tried this out in a while, it's definitely coming together! Some thoughts:
- Is there any way to save your game right now?
- I really like the intro scene--but you should probably also have a way to skip it for players who have already seen it
- I managed to get stuck while jumping out of the window one time, not sure if I'm able to recreate it or not due to the above. I ended up hovering above the ground but not quite on the window ledge, unable to move and trying to jump just lead to the attack animation playing
Title: Re: One Of Them
Post by: Galavant Garde on February 02, 2017, 04:22:14 AM
Oh hey c^5 thanks for checking it out, I haven't built a save system yet.  At the moment the prison is the playground map where I'm trying out scripts and ideas, and once the game has an actual purpose and different courses/chapters I'll put in a save system.

There's no user-friendly way to skip the opening scene yet; for now just open the console and type 'skip'.  I will definitely add an easy way to skip it tho, and when the save system is built it'll start up without showing the scene if you've seen it before.

That window you jumped out of is supposed to have an invisible object on it that starts a mini cutscene when you touch it; it must have been a glitch whereby the script failed to catch the touch event.  I see occasional glitches with events not being registered (usually it's the animation event whereby the player model keeps doing the walking animation even though you've stopped walking, or gliding across the floor with the standing still animation playing) and when I restart the engine it's fine.  Not sure if I'm just running too many scripts at once and the engine is too busy, or if Dim3 needs a little update
Title: Re: One Of Them
Post by: Galavant Garde on February 18, 2017, 10:36:15 AM
Little update - building a new highway level:


Have also thought of a new interaction which I'm going to experiment with - the zombie vomits, and enemies can slip over in it :-)
Title: Re: One Of Them
Post by: Galavant Garde on March 02, 2017, 09:01:02 AM
Dilapidated petrol station on the side of the freeway:

Title: Re: One Of Them
Post by: c^5 on March 03, 2017, 11:50:19 PM
I really like the atmosphere the background of the gas station pictures. I recently read Time Out of Joint and it really reminds me of one of the scenes from later in the book for some reason (minus the Zombie  :) ).
Title: Re: One Of Them
Post by: Galavant Garde on March 06, 2017, 12:40:59 AM
Dystopia 🤙 That kind of unravelling of the world around you theme is what I want to emulate in this game, because the player gets to see just how messed up & cruel the humans really are. A dark & crumbling world totally helps to illustrate that actually, but I didn't have that in mind when I started making it...just thought it looked cool. So now that you mention Time Out Of Joint, my brain is like ARGH with ideas, thanks!! I'm gonna stick with this aesthetic & use it to illustrate the eroding facade of civilisation (deep stuff)

Title: Re: One Of Them
Post by: Galavant Garde on March 16, 2017, 07:08:22 AM
Little update - creating a node network for the bots to navigate in the new freeway map.  Going to make a blockade somewhere along the road forcing you to have to find a way around


I think I'll need to add a routine to the bots too so they use their flashlights when they're in the dark, not just to see you when you're in the dark.  Otherwise they walk around in the dark and you can't really see them until its too late.

Anyway I'll keep posting as stuff develops