v1.00 Public Beta Testing

The biggest Bitphoria game in history.

Looks like some people have started taking interest in Bitphoria. There are a lot of kinks to work out, some people are having issues starting a game and having their friends join. I'm looking into it. Lots of little things are being figured out: players can be hard to see, chat messages disappear too quickly, the server I'm running crashed in the middle of the night while two people were playing, AI guys are more aggressive than they need to be, etc.

The end result is inevitably a new release, v1.01, which will have a new network protocol version. The master server will only relay game servers to your version of Bitphoria that are running with the same network protocol. I will be updating my game server to v1.01 when it's released, so people who are still playing with v1.00 will not be able to see it or play on it. An auto-update feature will be implemented down the road, for now my focus is on the engine.

It was also suggested that an automated installer would make it easier for some people to start playing Bitphoria. I already have a process in place for achieving this and wasn't planning on utilizing it until Bitphoria was out of beta, but I have decided to include an automated installer with the next release.

I estimate v1.01 to be released some time next week, maybe sooner.

Thanks to everybody who downloaded the current version and has been playing with it. This has been more fun that I could have imagined :)


Bitphoria v1.00 Beta Released

Pre-release early screenshot of Bitphoria.
Bitphoria has been released. It's in public beta, and this is the very first (aka 'worst') version ever. Start games (don't forget to forward your UDP port if behind a router) and play with others. Dive into the scripting system and make whatever your heart desires. Let's see what Bitphoria can do.

An engine guide is in the works now, to help users better understand the various console variables and how to make full use of them as a sort of 'power user'. I'm sure anybody with their wits about them could figure out most of them just by surfing the console typing a few characters and pressing 'tab'. The confusion, by comparison to most engines with a console, will lie in the fact that the vast majority of console commands are for scripting, and not intended to be executed while in a game, or while just idling in the main menu system.

If you're the type of person who likes to get into new things, unafraid, and share your findings with others, then by all means download Bitphoria, start screwing around, and Youtube your experiences. Share this thing with the world. If you could notify me of your intentions to release a video of your time with Bitphoria that would be great, just so I could follow along and gain some insight as to what I should work on or do differently.


Final Day Thoughts

I started Bitphoria in April of 2014, focusing solely on how the world was generated, represented, rendered, etc.. I had a pretty clear vision of what I wanted the engine to be capable of, and I feel I have achieved that.

Yesterday I finally reached the 20k lines of actual code that I predicted Bitphoria would have by its release date. The scripting manual for making games out of Bitphoria is complete. I'll be uploading the game tonight for release. It's a public beta version that has all of the features I wanted but are not fully polished and probably have some bugs. The goal is to see what kind of feedback comes from releasing it in the state it is in. I haven't been actively promoting Bitphoria very much at all, and figure that if it's any good it will sell itself by spreading via word of mouth. People will post screenshots, youtubes, start making games, playing against eachother online, etc..

Only time will tell.

Bitphoria's source code folder, comprised of 20k actual lines of code.

Tomorrow I will be sharing its release on Reddit and other various online communities, so we'll see what sort of response develops. This blog itself has just been a place for me to share my thoughts, and it does get a few dozen hits a day now, but nothing I would consider a great internet success, not by a long shot. I hope some people have found enjoyment and value in my blog, and perhaps if more people knew about it there would be more people that did find value in it.

I developed Bitphoria on my own time, while being a full-time stay-at-home Dad and running an Etsy business with my wife Heidi. It's a project I've always wanted to do, that I've attempted many times for the past 20 years, and life always seemed to get in the way. It was a matter of time before I finally made something.

Bitphoria's future is in the hands of the people after today. Once it's out there I'll probably stop working on it altogether unless it starts developing some kind of following or fanbase and I begin receiving feedback. At this point, it will serve as a great portfolio piece that demonstrates how well-rehearsed I am with all aspects of game development, from graphics programming, to networking programming, procedural techniques, and everything else in-between. This is just what I could do by myself in a limited amount of time, and I could do a lot, because I always dreamed to.

Bitphoria avoids issues like asset management and art pipelines, because I didn't plan on having artists, I planned on the players being the artists, almost in the same way that Quake and Half-Life were made popular by Team Fortress and Counter-Strike respectively. It wasn't the base game that made the game famous so much as it was the creativity of the masses. I'm counting on this, somewhat, with Bitphoria, and the fact that people like to make stuff. Bitphoria is meant to serve as a platform for people to create and share their creations, by abstracting things in a highly simple fashion that is easily accessible through a simple script-based construct.

