FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.72k stars 400 forks source link

Gigantic Iceberg-Cave #12427

Closed ubertpendragon closed 11 months ago

ubertpendragon commented 1 year ago

Disclaimers

What happened?

While testing things, I witnessed across a gigantic iceberg-cave. The ice covered the entirety of the cave

The cave isnt accessible so you can only see it with freecam

image image image

Reproduction steps

Hosted multiplayer cargo mission on unstable

image

Bug prevalence

Just once

Single player or multiplayer?

Multiplayer hosted from the in-game menu (= using a listen server)

-

No response

Version

Unstable (v1.1.3.0)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

ghost commented 1 year ago

To be honest, we with boiz were playing a plenty of missions last weekend - and noticed obnoxious amount of inaccessible caverns. I. e. radar locates minerals, we grope around landmass where minerals were detected for half an hour looking for entrance - and find that the only potential entry point is blocked by non-destructible ice (or we've failed to cause enough damage to break it). Something probably went wrong with level generation. No idea how to test it as player (i. e. without implementing some warnings and probably debug minimap markers in case of especially blatant terrain overlaps then rebuilding the client) though.

itchyOwl commented 1 year ago

Possibly a bug or a symptom of one. Assigned to @Regalis11 to evaluate if it's worth looking into.

Regalis11 commented 11 months ago

Fixed in https://github.com/Regalis11/Barotrauma-development/pull/4415/commits/1989ffdeac27084a286f714c0e963c2a6f12409c

This happened because we'd use GetTooCloseCells to ensure the cave is wide enough. The problem was that the method did an AABB check of nearby cells, which could sometimes cause it to pick cells that are actually far away (measured from the edges), but whose AABB extends very close.

image

Jasontti commented 11 months ago

Tested in https://github.com/Regalis11/Barotrauma-development/commit/9bb93cdd2370c14a53e103ccf06e14354a06b881

Tried with steps and seed provided. Looked at some levels in MP with random seed. Generated many levels in leveleditor. No issues found