"hello my cat walked on my keyboard and now it doesn't work"
It’s been a quiet month on the blogging front, being focused on various projects and no time to write about them.
Last night I published the first preview trailer for my puzzle game, Hidden Cubes. A game where you have to think in 3D and build increasingly complex shapes and structures. It’s coming together very well and I’m feeling pretty excited about it.
I’ve also been tinkering with a online notes app that’s designed with programmers in mind, with syntax highlighting, high performance, and advanced editor features (thanks to the super awesome ACE Editor project). It’s not quite ready for prime-time yet, but I’m hoping to tidy up the loose edges and launch it to the public soon!
While I was writing the GCode Analyzer app I wrote about last week, I was also recording the session to eventually post on my new programming and tech YouTube channel. And last night I posted it, albeit not in the form I originally intended. I had some issues with the commentary and general cohesiveness, but it did seem like a fun thing to speed up about 12 times to see the overall process of building a Windows desktop app from scratch.
So I got an executable build in mere seconds before the end of the LOWREZJAM comp. Phew.
Now, to be brutally honest, this is more of a tech demo/prototype of a game that would clearly take much longer than 2 weeks to build. I had high hopes of implementing features such as “sleeping” and “drinking ale”. Alas, time and other commitments got the better of me and I couldn’t spend quite as much time on it as I thought I would. Many things I wanted to add are missing — the original goal was to mine rubies and gems.
That said, I’m pretty happy with what I was able to build, and what I learned through the process. The project was written in C++ using the Allegro graphics/games library. I built a chunk-based tile engine that generates chunks on-the-fly as the player scrolls down. It has a custom A* pathfinding implementation — which took a lot of time to get right, and handle the various edge cases (literal ones at times). Your dwarf fella can craft ladders to climb back up the holes he digs.
The whole game is based around a job system, so digging and crafting are jobs that get queued up and the dwarf will eventually get to (if he can reach it). The skeleton AI is also based around this job system, which was handy – their only job is to chase you down!
I really enjoyed working on this project, and I think I’ll keep working on it, or a derivative of it with some cleaner code, better design choices, and a slightly higher resolution.
I’ve finally taken the first trepidatious steps into the world of using C# to write Windows apps (although I’ll probably try and figure out how to port it over to macOS and Linux). I tinkered a bit with using WinForms, didn’t like it much, tried out XAML/WPF, and found it was surprisingly nice to work with!
GCodeInfo is a little project to port the functionality of gcode.ws into a desktop app. I mostly wanted this because I switched my 3D printing slicer software of choice from Cura to Slic3r, and for whatever reason Slic3r doesn’t show you an estimated print time. Uploading the GCode to gcode.ws, and viewing it there was the only consistent way I could find to see the relevant stats. This mild inconvenience was an obvious opening for a native software solution.
Since gcode.ws is open source, it was quite convenient to port their parser code into C#. And so far, I’ve ported a lot of that parts needed for the screenshot above to work. I haven’t yet implemented the key feature I wanted, estimated print time.
Once print time is in, I’ll release installable binaries as part of a more formal launch. However, for now you can check out the neat screen-shot above, and feel free to peruse the probably very scruffy, and somewhat newbie, C#/XAML code in the GitHub project.
Tomorrow marks the start of LOWREZJAM 2017, a game jam running for the first two weeks of August where the aim is to create a game with a render resolution of 64×64. A pretty fun and interesting challenge if you ask me.
This weekend was also Ludum Dare 39, the long running quarterly game jam. But for whatever reason I wasn’t feeling into entering it was much as entering LOWREZJAM.
With the limitation of having a total of 4096 pixels in mind, I decided the best-worst idea be to go low-level and build something using C++ and the Allegro game library, instead of my regular tool of choice, Unity. I often get the silly itch to start from basically nothing but some drawing and windowing routines, and then think better of it. This time it seems appropriate, and two weeks seems like enough time to make a few mistakes.
And why Allegro instead of the more well known SDL or SFML libraries? No reason, really. I’m more familiar and comfortable with Allegro, having used earlier incarnations way back in the late-90s.
I’m planning on releasing a few tutorials, and maybe a video dev-log, while the game jam is taking place.
Today I finally dived into Slic3r for 3d print slicing. After the initial intimidation of having so many more settings than Cura, I’m finding the quality of prints from its gcode output really nice. Being able to create presets for different filaments is pretty handy too.
The ability to have different print speeds for the shell versus infill is killer. I don’t really care if the infill is sloppy, I want as clean an edge as I can get.
The only downsides are stability issues with 1.3, and the lack of print time display (solved in part by uploading the gcode to gCodeViewer).
From using a few rolls of PLA filament with my Anet A8, I’ve found leaving the filament out, to rest or acclimatize, for at least 12 hours after unwrapping a fresh roll greatly improves the chances of getting successful prints. Fresh out of the bag, and no matter the temperature of either bed or nozzle, prints tend to have problems adhering, and the nozzle randomly gets gummed up, while other rolls of filament I’ve already used print perfectly.
The most common reasons for a print not adhering are usually:
The bed not being hot enough for the filament material
The bed isn’t level
The bed is too far away from the nozzle when the nozzle is at 0 on the Z axis — The Anet A8 (and presumably other Prusa clones?) nozzle should be about the thickness of a piece of paper away. I like to keep mine at about 0.175mm, using a set of feeler gauges.
Yesterday the above hydroponic cup model would fail at the first layer, while printing the fiddly boxes that make up the base mesh. The filament would cling to the extruder every time, with fast or slow initial layer speeds. Compare to the video at the top, which is successfully printing four of the cups with very similar slicer settings.
It’s true that each roll of filament requires a degree of calibration and testing. I also haven’t found anything online describing having to wait a while before the filament behaves, so this may be a localized issue to either my printer, or the environment my printer lives in — a room that’s usually fairly warm. The infinite variables available in the slicer (Cura 2.5, in my case) can easily swing your chances from a good to terrible print
I’ve only used three rolls, two from Hatchbox and one by Tianse, so I can’t categorically say all rolls will behave like this. But after many frustrating failures yesterday, it’s nice to finally get successful prints.
I appear to have a nice backlog of unfinished programming articles, so I’d say this blog is going better than most of my previous attempts. The Electron project I’m tinkering on should help with that too.
Downtown Local Coffee
A quick pit stop today at Pescadero’s Downtown Local cafe.
It’s a great place to grab a coffee after driving, or riding, down Pescadero Creek Road to Highway 1, off of 84 from Alice’s Restaurant.
FZ6 in front of Downtown Local Coffee in Pescadero, CA.
It turns out a random Wednesday is a great time to go motorcycling on some of the best roads in the Bay Area.
For this Kalanchoe Pumilla I wanted a planter that could spread out the three individual plants. Once again designed using Blender, with another integrated drainage and saucer setup.
I really like this Kalanchoe with its dusty appearance, spiky bearpaw leaves, and unique green/purple coloring. It’s a favorite among my collection of desk plants.