Bitphoria's initialization function.

My goal was to have three separate games for players to play that were somewhat fleshed out. I will probably flesh them out in time, but I spent more time in the engine code than I had thought I would, so this first release will only really feature the deathmatch game, and the two barely-started CTF and instakill games that are far from complete. Fortunately every functionality of the scripting system is utilized by these games, for I had to test each one while developing it, so they appear somewhere in at least one of the three games' scripts. Hopefully this, in combination with the scripting manual I toiled to produce, will allow someone to start making something more inspired than the default games. The capabilities required to make a great game is there, that's a promise.

The master server will be running once I upload and link the release. I haven't fully tested it yet, so if you're one of the first people to download and playtest with a friend, please let me know if you encounter any issues immediately, so I can rectify them as quickly as possible and get something that people can fully dive into without having to worry about being able to connect with other players.

This is going to be a sort of Wild-West time if Bitphoria picks up and people start taking interest. There will probably be bugs and simple tricks to take advantage of the game, perhaps malicious server-crashing bugs, etc. that will be discovered and exploited. If these are found I will solve them just like everything else throughout the game's development, and they will only be found if people are actively trying to enjoy it. If people want more from Bitphoria, I will work to provide it, and it will be a process but we can get it there. I've been developing Bitphoria in a virtual vacuum, without much outside influence or suggestion, aside from the few comments coming from my long-time friend Paul Hindt. Other than that, this is the first time Bitphoria will see the light of day. This is going to be the worst Bitphoria release yet, and better ones are to come if enough people are interested.

If the game is DOA and nobody takes interest, I will eventually release the engine's source code as well, because I feel it is important for people to have resources to gain inspiration, insight, and ideas from. I took a lot of inspiration from the Quake engine, and the original Cube engine, insofar as some of the conventions for game logic are concerned.

Following in the same vein, Linux and MacOS ports will not be hard to produce being that the game runs almost entirely ontop of SDL2, but I don't plan on doing the necessary steps to releasing ports unless a demand arises. The only platform-specific code involved in the engine, as a matter of fact, is the code that lists all of the games in the games folder. There is no platform-independent method for listing the files in a directory so I wrote a simple command-line that performs a 'dir' command and dumps the result into a temp file that is loaded and the names of the game files are then extracted from. Other than that everything is occurring through SDL, so it shouldn't take very much time to compile ports.

All-in-all this release could have happened sooner, but I didn't want to have an Alpha release that lacked many features from the final product. At least at this point they are present and accounted for. There are maybe two or three little things I'd still like to add in, but at this point the project needs to get into the hands of the public so we can see what happens with it and where it should go next, if it is something that's bound to go anywhere at all.

Ultimately, if Bitphoria becomes somewhat popular, I will be pushing for actually selling it. To mitigate piracy I will be selling online player accounts, following the Minecraft model, which will integrate with the master server and be required in order to play on servers that are listed on the master server. That's down the road, but is solidly the plan if, again, people show interest.


Bitphoria's Release Date Announcement

 I have decided to make my 30th birthday the release date for Bitphoria, which happens to be August 30th 2016. There are several things I'd like to finish, among bug-fixes and networking improvements, before the first release and I thought I'd share that list here. Whatever state Bitphoria is in on that day it will be released.

It is obviously crunch time now (a great motivator for me) so the things on my list that I'd like to have done might be cut short, but I will continue working on it well into the future beyond the release. This will manifest itself in the form of new and updated releases. The initial release itself is meant to serve further development of Bitphoria by allowing other people to finally start messing around, playing games, scripting games, and providing me with bugs and feedback about everything.

I plan on releasing Bitphoria as a sort of public beta, for people to get to know it and see what I've dumped almost two years of my life into. Maybe down the road I will sell it for a few bucks on Steam/ Maybe I should crowdfund polishing it, because I clearly have something that's worth something to someone, somewhere, out there, and I think it has a chance at being a crowdfunding success (after all the hard work is done already).

Hardware contributions/donations are always welcome! ;) I'm currently developing Bitphoria on four different machines: two low-end laptops from a few years ago, a low-end pre-built HP desktop from the same time, and a custom-built desktop - all with integrated graphics. I did manage to borrow an nVidia GTX 680 in the custom-built desktop system that allowed me to record some footage of Bitphoria earlier on, but have since been without and could definitely use a decent GPU just for the sake of tuning Bitphoria's graphics to where high-end systems can be fully taken advantage of for hardcore PC gamers, as well as allowing me to record updated videos of what Bitphoria looks and behaves like. Recording video is actually my primary goal insofar as GPU acquisition is concerned, because without it I will have a harder time demonstrating the game. Worst-case scenario hopefully fans out there will take it upon themselves to youtube videos of Bitphoria. If nobody does that then I've failed at making something that sells itself, obviously, and that's the goal of any project of mine!

