Chapter-26 BSP Interiors: Entities spawning in walls

Open
#202 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
game-dev

Research direction

Start with the Chapter 26 BSP Interiors implementation and the build_random_map function, then reproduce the map-generation case described in the report. Inspect how each room’s southern and eastern walls are calculated before entity placement. Done means items and foes never spawn on wall tiles while remaining able to spawn on valid traversable tiles.

Written by the indexing model from the issue text.

Description

I was testing what I had of the BSP Interiors chapter (up to right before resetting the build_random_map function to build a random map with all three builders), and I found several entities (items and foes) sometimes spawning in the walls. I double checked my potential errors with a recent clone of the repo and compiling the code for this chapter, I found that the same thing was happening: items and foes in walls.

After some investigation, I believe it may be something about the southern and eastern walls of each new room not being calculated correctly and the spawner thinking that they are valid places to place entities, as it seems that the walls they are spawning in are the southern and eastern ones of the rooms they are supposed to spawn in.

These items are unobtainable as the tiles with walls are still counted as walls and not traverse-able. However foes that spawn in walls are still able to move out of walls if their pathing takes them to a tile that is a traverse-able tile.

Here is an example of what I find, with the cloned-repo code.
image

Another example:
image

Dominant language
Rust
Stars
968
Forks
166
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from amethyst/rustrogueliketutorial

All issues in amethyst/rustrogueliketutorial

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.