Start block shapes

This commit is contained in:
Miloslav Ciz 2024-07-22 01:16:16 +02:00
parent 84163d0d3c
commit 9e3bf000cf
8 changed files with 217 additions and 67 deletions

View file

@ -1,3 +1,10 @@
- sky images could be just composed of 4x4 normal images? then we only need
one type of image
- map actually in ASCII format? how will humans edit it?
- make a simple rendering setting:
- will exclude images and only draw solid colors, let's say only 16, so that
memory usage is reduced, CPU rendering is relieved, executable is smaller
AND frontend doesn't have to use RGB565 (it can basically choose any mode).
- background sky rendering efficiently:
- first draw the solid color top and bottom
- then render the 3D scene
@ -42,7 +49,7 @@ TOTAL SIZE OF TEXTURES:
- possibility of simple procedural textures to save space! <-- SOUNDS NICE
- possibility to turn off textures completely <-- MUST HAVE
- how to map textures to blocks?
- figured out nice procedural mapping in Blender :)
- figured out nice procedural mapping in Blender :) <-- DONE
- PROBABLY LIKE THIS:
- background textures: 128x128 with image-specific 256 color palette,
pixel access shouldn't be as time critical here (128x128/256 looks better
@ -54,6 +61,20 @@ TOTAL SIZE OF TEXTURES:
CAUSE BACKGROUND WON'T BE A 3D MODEL
- Track model has to be preprocessed, unseen walls must be removed else would
be too slow. <-- OF COURSE
- Removing unseen triangles:
- make a routine that does the cleaning, call it several times during the
model construction (waiting till the very end could run out of memory
with too many vertices/triangles, also processing so many of them could
even make it slower), it will work like this:
- go through all triangles, mark each covered or not (we can't remove
them right away, they need to stay to see if they cover other tris)
- for each triangle go through all again, mark the checked tri covered if:
- the other tri has the same vertices (trivial case), OR
- non-trivial case (consider e.g. two covering quads but split
differently) not so easy, maybe good enough: if the tris share two
vertices AND they're in the same plane (EZ to check for axis aligned)
AND the other tri has a neighbor tri that has the non-shared vertex?
- remove all marked tris AND vertices that become unused
- ====== Track/map format: list of map blocks. =======
- one block record:
- type: 5 bits?