If the case is that nobody ever cares about Bitphoria, and it just gathers cobwebs and dust in a dark corner of the web (on this blog, and in a few reddit posts), never amounting to anything more than just a "portfolio piece" for me to acquire a dead-end soul-crushing software engineer job, then at that point I will just release the code in its entirety for everyone to tinker with and learn from. At any rate, the code will ultimately be released eventually. The 'when' of that is still up in the air, and probably will be for at least another year. But if I can earn a living for my family via my lifetime hobby then I'm certainly going to try before giving it all away. Over two decades of programming experience has gone into this project, and there are even things that I learned along the way while developing it that I'd like to invest into a new game engine project, but those are things that I'm just going to hang onto until I feel that this project is 'done', through-and-through, which includes promoting it to a respectable degree that hopefully provides it with enough exposure to ascertain as to whether or not it is something that there is interest in.

As far as my pre-release todo-list is concerned I believe that setting up a master server for people to find each-others' games is imperative, otherwise the whole project is pretty pointless if people can only start a game server, run around by themselves, and then quit out and never play it again. Scripting features and functionality seem less consequential and could be added in along the way at a later time after the initial release, but the existing setup is rather competent. Finishing the scripting documentation also remains a top-priority issue due to the fact that I wish for people to be able to start playing around with the engine itself to see what they can come up with within the creative sandbox that it represents. It has its quirks and nuanced requirements insofar as game performance are concerned (graphically, physics-wise, and networking) which is the case with any game engine out there. However, I would like to point out that it takes no game-development know-how or modding experience to make something out of, or with Bitphoria. Anybody should be able to simply open up the script files that comprise the default games included with Bitphoria and start surfing the documentation to figure out how it all comes together.

Here's my list of things left to do for Bitphoria before releasing it that I'm currently focusing on for the next few weeks:

Master Server: Write and launch a master server to run here from my home to allow players to be able to start and find/join eachothers' games. Along with this I'd prefer to invest in a domain name that points to the master server (my house IP) for the in-game server browser to download the server list from. This would actually kill two birds with one stone. Firstly, it would eliminate the learning curve of PHP and MySQL that I'd need to traverse if I were to create an HTTP master server. I *do* have enough experience with both to make it happen but I'm not competent or well-rehearsed enough to simply knock it out within a day or two - and it would require that I implement HTTP request functionality into Bitphoria, be it by hand or integrating CURL/libCURL. Secondly, running a custom-coded master server from home would allow me to easily implement a NAT-punchthrough handshake protocol to allow anybody to start a game without being required to deal with their router/firewall and port-forward. Conversely, anyone else would also be able to join any game regardless of whether or not they themselves are also behind a router/firewall. This functionality requires that the master server notify game servers when someone is trying to join them, and from what IP/port, allowing the game server to go ahead and send a 'trailblazing' packet to the client player for the sake of tunneling through the NAT and have it route packets from that client player's address to the game server. To have a console application running in the background on my desktop, written in C, using winsock or SDL_net, that would be easy to manage would be much simpler and cheaper than any remote/online option I've come across so far. If at some point there's too much traffic for my home connection I'd then move the master server program to a dedicated virtual host and simply point the domain name at that, and everything will just continue working for everyone without any changes for end-users.

