Author Topic: One Of Them  (Read 3666 times)

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #30 on: November 05, 2017, 03:40:09 PM »
Oh hai, little update after putting this project on hold while working on some music stuff...

Here's a little screen grab showing you how all of the gameplay mechanics I've been working on have come together to make the game a game:  https://youtu.be/Vsn_fAD3Rpk

I know it's a small thing, but I just scripted in a different way of handling walking backwards in that it's always slower than running forward with an awkward backward walk animation.  I mention it because your forward speed and animation changes depending on your health, but your backward speed is always slow, so I had to get the script to remember speeds and animations based on health each time you change direction. Really basic I know, but details count. Seeing though guys script little details like this all the time bringing your projects to life, you'll appreciate how fun it can be when unpolished stuff starts to work seamlessly

Still on the list of things to do is avoiding enemy clumps in small spaces  :o

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #31 on: November 14, 2017, 03:03:21 PM »
Another little update - have ditched crawling as I'm not really happy with how the model interacts with the map when laying down. Instead the player can crouch down to hide, as you can see in this little clip:

https://youtu.be/SUiaud1XJ4k

Have decreased the default gamma and chosen a darker ambient light colour, added in a graphical representation of noise you make through vents, and worked a little on the enemy AI. Now they shouldn't start teleporting all over the map when they get stuck on each other; they pass through each other until they find space (still needs work - the clip shows one little teleport but that's triggered  by wall collisions rather than contact with other bots) let me know what you think  :D

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #32 on: November 16, 2017, 01:31:40 PM »
I know it's quiet around here, but IDC Imma keep postin

Been trying to work out how best to get my enemies to stop clumping when they're in narrow corridors.  I realised why my code wasn't working how I intended it to - I was using the Touch event whenever they bumped into each other to trigger their who-should-stay-put-and-who-should-get-out-of-the-way logic.  However, it turns out bumping into each other also triggered the Collide event every now and again, which I was using for wall collisions...I was using a totally different logic for bumping into walls after straying from a node path than touching another object, hence my bots sometimes just got stuck and did stupid things like teleporting and running in circles etc.

SO, I've stopped using the collide event all together, and it's already working better!

Now my biggest bugbear is how the closest node for a bot to run to is often on the other side of the bot to where the following node in the path is...hard to explain without a diagram, but essentially the bot runs one direction for a short distance, then beelines the other direction because that's where the next node in the path is.  Know what I mean?  Ideas on how to avoid that??  I know I could probably do a calculation for which is closer - the first or the second node in the path...but that seems too manual and clunky.  IDK I might give that a try and see how efficient I can make it

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #33 on: November 19, 2017, 05:37:11 AM »
Yay coding breakthrough  ;D my bots don't get stuck on each other anymore!  They're almost ready for prime time!!

This was such a pain, it may be of help to anyone coding their own combat bots to share what I did to make them work:

- If a bot touches another object, they check the object's name to see if it's another bot, something they should ignore (i.e. an invisible checkpoint etc), or the player
- If they touch a bot, they decide who dodges and who stays put by working out which one has a bigger ID (this way there can be no error - one MUST get out of the way)
- If the one who has to get out of the way (I'll call him the dodge bot from now on) is stationary, they will turn off contact allowing the other bot to run through them
- The stationary dodge bot then checks on a timer to see if they're obscured while contact is switched off - if not they turn contact back on and resume what they were doing
- If the stationary dodge bot is still obscured (i.e. the other bot stopped on top of where he's standing) the dodge bot will sidestep a few map units then check again if they're obscured
- If the dodge bot was actually moving at the time they bumped into the other bot, they'll side-step the other bot and carry on along their path completely avoiding any obscuring issues
- The bot which doesn't have to get out of the way (I'll call him the boss bot from now on) will carry on uninterrupted so that at least one enemy is always focussed on the player in any multi bot combat scenarios
- If the dodge bot runs in front of the boss bot in order  to get out of his way, therefore obstructing his view of the player, the dodge bot will engage the player until another bot accidentally bumps into him, and the original boss bot will readjust his position to get a clear shot of the player

It's a nebulous logic map, but it works.  It scales up too - there can only be one boss bot in any multi bot clump, so every other bot will become dodge bots and run out of the way. When they sidestep or whatever, the original boss bot will no longer be obscuring them, so one of the remaining dodge bots will become the boss bot, and so on until they are all spaced out (it happens quite quickly actually).  Side-stepping and dodging use a combination of nodes, and uncharted parts of the map the bot has verified is free from objects by firing invisible rays at the ground, meaning even if there's only one nearby node, they will be able to spread out wherever there is physical space irrespectively.  Also the timing is pretty tight, so you won't really notice bots occupying the same space for long if at all.

I've probably explained that poorly, but I'm just happy it works! You'll be able to pick it apart when I put the project data folder up for download again soon.

So now THAT'S done, I'm going to start working more on the player's abilities.  On the menu is being able to infect bad guys (which will completely change their behaviour and make their scripts that much more massive - here we go), and even just being able to yell/make noise to startle or mislead bad guys.  Because right now the baddies are a bit too fearless I find

EDIT:  Just added the ability to, well, basically just yell and make zombie noises.  It's SUPER useful when you're running around the dark as it allows you to trick enemies and run them around in circles trying to find you!

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #34 on: December 15, 2017, 02:37:35 PM »
Little update:





Been working on improving the textures, particularly bump and specular mapping.  Have also just added new parts to enemy hearing - some sounds travel further (i.e. footsteps are quieter than yelling etc) AND enemies' sensitivity to those noises increases the more alert they are.  On the list of things to add is the randomised decision for a bot to run to a nearby bot to seek out help / tell him where he saw the player.

I'm also gonna organise a party at my place where my friends who come over will all make sound effects to be in the game lol, looking forward to all the 'urgh's and 'OMG it's coming!'s etc

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #35 on: December 18, 2017, 03:31:42 PM »
Latest update - working on enemy AI, and I've just figured out a neat way of getting bots to keep tabs on which other bots are nearby, and whether they're aware of the player's presence or not.  By them keeping in contact in this way, if one spots the player but is too far away from other bots to just yell out for help, they will take a shot, then run to go get help!  It works really well!!

Once they've gotten help, they won't try it again until after they've lost the player and had sufficient time to calm down (this prevents disruptions to their combat routines - it'd be silly if they kept running off for help all the time).  Also, they won't run for help when the nearby bot/s are already aware of the player, as chances are they're already engaged in battle or are frantically looking for him.

