Modernizing My Geometry Generation and Rendering Code

by Trenton Henry

11/23/21


Over time I have written multiple graphics libraries for 3d rendering, starting back in college. My early 3d libraries were software renderers, on the VAX 11-780, then on PC with Hercules, then CGA, then EGA, then VGA, then OpenGL, then Metal. And honestly, I no longer care about hardware acceleration (OpenGL, Metal, etc) because these have always been a moving target and my old code always becomes obsolete as these accelerators change over time.


When more recently I decided to write a 2d library, originally pel, later renamed ddpe (2d pixel engine) I chose the absolute minimum common denominator I could find, GLFW. I use just enough of it to make windows and process user input. I render in software onto a texture in memory and then just plop that onto the screen. (Actually, there are layers, with a texture per layer, but the idea is the same.)


In any case, nome of my games using pel etc were finished, but I don't want to lose them to bit rot. So I am upgrading them slowly to use ddpe. Hopefully over time I will upgrade the yopgui and other semi-useful tools as well.


So, why am I doing this all of a sudden when I have so much zdk work remaining?


Well, I need to mill some structural components for some robots and gadgets I'm building. I have tried several options to try to get the ancient kickstarter OtherMill software to work with various tool output, with limited and frustrating success. (Bantam no longer suports that old SW or HW so I am on my own, exploring replacement CAM software.)


So I figured I would go back to wirCalc (my crude 3d graphing calculator) and Yertle (my 3d turtling code that I used variants of to make the Wibble books etc). And in so doing I decided to upgrade ddpe to support the venerable 3deity code, which I am now renaming dddeity.


Aside from the Wibble books, there are some surviving images from the original Yertle implementation.


In any case, it is all somehow related an intertwined and needs to be done. I want to make my milled structural elements as artistic as I can, with nice curvces and engraved patterns. And Yertle can do that.


Here is the list, made bold as I knock them off:


ported

_dd resurrected as ddd. A command line tool for doing things like converting BitFormMaker2 fonts to my ddf format, converting Imagemagick fonts to ddf, and for demonstrating them in a crude graphics viewer. This similar to sph which generated sphere geometries for the Wibble books.


update - The original code was ported fine. Then I added a crude 'view' command to experiment with a 3d sw renderer. That went fine but then the holidays arrived and I set it aside. I have ever so briefly (now that its 2022) poked at a new 'stencil' command to let me draw 2D stick figures that can be used as templates for sweeps and extrusions, or can be converted to gcode for milling on my CNC. (I was buiding some robots to use up some of the parts I have collected and I needed some custom chassis pieces. I tried to find some sort of sane software I could use to make these but I gave up. Then I decided to make my own. The stencil drawing is going fine. Once I have symmetry working properly and a few tweaks here and there I will switch over to saving them as gcode.)


pending

peldraw resurrected as dddraw. This is a simple pixel editor with limited palettes. I does have the scaling grid that I used in the sqrsperiment game.


sqrsperiment is an Ogre (Steve Jackson Games) inspired, Bolos (Keith Laumer books) inspired, CogMind (game) inspired, arguably Mortal Engines (books, movie) inspired, possibly to become Traction Factions. This was built on an earlier version of ddpe that had a different model of dealing with GLFW callbacks and windows etc than the latest ddpe uses so I am not yet able to get a clean compile. It may be that I just need to rework parts of it to get it alive again.


more to come ...


End