Network Buffering: Implement a network buffering system to, for one, allow for the simulation of latency and its fluctuation for testing/tuning purposes. So far I've only been able to generate repulsive/gross/erratic network behavior when my daughter watches Youtube/Netflix on her machine while I have two machines sharing a Bitphoria game over our wireless LAN. Also, in spite of my efforts to fight network update jitter using extrapolation when an update packet arrives later than intended, it would seem that Gaffer's strategy ( of simply buffering network updates long enough to encompass most network jitter and then subsequently emitting them to the engine internals at the interval they were intended to arrive at would be vastly more effective in its precision and lack of interpolated correction. Buffering network packets as such would also allow me to simulate internet conditions locally without having to track down willing testers (I'm not really a 'people-person', and I have no more computer friends left) and fine-tune everything for what I like to think of as the 'fringe-market' - people who don't have high-end gaming systems (a netbook) or fiber-optic connections. I'm of the mind to release a game that looks prettier the better the setup, but also is completely performant on less ideal setups. Why focus on one area of the market if you can focus on the entire market?

Scripting System Documentation: Finish the scripting system documentation, which would include indications as to where inside of the the sample/default games that are packaged with the initial release that users can find examples of each script command, along with tips/tricks. Also, early on I made it a point to document everything that I script for Bitphoria because I know that people out there should be encouraged to tinker around and pull everything apart.

Artificial Intelligence: Add in simple AI functionality that allows an entity to seek out other entities and designate them as its target, which it can then follow or aim at. This would make it possible for simple zombie-type enemies that just follow players and harass them while they try to carry out other things. I'd like to include some kind of simple navmesh generation that is derived from the distance field of the world but I am thinking I am just going to literally index the distance field and use that for obstacle avoidance while entities try to pursue other ones. If a target is unreachable then it could back out following the distance field outward until the target is visible again, or a new target is found.

World Generation Modes: Add options for the style of the world generation itself. Right now it's a fixed algorithm and starting a game server entails selecting a random seed and then a vertical-scale which is forwarded to clients so they can then generate the same world themselves and play. The world is generated as a 128^3 volume and there's a lot more that could be done with it than just leaving one algorithm in there for people to experience.

Physics Attachment: Entity attachment which allows for an entity to literally attach itself to another entity and inherit its position/motion, with or without an offset that is oriented with the entity being attached to. This could be used for CTF games or power-up modes that want to display some kind of visible effect.

These are more-or-less listed in order of priority. What actually happens by the release date is still completely variable, these are just my intentions and goals, and it's hard to say what exactly will occur as I pursue each bullet point.


Bitphoria Screenshots

 I just felt compelled to post some new screenshots. Not much has changed as I've been working on underlying stuffs and writing the scripting manual, but it sure looks purdy.

Check back soon for more updates. I'm in the midst of designing the master server situation so players can start and find one-anothers' games easily without any port-forwarding nonsense. I'm also hammering out the Bitphoria Scripting Manual as a guide and reference for people who want to make their own games out of Bitphoria and share them with the world via the ingame server-browser. Players do not have to download anything externally to play custom Bitphoria games. It's a thing of beauty.


2D Rectangle Overlap Algorithms

 While working (not so) diligently on the re-write of Holocraft I encountered a situation where the need for an age-old algorithm arose. The algorithm itself, and/or its implementation, has had many minds over the course of time to boil it down to a few bare-necessity lines of code.

Example of the problem and some possible conditions.

 Determining whether or not two rectangles overlap or intersect has been one of those problems that has found application in many a project. It's rather simple to implement, and most novice programmers take pride in discovering a solution to the problem, even including the case where the algorithm is extended into the 3rd dimension in the form of 'axis-aligned bounding-boxes', or 'AABBs'.

3D axis-aligned bounding boxes intersecting.

 There have been many games which utilize either a 2D or 3D variant of this algorithm to determine if two objects in a game world are colliding with one-another. The original Quake game is an example of a game where entities had their collision volume defined by way of an axis-aligned bounding box. This caused players to axially slide off other objects as if they were a flat cubical shape. Personally, I prefer using a cylindrical or capsule collision volume for players and NPCs, because this gives a smoother collision resolution where the player just sort of slips and slides around other players and objects. Most modern games utilize this sort of collision volume for players nowadays for low-fidelity intersection tests, and sometimes as a pre-test to avoid the cost of doing more intricate intersection tests in the case of hitscan weapons and the like.

 At any rate, during my outset to re-write Holocraft it became clear that it was imperative that there be a way to detect where groove optics are overlapping, or otherwise intersecting one-another due to the fact that many of my trial-holograms thus far have been muddied in areas where the density of intersecting groove optics is too many. Too many intersections and too much overlap of grooves can completely annihilate the clarity of their reflectivity. The solution is to prevent the machining process from scribing over the same areas, allowing the fore-front optics of the hologram to take precedence over the background optics, optimizing the overall clarity of the hologram as a whole.

A screenshot of the new Holocraft showing the geometry and optics of a moderately detailed specular hologram. As you can see it is very easy to create many overlapping and intersecting optics (the curved colored lines) which will reflect light to depict the white dots along the edges of the model's geometry. Blue optics will appear nearest, red the furthest, and green will appear with mid-range depth.

 Now, per Matt Brand's whitepaper on Specular Holography, groove optics are hyperbolas that are calculated from the assumed incident light ray altitude angle that will be illuminating the hologram. I have chosen to calculate from the the hyperbola a cubic Bezier curve, which is defined by a starting and ending point, and two control points which dictate the curvature of the line that traverses the space between the endpoints. This curve then serves as the internal representation of the base shape from which all optics for the hologram are then derived, based on the 3D position of the point that is chosen from the source hologram geometry's vertices, edges, or surfaces that will be depicted by this reflective optic.

 These optic curves are segmentized by an occlusion-culling pass, which designates which spans of the curve should reflect light based on whether or not the hologram geometry should be 'blocking' their visibility, on a per-degree of viewing angle (or 'azimuth') basis.

 Once these segments of visibility are determined I then need to determine which ones are intersecting or otherwise overlapping one-another too closely to cause degradation in the final hologram. One way is to brute force compare the distance of every single point of each optic segment against every single point of every other optic segment to determine if the segment needs to be clipped or split/culled, etc..

 To speed this process up I have resorted to the use of a simple bounding rectangle overlap comparison. Effectively, this is a 2D axis-aligned bounding box intersection/overlap test. This is what I call an 'early out', where the core loop that is performing these comparisons and tests can quickly and cheaply pre-determine that there is no possible way for two given optic segments to be intersecting (because they are, for example, on opposite sides of the specular hologram).

 If there *is* an overlap detected between the two rectangles bounding two optic segments, then Holocraft proceeds with a more detailed comparison of the two segments, effectively comparing each point on each segment with each point on the segment in question. This is a simplified explanation of the actual process which determines overlap/intersection, as the actual algorithm uses a heuristic method to dynamically adjust the increment at which it 'steps' along each segment to the next point to compare with all the points of another segment to perform a distance check. This helps to accelerate the process, which is albeit fast enough without the heuristic method being as Holocraft only performs intersection detection when the user is saving the holographic output, currently as either an SVG vector image file or directly to CNC g-code.

 Now, the whole point of this blog post is to share the method by which I devised a rectangle intersection test that serves more utility for Holocraft's purposes. It would seem that with my growing years as a programmer I have been growing a rabid aversion to doing things the tried-and-true way, with a sort of desperation to find a novel way to go about doing things that people have already been doing another way for decades.

 A part of the heuristic method by which Holocraft accelerates optic intersection/overlap detection relies on knowing the rectangle of overlap itself in which two given segments are possibly intersecting. Knowing that their bounding rectangles is overlapping as a mere boolean piece of information is not sufficient for it would require that *every* point on each segment is compared against *every* other point on the opposing segment. To minimize this only the points on each segment that are within the overlapping area of the rectangles is considered.

Here's a copy-pasta of what Holocraft does:

typedef struct
 float x, y;
} vec2;

// 2d rectangle
typedef struct
 vec2 min, max;
} rect2d;

