It's a machine's world!


I'm getting settled into the new office, and other than the usual "where did we pack the toilet paper?" type questions, it's going pretty well. I've also made some good progress this week; I'm pretty happy with/proud of the new machinery setup. There's still some tweaking to do, but I think it really has the potential to take this side of the game to new levels. I can't wait to see what people come up with!

Also - woot, hit my 100th download on itch! Thanks to everyone who donated - you bought pizza night for the family. :-)

Machines represent the culmination of a *lot* of hard work. Most other base ("phase 0") systems had to work before I could do these justice - so this has been a great opportunity to test (and bugfix!) a lot of the game code. I'll write this as more of a narrative than a set of bullet points, because I'd like to illustrate how this flows. The links are annotated screenshots. (The good news is that now that most of this works, I can get onto the more interesting parts of the game - just as soon as I find a fast way to handle collapses!).

My lovely wife has been bugging me to give her content for a YouTube video. So I sat down and recorded 15 minutes of game play (9 minutes after cutting). Other than thinking I sound weird (does anyone like their own voice?), here it is:

Maybe I should stream on twitch.

Getting Started

In order to demo/test machines, I needed a starting base - annotated so that you can see what's going on.


To get this built, I started by designating settlers as miners and lumberjacks. Hunted around a bit in the mining interface to find the subterranean resources I need (rock, sand and metal) and designate a mine. Mark a tree that was in the way for chopping. Go to the build interface, and designate a sawmill (to turn wood into blocks and off-cuts). Wait while the settlers grab some wood and build the mill (the escape pod knocked some trees over while crash-landing, so we had some free wood!). Use wooden blocks to build the not-fire-safe building I need (mechanic workshop - which makes mechanisms and circuits). When some stone is available, build a Stonecutters (turns rocks into blocks) and use the resulting blocks to build some fire-safe buildings: charcoal burner - which turns off-cuts into charcoal and ash, smelter - which burns charcoal and turns ore into metal, primitive forge - which burns charcoal and turns metal into useful items,  glass furnace - which burns charcoal and turns sand into glass. Finally, I made some glass and used it to make a Silicon Refinery - which burns charcoal and makes silicon out of glass (I had to Google how that works in the real world!).

With base setup complete, I'm able to start some testing! I can build *mechanisms* at the *mechanic workshop* (out of any block), and *circuits* (also at the mechanics) out of silicon and metal. I can also make spikes and other useful items at the *primitive forge* (why is it primitive? Because later on you can make better ones! Primitive forges get you up to roughly medieval levels of construction).

The simplest machine - a lever that locks a door

So we build a lever (the simplest input of them all - give a "pull lever" order and it changes state; it only requires a mechanism to build), and link it to the ship's door. The result is a lockable front door:


Some unsafe, killer spikes

It's time to build a useful base defense! Well, not very useful because I'm building it without a terrain-funnel to make people fall into it - but it's illustrative! I order up 3 retractible spikes (1 metal each, at the forge), and a circuit (silicon and metal). The circuit lets me build a *pulse oscillator* (it's basically a 555 chip from my old highschool electronics classes), which toggles between on and off on its own at a steady rate.

I build the spikes and circuit on the map:


Wire them up:


The result is deadly spikes coming up and down at a steady rate, injuring a foolhardy settler who wandered into them:


I went with an old Electrical-Engineering symbol for the pulse oscillator building; this is the world as Cordex (the shipborne AI) sees it - so that made sense to me.

Some Safer Spikes

It might be safer to be able to turn the spikes off once they are up and running! This would let you recover the bodies of your foes, perform maintenance, or even only turn them on when danger approaches. To this end, I built 3 sets of spikes, a lever, a pulse oscillator, and an *AND gate* (now I'm really starting to have highschool flashbacks!). They look like this:


They are wired up as follows:


When the lever is pulled, they go up and down. When the lever is pulled again, they stop. No settlers were injured making this one.

A controlled bridge - aka a murder tower!

This would be a useful defense, but I thought I'd try a more entertaining setup. I built a tower, and put a short bridge on the top. I wired the bridge to a lever, and told a settler to guard the bridge. Pull the lever - and the poor fellow falls off the now retracted bridge (I used to use this for dealing with prisoners in Dwarf Fortress). The result is a satisying splat!


Other Machines

There are plenty of other things you can do. You can use various logic gates (AND, OR, NOT, NAND, NOR, XOR), pressure plates, levers, oscillators, float gauges and proximity sensors as inputs;  spikes, doors, floodgates, bridges and explosives (not that you can *build* them yet - that's coming very soon!) to make everything from landmines to mazes. I'm tempted to add some memory, counter/accumulator components and let the player go hog-wild (you have all the gates you'd need to build an adder circuit, and could probably hack up a register with flood gates and float gauges - but that's hard!). There's also a few things still to do, including figuring out how on Earth to make keyboard input work for a node graph. It'd also be nice to have scrolling and zooming on the node graph for really big machines.

Other Work

* Refactored the ECS again. I accidentally wrote some code that only compiled on MSVC, so I fixed that. It's functionally the same, and traded losing a de-reference for gaining one further down the line - so it performs exactly the same, too. It compiles on GCC/Clang now.
* Fixed up my CMake-based build and got things working in CLion/MSYS2. Fixed up the README to include `fmt` as a dependency (thanks to *cfcs* for pointing that out). Between `ccache` and `cotire` it builds pretty fast (very fast on incremental builds, 13 minutes on a clean/rebuild). The executable is a little slower under MSYS2 right now, but I'm working on it.
* Save games are now versioned. When I update the save format, old saves won't work - but they won't crash trying to load - they simply won't show up as being available. I think that's an ok compromise for now in pre-alpha; obviously, I'll have to work to avoid losing everyone's hard-won games further down the line.
* Removed the thread pool for now, since I'm no longer relying on it - and I'd like to replace it with one that has MUCH better latency. CTPL is cool, but there was too much of a delay between starting a task and it doing something.
* New graphic for Silicon Refineries.
* You can make glass spikes at glass furnaces.
* Fixed a piece of busted logic in the gravity system that made you hang around for a while before falling. Cartoony, but not what I had in mind. I wish I'd had the presence of mind to record that!
* Fixed an issue with architecture that was giving it too low of a priority, and settlers would literally rather do ANYTHING but construction. (They'd do it when they ran out of every other task...)
* Fixed an issue wherein a settler would die, and his "friends" would haul him/her to the butcher shop and extract "settler meat". Ick.

Files

nox-futura-windows-pre-alpha.zip 49 MB
Version 10 Apr 05, 2018

Get Nox Futura

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.