{"author_link":"\/users\/selkieharbour","author_name":"SelkieHarbour","author_uid":"selkieharbour","comments":[],"epoch":1665043889,"event":"LD51","format":"md","ldjam_node_id":309086,"likes":5,"metadata":{"p_key":"168861","p_author":"SelkieHarbour","p_authorkey":"1299852","p_urlkey":"396619","p_title":"Lurking in the shadows","p_cat":"LDJam ","p_event":"LD51","p_time":"1665043889","p_likes":"5","p_comments":"0","p_status":"WAYBACK","us_key":"1299852","us_name":"LDJam user 299852","us_username":"299852","event_start":"1664496000","event_key":"114","event_name":"Ludum Dare 51"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD51","removed_author":false},"_superparent":296586,"_trust":1,"author":299852,"body":"In our entry [The Lamplighter](https:\/\/ldjam.com\/events\/ludum-dare\/51\/the-lamplighter) we decided to go for a dark mood. We implemented the game with unreal and the main mechanic is a torch you need to charge to make your way through the eyes that lurk in the shadows.\n\n![enemy-blinking-long.gif](\/\/\/raw\/c43\/94\/z\/527da.gif)\n## Enemies\nThey had to be very simple but creepy & challenging. We ended up with a plane with a texture, and to do the blinking we only needed to scale the UP axis.\n\n### AI behavior\nThey had to reinforce the feeling of\n1. danger ahead\n2. being followed\n\nInitially we tried to do the most simple AI possible: just entities that move brainlessly towards the player, to avoid creating complexity and dealing with the navmesh and behavior trees, but in the end we needed to go ahead and add a bit of complexity in this layer.\n\nTo do so, we implemented a very simple AI that just follows the player once they detect him, after a random time range. You can see the highly complex behavior tree:\n![BT_EnemyCharacter.png](\/\/\/raw\/c43\/94\/z\/527db.png)\n\nThis only worked to reinforce the point 1. To create the feeling of being followed, we decided to respawn the enemies behind the player once they were killed with light. To implement this, we used a simple environmental query:\n![EQS_Spawn.png](\/\/\/raw\/c43\/94\/z\/527df.png)\n\nThis generates a circle of positions around the player and scores every position with the following tests:\n1. Prefer greater distance to the player\n2. Prefer greater distance to lit lamp posts\n3. Get only positions that are in the navmesh\n4. Get only the positions that are behind the player\n\nAll the tests work together, but it is the test (4) that made the magic.\n\n![ScreenshotGif43_03.gif](\/\/\/raw\/c43\/94\/z\/52031.gif)\n\n#### Check [The Lamplighter](https:\/\/ldjam.com\/events\/ludum-dare\/51\/the-lamplighter) out","comments":0,"created":"2022-10-06T07:52:56Z","files":[],"files-timestamp":0,"id":309086,"love":5,"love-timestamp":"2022-10-06T14:25:09Z","meta":[],"modified":"2022-10-06T14:25:09Z","name":"Lurking in the shadows","node-timestamp":"2022-10-06T08:11:29Z","parent":300988,"parents":[1,5,9,296586,300988],"path":"\/events\/ludum-dare\/51\/the-lamplighter\/lurking-in-the-shadows","published":"2022-10-06T08:11:29Z","scope":"public","slug":"lurking-in-the-shadows","subsubtype":"","subtype":"","type":"post","version":962569},"node_metadata":{"n_key":"309086","n_urlkey":"396619","n_parent":"300988","n_path":"\/events\/ludum-dare\/51\/the-lamplighter\/lurking-in-the-shadows","n_slug":"lurking-in-the-shadows","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"299852","n_created":"1665042776","n_modified":"1665066309","n_version":"962569","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/51\/the-lamplighter\/lurking-in-the-shadows","text":"In our entry [The Lamplighter](https:\/\/ldjam.com\/events\/ludum-dare\/51\/the-lamplighter) we decided to go for a dark mood. We implemented the game with unreal and the main mechanic is a torch you need to charge to make your way through the eyes that lurk in the shadows.\n\n![enemy-blinking-long.gif](\/\/\/raw\/c43\/94\/z\/527da.gif)\n## Enemies\nThey had to be very simple but creepy & challenging. We ended up with a plane with a texture, and to do the blinking we only needed to scale the UP axis.\n\n### AI behavior\nThey had to reinforce the feeling of\n1. danger ahead\n2. being followed\n\nInitially we tried to do the most simple AI possible: just entities that move brainlessly towards the player, to avoid creating complexity and dealing with the navmesh and behavior trees, but in the end we needed to go ahead and add a bit of complexity in this layer.\n\nTo do so, we implemented a very simple AI that just follows the player once they detect him, after a random time range. You can see the highly complex behavior tree:\n![BT_EnemyCharacter.png](\/\/\/raw\/c43\/94\/z\/527db.png)\n\nThis only worked to reinforce the point 1. To create the feeling of being followed, we decided to respawn the enemies behind the player once they were killed with light. To implement this, we used a simple environmental query:\n![EQS_Spawn.png](\/\/\/raw\/c43\/94\/z\/527df.png)\n\nThis generates a circle of positions around the player and scores every position with the following tests:\n1. Prefer greater distance to the player\n2. Prefer greater distance to lit lamp posts\n3. Get only positions that are in the navmesh\n4. Get only the positions that are behind the player\n\nAll the tests work together, but it is the test (4) that made the magic.\n\n![ScreenshotGif43_03.gif](\/\/\/raw\/c43\/94\/z\/52031.gif)\n\n#### Check [The Lamplighter](https:\/\/ldjam.com\/events\/ludum-dare\/51\/the-lamplighter) out","title":"Lurking in the shadows","wayback_source":[]}