Log In  

Cart #nowyouseeme-2 | 2022-06-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

(v02 06-21-22)
TO LOAD THIS PICO-8 CART, in immediate mode, type: load #nowyouseeme

Demonstrating how to have a quick and easy to code field of vision without using a bunch of CPU processing or even complex code.

VVhat's new ?

  • Added cpu meter to show how quickly the scans are made. Notice they are < 1% CPU total.

  • Allowed ability of being able to hide behind enemies.

  • Changed the color of passive enemies to dark blue.

  • Distance by default is disregarded. To enable distance check, press the ❎ key. Again to swap.

  • Made walls to be drawn more intelligently where there is always an opening.

  • Improved the engine efficiency by checking the distance to the target first only using a search when the distance has been met.

  • Sped-up the player's movement slightly by adjusting the key repeat.

Use the arrow keys to navigate.
Press πŸ…ΎοΈ to swap between seeing the enemies only if they see you or not.
Press ❎ to enable distance, again to disregard which is the default.

You can travel freely through the walls.

Note that the enemies cannot see you through a wall even if it is very close to them. This is being done by tracking each enemy to the player to see if an obstacle is in the way. If it is like a wall then the enemy cannot see you.

What other simple methods can you use to have a player not be seen by an enemy if there is an obstacle in the way ?

P#113412 2022-06-20 18:45 ( Edited 2022-06-21 23:28)


[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-06-26 02:44:48 | 0.009s | Q:11