I would love to upload these more often but it takes too long to process by youtube.
So now I have pretty much completed the base of my enemy AI for one unit type. I was trying to find something to model it on and played some Zelda to see how the melee units react to players. For the moment my enemy AI has 3 states which change how they move. When patrolling they follow way-points and ignore the player entirely. If the player moves into a cone in front of the enemy they begin engaging, in this state they move towards the player slowly until they reach a set distance. At this distance they start attacking and charge rapidly at the player forcing them back, after an attack they begin engaging again. If the player moves out of their attack cone they return to their patrol.
Colliders for vision and impact
No pictures this time, just a brief update. The lighting is now controlled by switches (although in some rooms its still automatic). This means that the player has to navigate a room in almost total darkness to reach the light. The switch and similar objective are lit by spotlights. Enemies are also lit and now carry torches, currently if they find the player they simply stop and watch them until the player moves away. My plan is to have the enemy vision increase significantly when the lights are switched on, in darkness its a 45 degree cone in-front of them which for the moment doesn’t take into account obstructions because I cant get Physics.Raycast to work properly.
A ‘Sphere Enemy’
Now that Ive created the first few rooms I need to start thinking about enemies and environment. This is just a quick update on what Im doing. Above is the basic ‘Sphere enemy’, he is the simplest of them all, all he does is patrol and look for you. This fits in with the theme from my previous game, I will scale this enemies health directly with size. His spikes are misaligned on purpose. Currently I have set up a script which allows these guys to patrol around each room, all I have to do is place a few transforms and set them as way-points for each unit. Below are some images of other basic shape environmental stuff going in.
So I decided that in order to make the game more interesting (and to some extent put less pressure on the intelligence of enemies for difficulty) I am going to implement some funky lighting. Each rooms lights are activated when the player enters the room’s collider. Each room has its own layers (there are also some layers to allow for walls that intersect), and the lighting is layer specific. The only light in the game which sees everything is the player light, this is mostly in place to prevent room transitions looking weird and help players see enemies when approaching dark areas. Here are the rest of the shots to show off the lighting.
Not too much to say about this yet, I decided to make something new and after thinking through a few ideas this seemed like the best option. Originally I was going to make a simple exploration type game and it eventually turned into this idea of a dungeon game with shapes and poor lighting. What I eventually want out of this is a few levels, some basic enemy AI and ill try and make it look nice along the way. For the moment I have a dimly lit room, a entrance shaft (yes thats what it is), and a door which opens and closes.
I decided to learn how to animate in unity. Using a picture I found showing frames of a stick man moving I created my first animation in unity. The sprite used was a single photoshop png displayed below, only 1 leg/arm really needed to be present for the sprite importer to work.
This is the image I used to create the animation frames.
I decided the next step in my terrain project was to make night and day cycles. The first step in this was to make the sun rotate and have its brightness vary depending on heights, the moon and its light came later.
Last time I mentioned attempting to get sound to stretch across the river. I thought that doing this would require a plug-in/add-on of some sort, someone however described to me a much easier solution to the issue. The sound source simply travels along the river as the player moves up and down the map. Given the rivers weird rotation I ran into some issues getting the sound to stay in the center of the river, I eventually find a simple way to deal with this.
Simply put the object is rotated the same way as the river, each update the river sound travels the same distance as the player but on its own following its rotation. It would be more efficient to have this only happen when the player moves.
Here are some proof that it works screenshots. For testing I added a cube mesh to keep track of sound travel.