This post first appeared on Reddit’s /r/roguelikedev sub-reddit. You may find the original post here.
My github with all the source is here
I spent quite a bit of time cleaning up behind-the-scenes stuff:
- The Entity-Component-System now makes use of variadic templates to build a separate vector of each component type (no polymorphism or pointers); contiguous storage is generally a win.
- Gave back-ends a similar treatment, so it specializes at compile-time to the back-end I want to use.
- A thorough refactoring to remove game dependencies from the engine (much faster compile times).
In terms of the game:
- View-sheds now take into account obstacles, including altitude – so you can look down from a hill, but you can’t see very far up a hill. That should make for some interesting tactical considerations!
- Settlers now have names, randomly derived from old US census lists. They also have genders, sexual orientations, heights, weights, and d20 system stats.
- Got the calendar system going, so time advances and sun angle is based on time-of-day.
- Setup pause/resume.
- Setup the basics of the “power” system; if Cordex runs out of power, it’s game over. For now, there are some solar collectors (more efficient when its sunny!) – and no drains, so you can’t actually die of this yet.
- Added the crashed escape pod in which Cordex and the settlers start.
- Full entity-component serialization, and the game saves when you quit (“play game” resumes where you left off).
- Some UI work.
- Setup a “Raws” system: you can define large parts of the game in text files, rather than in code (like in Dwarf Fortress). There’s handy helper methods such as create_component_from_raws(“Solar Collector”) in the game code.
I’m pretty happy with the random settler creation (as I mentioned last week, these are all people from “useless” professions – hence they were on the beta-test ark!). In my last world-gen run, I ended up with Nathaniel Foust (Feng Shui Consultant), Octavio Roper (Pet Whisperer), Reynalda Pike (Telephone Sanitizer), Dorcas Wier (Blogger), and Beryl Perkins (Used Car Dealer).