#define MAX(a, b)  ((a) > (b) ? (a) : (b))
#define MIN(a, b)  ((a) < (b) ? (a) : (b))

// returns zero if no overlap, otherwise returns
// area of overlap and optionally the rectangle of overlap via '*o'
float intersect_rects(rect2d a, rect2d b, rect2d *o)
 rect2d c;
 float dx, dy;

 // find horizontal overlap
 c.min.x = MAX(a.min.x, b.min.x);
 c.max.x = MIN(a.max.x, b.max.x);

 // not overlapping horizontally...
 if((dx = c.max.x - c.min.x) < 0)
  return 0;

 // find vertical overlap
 c.min.y = MAX(a.min.y, b.min.y);
 c.max.y = MIN(a.max.y, b.max.y);

 // not overlapping vertically...
 if((dy = c.max.y - c.min.y) < 0)
  return 0;

 // caller requires rectangle of overlap ?
  *o = c;

 // return area..
 return dx * dy;

 This is with the goal of quickly calculating the rectangle of overlap itself, while putting priority over the horizontal check over the vertical check (perhaps in Holocraft's case this should be reversed?) and will bail out if the horizontal overlap fails before bothering with the vertical overlap check.

 This is in contrast to most of the functions you will find on the internet, which perform a few simple greater-than/less-than checks against the min/max of the bounding rectangles/volumes and provide no other useful information.

 In the past, for game physics, I would just make everything a sphere and perform a simple pythagorean distance check against the combined radii of the two entities in question. I almost opted to use circles as early-out bounding volumes for optical segments until I actually sketched on paper how much extra space a circle would typically have over a simple bounding rectangle.

 Incidentally, the rectangle boundary calculated for each segment is derived from the convex hull of each curve, which is defined by both the endpoints of the curve and the control points that define the shape of the curve itself. It is said that the entirety of a cubic Bezier curve is contained within this area, and if there was a fast way to perform intersections against these convex hulls then that is what I would do, but there really isn't. This would require a series of line intersection tests and be quite a bit more complicated than it is worth.

Demonstrating the confinement of a cubic Bezier curve to its convex-hull, as defined by its endpoints and control points.

 One of the advantages of using cubic Bezier curves as an intermediate representation is that outputting a vector image via the SVG file format allows for cubic Bezier curves to be defined as-is, without converting or transforming to any other form.

 This is in contrast with outputting CNC g-code, in which machine toolpaths can only be defined as either linear or circular motions, requiring an intermediate step in Holocraft which deduces a series of circular arcs chained together to form an optic curve. This is done within a user-supplied tolerance value, to give some degree of control over how large/complex the final CNC g-code output is, and the degree to which the machined grooves are faithful to the calculated optic hyperbola.


NewbieTime is Live

 I made a game for my children called NewbieTime. It's an idea I had a few years back but didn't get around to working on until last summer in the middle of Bitphoria development. I had everything pretty much finished and polished and ready to release and somehow decided to move on to other things instead. Well, I stumbled across it and decided it was time that it saw the light of day and now it's live for download/sale at

 Check it out and let me know what you think!

 Working on a re-write of Holocraft that is much cleaner. After much aluminum scoring and grooving I had come to the realization that I needed to mitigate the fact that groove optics were allowed to intersect with abandon. This allowed for spots on holograms that are densely populated with optics to appear 'dirty' and effectively ruin the holographic effect. In order to properly deal with this within the way that Holocraft was slapped together would be just more sloppy work, so I opted to re-write to allow for much better.... well... everything.

 Occlusion culling will be on-point, and the program itself will run much faster, and deal with larger and more complex geometry much better. More on this once it's finished.

 Also on the todo list is documenting Bitphoria's scripting system, which is the final step before an initial public release. I want people to be able to begin playing with the scripting system and see what they come up with. Multiplayer functionality is all there, and entire games can be made out of Bitphoria but I have not been so inclined to actually make a game as of the past year.

 I still need to figure a master-server setup that will allow players to easily start and join one-another's games. This will be included in a later release.


Holocraft - The CNC Machining Adventures

 Much has happened with Holocraft since the last blog post. I now have an X-Carve tabletop CNC routing/milling machine now, which I spent the entire holiday season building from the ground up. I needed a place to put the machine on, because I had no space large enough to accommodate it's massive 31" square size (except the kitchen/dining table, but that wouldn't have gone over well with the wife). So I invested in two smaller tables from IKEA that when placed butted up against one-another they create a perfectly sized platform for the machine.