It's pretty neat in action - I want to upload a build soon so you guys can try it out!  There are 3 playable maps now btw  ;D

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #36 on: December 21, 2017, 11:01:58 AM »





Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #37 on: December 26, 2017, 03:32:31 PM »
Ok I've got a demo for you to try out:

https://we.tl/QgrOQ5iUhX

Been working hard on this - the enemy AI is probably the toughest I've ever built.  You really gotta creep around otherwise you don't stand a chance.  What you'll notice they do is:

- give chase when you try to bolt
- keep tabs on nearby bots so they can run to them for help when in trouble
- respond to different sounds in different ways
- change behaviour depending on if they know you're there or not
- keep an eye out for friendly fire
- literally kick you when you're down
- get sad when they find a dead bot

They're also much better at long-distance shots than before.  Now, while they do chase you pretty hard when you try to run off, it IS possible to lose them if you duck down in the dark behind something. So keep tabs on hiding spots you find as you go along.

Please tell me if you manage to get into the sewers under the bridge - I'm curious if the bots are too easy or too hard.  Also I know I'm going to need to add more places to hide, and more abilities for the zombie (like maybe hiding in a box and pushing said box around, could be fun) but for now please tell me what you think of the progress

PS if you get sick of the fit on the operating table scene, open the console and enter 'skip' to jump ahead to when he falls out the window and starts playing.  Also there is one action button, one melee button, and one crouch/hide button you'll need to set

Good luck  8)


Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #38 on: December 27, 2017, 05:39:24 PM »
Update on the way - I'm adding the ability to creep around so bots can't hear your footsteps. It's kinda a crouched walk. Also am furnishing the levels with more decorative stuff to hide behind and more decorative stuff to make it look better in general.  Also cutting a few vents out of walls and creating more escape routes so it isn't just a gauntlet slaughter fest.

PS check out how much nicer it looks - remember the first few screenshots I posted?


Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #39 on: January 01, 2018, 05:35:19 PM »
Will drop an updated link in a couple days - so far have added in auto-regenerating health, sneaking mode that doesn't make footstep sounds, bots can get scared and run off if you catch them unawares, got rid of the ugly snorkel vents and put some proper drains in that are actually visible and useful during gameplay, fixed a few dumb node-path errors with the bots, things like that. Still need to make melee more interesting, and probably add a bit of code where if you're hiding somewhere and they saw you in that area they stick around and search for a bit longer and more thoroughly

Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #40 on: January 03, 2018, 11:04:23 AM »
Hullo guys, first update for the year, and it's a big one!

Firstly, here's the updated link:  https://we.tl/vbdz1H3EfF

This update introduces:

- new sneaking ability
- redesigned prison map with various nooks/hiding spots
- redesigned ray lighting
- automatic health recovery
- automatic camera height adjustments when theres low ceiling clearance
- more scenery
- refined vaulting over ledges
- can now vault from the sneaking/crouching position

The way these things all work together completely changes the feel of the game. To me it's starting to feel like an actual game now ;-) the sneaking and hiding behind stuff element is much more prominent, and it actually flows well. The bots are pretty formidable, and much better at working together. The ray lighting makes things not only look better, but being able to see the light makes creeping around and avoiding light so much more doable.

Feedback please  ;D be brutal, I can handle it






Galavant Garde

  • Full Member
  • ***
  • Posts: 146
  • Cayelan Mendoza
    • View Profile
    • Galavant Garde - Dark Electro Disco Pop
    • Email
Re: One Of Them
« Reply #41 on: January 13, 2018, 04:05:25 PM »
Little update video:

https://youtu.be/NXkaeJc0S_E

The biggest thing to look out for is actually something you can't see.  It's the unnoticeable checkpoint saving and loading with no save screen or input from the player!  Less is more, plus I'm not a fan of the dim3 save screen, and it crashes a lot too.

I've rewritten the bots' vision and movement routines from scratch plugging a bunch of logic gaps and dead ends that caused odd behaviour in the past.  This has made them a lot better at filling a small space without getting stuck on each other (see up the top of the stairs in the video)

I also rewrote the math for bot aim when standing on different levels, and when the player height decreases.

The checkpoint thing is all manually scripted - was a big learning curve for me, but let's just say I'm dreaming in 'for' loops now.  The biggest issue I found with it was packing the Y angle of objects in the save data...took ages to work out that it was often freaking out because the Y angle had too many decimal places.  The way it works is, while still playing you can reload from a checkpoint smoothly, but if you quit and come back to the game later, it'll be at the start of that level. It's a tradeoff I know, but I'm pretty happy with it.

& before you say it, I know the action icon in the middle of the screen is terrible - it's on the list. Also I won't upload any more playable demos since nobody seems to try them out - will just do videos instead I think.