mdude: Yellow and green ink blot style image. (Default)
2017-05-29 11:03 pm

A Thought on 3D Modeling

So, I was thinking about how in 3D modeling, if you're just mucking about in a program with little to no direction, one problem you might run into is dissolving some vertex, point, or face, and end up with an object that has poorly formed or connected faces. I was wondering if maybe there could be a mode of 3D editing that was a bit more resilient against that. At the same time I was wondering if it'd be a fun thing to play with a silly rendering system that drew things geometrically instead of breaking things down into triangles even though there's plenty of reason no current 3D rendered does that.

Then I considered that if everything is being rendered as a collection of triangles, maybe everything could be represented as a collection of tetrahedrons? Like maybe any 3D solid one might make in a rendered could be topologically identical to the outer boundary of some fully collected set of cells within a tetrahedral honeycomb? I'm not entirely sure, but either way I think a 3D modeler where you connect tetrahedral cells and distort them to correct proportions via continuous map functions could be pretty fun to play with and be good for sketching out low-poly designs. Guess that'll be something to work on sometime.

Edit(Sept. 12, 2017, 12:03PM): Thinking about it later, I thought of a probelm that might come up with doing this, but then I forgot it. So yeah, I'll see if it's fun to play with anyway and keep trying to think of ways to just kind of toss data at a renderer and somehow tend to get shapes that avoid clipping with themselves without really trying just because of hwo the math works out.
mdude: Yellow and green ink blot style image. (Default)
2017-04-15 03:25 am

Procedural Code Generation

Something I've been playing with is the idea of computer programs which produce other computer programs via probabilistic selection. Basically similar to the idea of Markov chain generated text or procedurally generated images, but with code.

The previous instance I created in SmileBASIC for the 3DS, which was lost when the 3DS broke and I replaced it. For output, I only got it to print numbers, which were calculated by a series of randomly generated math expressions. Constant values were added, and later variables, with a simple naming scheme of [variable type][index number] so as to easily keep track of what variable names were in use by simply counting the number of each variable type created.

To begin with, though, I was testing the control flow system with calls to the RND in place of expressions. Each time a code block deliminator was selected, it would then be decided whether to go one nesting level up or down, based on the length of the program and the current nesting level depth. The type of code block was chosen when starting it, and remembered in a stack for when it was exited. When exiting a nesting layer was chosen when there were none left, the program end was written.

This produced amusing enough results for a while, though now that I'm starting over I think I'll try things a little differently, and as I'm making it a little more complex I figure I'll write down my thoughts somewhere before I go far in it, which is why I'm doing exactly that here. I'm using javascript this time, mostly so I can easily upload it to link to various people I know without them having to get a particular 3DS program to run it. As such, I'll be making some use of objects and whatever other elements of javascript that seem handy.

While I could have done so on the 3DS, I think this time I'll make an effort to focus on graphics, and try imposing a simple control structure to generated programs, working towards something that could possibly make things vaguely game-like with a much higher probability. I'm thinking at the very least setting up distinct input, process and output phases for the main game loop, plus maybe a setup and maybe a menu system. I'd like it to veer a little more towards inscrutable nonsense than not though, so aside from that I don't think I'll be hard-coding anything like lives or objectives, maybe not even a particularly designated object to be a player character.

Might want to limit the number of draw functions their are though, to help give things a more unified graphical style per generated game despite the chaos of it. I do know that I'll want output phase functions to operate on specially designated variables that don't get read outside that phase and are blanked at the start of it, to better separate the processing in it from the actual process phase. A sort of arbitrary designation, but it's something I thinking could be useful in organizing my manually made javascript games, and it just seems like I'd be more interesting in the kind of quirks created by such a system than by one that makes graphics randomly throughout the program.