Basic Level Blocking


Today I will talk about the level design in Incident at the Bargewright Inn. Bargewright will contain three levels that the player can move between at any time. These are the downstairs main area, the upstairs accommodation area, and the cellar/storage area behind the bar. This week I filled out the main area a little more, and started implementing the way that NPCs will move around the tavern and interact with items there.

Downstairs Level

The Main Bar Area WIP

Shown above is the level design so far. There are a number of tables and benches, each with either stools or chairs surrounding them. At the top right there is a bar and some stools, as well as a door which will lead to the cellar area. In the top left is a staircase which will lead to the accommodation area. There are also some decorations scattered around the level such as posters, shelves, a barrel, and some beer glasses and dinner plates. I want the inn to feel alive and real and I believe that good decoration is an absolute necessity to achieve this. Also seen is the first NPC, the bartender, in the top right, and a green square by the centre table. The green square is the first of what I call "action points", a location that NPCs can walk to as part of their schedules. In this example, this square corresponds to the chair immediately to the left of it, and if an NPC selects to walk to this location, they will sit in the chair.

Bartender Sits

The bartender moves to the chair

An action point contains (so far) three data points, shown below. They are the stand location, adjacent tile, and face direction. When an NPC reaches the action point, the following things happen in order:

  1. The NPC moves to the edge of the tile corresponding to stand location, otherwise stays in the centre
  2. The NPC walks to the adjacent tile in the direction corresponding to Adjacent Tile, otherwise stays on the current tile
  3. The NPC turns to face the direction corresponding to face direction

Action Point Data

Data corresponding to the chair AP

In this example, upon reaching the tile, the NPC moves to the bottom of the tile, then moves to the left adjacent tile, then finally turns to face down. The adjacent tile data is necessary as the pathfinding cannot route directly to the chair as it considers it inaccessible due to the collider on the chair. This system is very modular and should be able to be expanded with any other data that action points may require. The pathfinding algorithm is a custom script called SAP2D.

Art Sources

Player & Bartender: https://opengameart.org/content/24x32-characters-16x16-tiles

Tavern: https://opengameart.org/content/medieval-tileset

Files

incident-at-the-bargewright-inn-main.zip Play in browser
Version 3 Apr 22, 2021

Leave a comment

Log in with itch.io to leave a comment.