arx-tools / arx-level-generator

A node.js library for creating maps for the video game Arx Fatalis
MIT License
6 stars 0 forks source link

rooms definitions: add "room remove" command #26

Open meszaros-lajos-gyorgy opened 1 month ago

meszaros-lajos-gyorgy commented 1 month ago

Columns in a large room are currently have to be built in a way that is basically just placing smaller rooms around a gap: image

It should also simplify adding lights to a large room.

This could be simplified with the introduction of "room remove":

# add large room with 'cave' texture
room add 700 300 700 cave

# remove polygons from the center and cover up the hole with 'column' texture
room remove 100 300 100 column y-

It should work the following way: 1) remove polygons from previous rooms when intersecting 2) add its own polygons with faces pointing inside out (the opposite of room add)

Caveats / Problematic parts: need to make sure that polygons which are out of bounds won't get introduced. For example a pillar that goes all the way from floor to ceiling doesn't need its own top and bottom polygons as they won't be seen. Maybe that's an optimization that can be done later.

An example on where this would be useful: pillars in the pool room image