Level Blocking


The level blocking process made me realize one big thing; I was perhaps a bit ambitious to think I could get 3 levels done in the time frame available. I've elected to simplify things a little and only make the one level.

The main reason this was so difficult is that the node-based movement system, as mentioned in the previous devlog, takes the location values for where each node is, and moves the player right to it. Unfortunately, that means that as it stood previously, the player could move through walls. Oops.

That's not supposed to happen.

This should be fixable though, if I just tell the player object not to look at the nodes inside the walls! Given that the player movement jumps from node to node, colliders wouldn't work as it doesn't move in such a way that it would hit any of the colliders. By re-purposing a little snippet of code attached to the nodes already, I told the player object to ignore nodes with that little snippet of code.

Suffice to say, that didn't work either.

What ended up happening was that the node in the wall was, indeed, being ignored like it was supposed to... Which made the player object look at the next row of nodes in it's path. This makes it look like the player jumps over the wall instead of stopping in place. Still, it was a step in the right direction! Getting it to recognize that it shouldn't go in the wall node is a good thing! It was then necessary to tell the player object what to do if it finds itself facing a "no-no" node. In this case, we want the game object to stop, and not do anything.

Glorious success! With this issue resolved, it becomes time to actually map out the level! I came to the conclusion early on that I wanted lots of narrow passages, and a couple of larger areas where I could spawn in enemies, and a bigger central area for the player to defend. Below, there is a looping .gif showing the level map with the nodes (and their connections), and without the player UI (Which is very much a work in progress).

Ignoring the white box showing the camera's bounds, the idea that I have is that the enemies will pick a random direction at each intersection, until they can see either the player or the central box, and then they'll move towards the player or the central box. The square tiles serve to show each grid location (potentially to be replaced, I'm not sure yet).


Next week; Enemy movement and interactions!

Files

Level Blocking and Player Movement 4.1 MB
Sep 13, 2020

Leave a comment

Log in with itch.io to leave a comment.