The TARENDO table from IKEA.

The tables are sturdier than they look. I assumed the legs would be wood, just as the top surface of the table is, but they are actually steel, and the whole underside of the table is also braced with similar steel beams. The tables, however, are not completely impervious to wobbling when the machine is dancing about across a hologram, which required some extra fastening and stabilization to be put in place.

The machining setup nearing completion atop the pair of TARENDO tables ordered from IKEA

When I ordered my X-Carve from I went ahead with the option to get the Dewalt 611 router to use as a spindle in the machine. Unfortunately both the DWP611 and the power supply interface board were out of stock and wouldn't be shipped out until January 8th at the latest. I ordered my machine on the 16th of December, which was a Wednesday. Everything arrived (minus the spindle and PSU) the following wednesday in a pair of boxes.

UPS had just left my driveway when this happened.

Since the Dewalt spindle was going to take nearly a month since my X-Carve order was placed to arrive at my homestead, I opted for a backup solution and invested in a high value package deal I found on Amazon for a Konmison 48v DC spindle that comes with it's own PSU, and a set of collets up to 7mm in size (just over a quarter inch). It also comes with its own CNC mounting hardware but it isn't usable on the X-Carve, so I opted for the 'universal spindle mount' that sells on their website, and it has been working out just fine.

Being that both the X-Carve and Konmison spindle have their own PSUs, I opted to stack them so that the fan in the XC PSU would help the Konmison spindle PSU cool down as well, by placing the KSPSU upside down ontop of the XC PSU.

This was the end result:

I call it the 'Frankensupply'.

