shithub: nanobsp

Download patch

ref: 5aaec0a272213a8775bff307ab6f91179cf0ccbb
parent: d75ec8b2381cd6f8e61bb8fbbad8ea41246fd8ee
author: Andrew Apted <ajapted@gmail.com>
date: Sun Dec 10 18:45:17 EST 2023

wrote the README document.

--- /dev/null
+++ b/README.md
@@ -1,0 +1,77 @@
+
+NanoBSP
+=======
+
+by Andrew Apted, 2023.
+
+
+About
+-----
+
+This is a project to make a simple node-builder which can be plugged
+into an existing DOOM code-base, and build nodes at level-load time.
+
+I have written this node-builder *from scratch*, based on my experience
+with the DOOM source code and BSP node building in general.  I have
+placed the main code for it is under the permissive MIT license, but
+this repository as a whole is under the GNU GPL, since it contains a
+version of the DOOM source code.
+
+The nodes which this code builds is only suitable for DOOM's software
+renderer -- it is unable to create nice polygons for OpenGL renderers.
+This is something I *might* implement later on, but probably won't.
+
+The ability to load nodes from the wad file has been retained, but
+currently this only kicks in when demos are being played, since demos
+will usually desync if the nodes are even slightly different.
+
+
+Engine changes
+--------------
+
+The bulk of my node-building code is in two new source files:
+```
+    nano_bsp.c
+    nano_bsp.h
+```
+
+However, several other parts of the engine need to be updated, due to
+the changes to the *node_t* and *subsector_t* types in the `r_defs.h`
+header file, since these structs no longer exist in one big array,
+but now get allocated individually and linked via pointers.
+
+The following functions need to be updated:
+-  R_RenderBSPNode() and R_Subsector() in `r_bsp.c`
+-  R_PointInSubsector() in `r_main.c`
+-  P_CrossBSPNode() and P_CrossSubsector() in `p_sight.c`
+-  P_LoadSegs(), P_LoadSubsectors(), P_LoadNodes() in `p_setup.c`
+
+
+About this repository
+---------------------
+
+The rest of this repository is a copy of my "Carob Doom" port, which is
+a fork of Chocolate-Doom (version 3.0.0) stripped-down to be easier for
+me to compile, with lots of stuff removed (like networking), and a few
+other changes.  It is not a source port intended for people to actually
+use, just a playground for various (wacky) ideas I have.
+
+
+Legalese
+--------
+
+I wrote this node-building code from scratch.
+Hence it is Copyright &copy; 2023 Andrew Apted.
+
+My node-building code (the files `nano_bsp.c` and `nano_bsp.h`)
+are under the permissive MIT open source license.  The comments
+at the top of those files contain the full license text.
+
+The *rest* of this repository, and any executable compiled with it,
+is under the terms of the GNU GPL (General Public License), either
+version 2 or (at your option) any later version.
+See the [COPYING](COPYING) file for the complete text.
+
+This code comes with NO WARRANTY of any kind, express or implied.
+Please read the licenses for the full details.
+
--