Game Development- Introduction. Blog Post – 2
|
Last week i started to work with the enemy – movement pattern, but i had some work left to do, so i continued to work with it this week too. I have also started to implement a AudioManager because that’s something we need, at least when we have to use multiple audio files. Right now we are only using one musicfile/music clip and everything invoving the music is defined in Engine.h and Engin.cpp. But that’s are going to change when I’m done with the AudioManager, i hope…! Back to enemy movement pattern. This week have both i, Sebastian and William been involved with working on enemies. I fixed enemy waypoint with help from Sebastian, and William has begun working on enemy AI / pathfinding / chasing. Enemies get waypoints through a text file where the first position is the enemy spawn point. After the first position it says “to” and it’s just a text to do it easier to read all coordinates. After “to” the next coordinate is given out and so on… This system makes it easy to set out enemy waypoint/ movement pattern and you can easily change it. A bad thing right now is that the file can only reads from left to right and when it reach the last position it will read everything backwards. So it will go through all the positions backwards until it reaches the spawn point again. This works fine if you just have a enemy who should go back and forth. But we also want enemies to walk around in circles and patterns. As to say we want enemies to go from last position back to spawn point and from there follow all the waypoint again from left to right. I dont really know how to solve it but i think that someone in my team can find a way to work it out. I have atleast implemented so that enemies can walk around, it`s a good start. William have also fixed that enemies can chase the player if the player gets in the enemy target range. If the player is out of enemy tracking range, enemies will go back to their movement pattern.This means that we have an alpha to show where the player gets a challenge to avoid enimes.
|