As you can see, the XC Arduino and GShield are on the left, and the Chinese PSU is strapped ontop of the XC PSU, with the spindle potentiometer strapped down on the corner of the spindle's PSU. I figured that this configuration will best be suited to whatever I come up with insofar as an encasement or enclosure are concerned, cutting holes for the potentiometer, air flow, and power/USB lines. So far I have not been electrocuted, so that's good.

Another issue that arose was how I was going to be mounting my aluminum into the machine as I opted to save 250 bucks by not going for the default wasteboard that comes with the XC machine. Instead, I tried mounting the aluminum directly to the machine frame itself. This *does* work, but it allows for much torque against the X-axis gantry. This is due to the fact that the workpiece sits so far down below the gantry that there is a considerable amount of leverage against the gantry itself, being that the tool is not directly below the gantry but instead jutted out infront of it where the spindle itself is.

The Konmison DC spindle itself has been serving rather appropriately. I have managed to create a few different things with it.. On the plus side it is very light (compared to the DWP611) and runs at a rather decent 12k RPM, according to the seller, but this is something I've yet to determine with something like a tachyometer.

On McMaster Carr's website there is a slew of different metals to choose from. Knowingly, I opted to go for either the 1100 alloy or the 3003 alloy, both of which are extremely pure forms of aluminum. Being that they are pure they are also extremely corrosion resistant, simply because aluminum itself is highly non-corrosive. The other property of aluminum is that it, in its pure state, is very soft. It is on the order of between lead and copper. You can easily scratch it with a pushpin. It's not exactly the softness of lead, but it's definitely not steel.

I had originally opted to go for the softest and purest aluminum available via McMaster, which is the 1100 alloy. The reason for this was simply that it was just the purest they offered, and it was pretty cheap. I started out with five 6x6x0.063" sheets of this (1/16" thick) just to try out. At the time I was still milling the aluminum, using tiny 1/16" and 1/32" ball-nose end mill cutters, and cutting this soft aluminum was wretched at best. It would effectively pile up the removed aluminum along the sides of the grooves. This was disgusting.

I then went ahead and tried out the 3003 alloy, which is actually a bit cheaper than the already-cheap 1100 alloy. It seems to be virtually the same, machining-wise. But sine it's cheaper it's going to be my go-to hologram metal.

The 3003 also comes in a wider variety of thicknesses. Now, provided that I will only be making grooves that are only a few thousandths of an inch deep into the metal, I still need the metal plate itself to not be flimsy and prone to getting bent by slight forces, so thus far I have been opting for sheets that are .050". I actually have on order some more that are only .032" thick, just to see what that's like (plus it's even cheaper).. So hopefully that works out. But thus far, between the 1100 and the 3003 I think I will be sticking with the 3003 simply due to its price. made life somewhat easy for a while.

Now, being that Holocraft's original means of output was by way of spitting out SVG file paths for the eCraft paper crafting machine, it was a miracle to discover that out of all the free CAM software out there there was only one that could handle the thousands, and even tens of thousands of grooves being output by Holocraft, and that was MakerCam.

MakerCAM made it a snap to convert my hologram toolpaths from an SVG file into a CNC g-code file. This was not without its caveats, of course... For one, the user cannot control how exactly the toolpaths are generated for the paths of any given SVG file. Many times I would find that MC's output would resume cutting a groove from a single side. Over and over it would enter the material to cut a groove, cut through to the other end, then it would raise the tool up over the surface to move back to the beginning side again. To my mind, it would be much quicker to finish a groove, move a little deeper into the material, and then continue back the other way in reverse. No, this wasn't happening with MakerCAM.

In order to actually control my machine and run my hologram-groove CNC programs to create actual metal surfaces I needed a program that would drive my GRBL-based CNC machine. Among the popular online communities there are a few recommendations that seem to satisfy everybody's needs. Unfortunately, I had no luck with these suggestions because they were not suited for massive g-code programs with tens of thousands of lines of code. These programs could only handle *maybe* a thousand lines of g-code at a time, which was useless for specular holography purposes.

Lo-and-behold, I managed to come across grblControl, which is a relatively newer GRBL controller program that features all of the bells and whistles of the other popular programs with the exception that it runs FAST. It can handle the largest of g-code programs I can throw at it, without breaking a sweat. To anybody using a GRBL based CNC I highly recommend you check it out. It is the only program I have used with my CNC, ever.

