20150825: 3DEngine
Started to setup a link to my WebGL-script and placed meshes along with every object.
20150826: Perspective Camera
Tried to match the 2D-view with a new 3D-view and ended up with using a perspective camera that was rotated 90 degrees along the Y-axis. When zooming, the camera will move closer to the ground and the X & Z position is working as usual panning.
20150827: Cookies
Added support for storing the cameras state in a cookie so that I don´t need to move the camera every time I´m reloading the page while updating the code.
20150828: Brains & Right click
I started to build brains for the creatures. A right-click will set a destination for a creature to move towards.
20150829: Improving brains
brain.orientation – Now the creatures have the ability to use “orientation” to understand if they´re inside a building, cell or outside.
brain.move – Moving around.
brain.find_path – They can also try to find a path towards a destination.
brain.find_elevator – Ability to locate nearest elevator.
brain.find_building – Ability to locate a building.
brain.collisions – Is a position blocked or not
20150830: Navigating inside buildings
Working on improvements within the path finding function.
At the moment, the distance to a destination is calculated with Pythagorean Theorem and creatures will try to walk along the shortest path. If anything goes wrong (something is in the way) they will test if walking sideways will work. (I.e. only moving along x or z)
However, if the destination is on the same x or z position, they´ve already reached one of the goals and don´t know what to do anymore.
So I´m doing some testing and reading about potential fields and some other stuff to see what works best to stop creatures from getting stuck in walls.