It is simple, efficient, and has plenty of features that make machining as painless as possible (which is still rather painful, but at least grblControl doesn't contribute to the pain).

There were a few things that were not exactly desirable about grblControl, but being that it is open source I was able to install and load up QT-creator and dive into the code and start making my own custom version of it. The first thing I opted to change was the fact that it operates strictly in metric, and all of my experience, expertise, and tools are designed for imperial. So, after some hunting and pecking I made my own imperial version of grblControl.

Aside from that I have made a slew of other changes, visually, and also functionally, just to get grblCotrol to be best suited to what I am trying to accomplish with it. Thus far I am really happy with where it's at now.

After a while it became apparent that if I were to have finer control over how the grooves were being cut I would need to implement functionality in Holocraft that would directly output g-code for a CNC machine, and completely obviate the need for any CAM software to generate the toolpaths in the first place.

The way that MakerCAM was interpreting the SVG files was random, at best. I could not rely on the fact that just because a path was defined going from point A to point B that it would be machine in that order. In some cases it seemed to make weak attempts at optimizing the toolpath by alternating directions between successive optical grooves, where when it ended cutting one groove it would then move up to the end of the next groove and cut toward the starting side of the groove definition, but there was no metric by which to reliably cause this to happen, or not happen..

As it stands, my machine has issues with machining holograms (or metal, as it were) due to the mere fact that when it is cutting in the Y+ direction (cutting away from the front of the machine) the leverage on the gantry causes it to lift up, which effectively prevents it from cutting as deep as it is supposed to because it is too friendly to the surface when moving in the Y+ direction.

Conversely, when the machine is cutting in the Y- direction, the gantry leverage just sucks the tool down harder and deeper into the material, gouging it much deeper than would be intended. The end result is that I must cut my holograms with the grooves being formed in one direction along the Y axis. I chose the Y+ direction simply because I'd rather have lighter grooves than inevitably and irreversibly deep gouging grooves that are formed otherwise.

This was discovered when originally cutting holograms where the grooves were traveling from X- to X+, in a left-to-right fashion. What was happening was that the left side of the groove (traveling in the Y+ direction while moving X+ rightward) was lighter than the groove was on the downslope traveling in the Y- direction. This is purely a product of the design of my machine, which was not designed to be used as a sort of drag-engraving machine in the first place, and so ways and means have to be put into place to work around this weakness of the machine.

Another issue that arose was the resolution of the machine itself. Was the X-Carve even capable of distincting grooves into the surface of the aluminum without there being obvious stair-stepping resolution artifacts? Well, we are running with 20-tooth pulleys on 2mm pitch belts means one revolution is 40mm along the belt.. With 200 steps per motor shaft revolution, with 8x microstepping, should be at 40mm / 1600steps =  0.025mm.. Therefore, we should easily have a resolution of at the very most .001" of an inch for our grooves, which seems plenty fine provided that we are malking those grooves fast and smooth and not moving to each exact increment of the motor to scribe the metal's surface.

Now, in practice, what I've found is that running the machine at the highest possible speed (going into GRBL config via '$$' command and playing around with max speeds and accelerations while tweaking the power dials on the gShield going out to the steppers) I've managed to get my CNC to fly like none other. The problem is that when I exert force into the surface of aluminum with a carbide bit at such speeds there is enough leverage at play to allow for what we in the States refer to as 'speed wobble'. This is not a machining term, this is something that happens when you are flying down a hill on a bicycle or a skateboard and your rate of speed just becomes too much.... Too.... Much... The end product being that your handlebars or skateboard begin resonating side-to-side uncontrollably so until the point that a crash of some kind is usually inevitable.

In this case, it results in wobbly little grooves, which are exactly *NOT* what we want, because we are trying to scribe optically accurate/useful grooves into the surface of the aluminum.

So, it has become a balance of slowing the machine down to minimize the wobbles as much as possible, without sacrificing speed, and without introducing a sort of stippling that arises from the actual machine position increments manifesting themselves in the grooves themselves, which are equally as ugly when it comes to optical applications.

Playing with the depth of the groove and the speed at which it is formed has been a bit of a journey, as well as taking other measures to mitigate the 'wobble' by raising the workpiece closer to the gantry to minimize the leverage that the tooling edge has against it. Stiffening up everything on the machine has been another project as well.

Here is a low-fi video of a hologram I have been working on for my younger sister, for her birthday. When I can manage a better camera I will (feel free to donate!).

Here is yet another video of another test hologram featuring some random abstract cuboidal shapes merged together in a sort of splatted configuration. Again. feel free to donate better camera ware!


Konmison 300w Spindle Motor with PSU and 13pcs ER11 -
MakerCAM -