Up until now there's been no in-game sound! So, that's obviously an
area in need of more attention. And progress has been made...
Audio Engine
It's hard to overstate just how important sound and music is to
creating feelings and emotions in games, or any medium. To help
me with that, I've built a node-based audio system of modular
parts that plug together. It's purely code, but here's a diagram
showing conceptually how it looks:
Audio Node Graph
It's essentially wired in a classic studio mixer set up, with audio
devices feeding into a central mixer, and effect sends / returns
mixing in various amounts of reverb etc, before the final mix output.
The audio devices are driven by a sequencer (more on that below).
This will let me do interesting things in-game, for music, and
sound effects, like radio distortion effects, machinery, engines,
random beeping, and vacuum muffling of all of it, even UI sounds.
I also plan to use the same system for radio message
encoding / decoding - not in the game yet, but on the road map.
Classic Synthesizer
The synthesizer is modelled on a classic subtractive synth from
the early 80's like a Juno-60 or Yamaha CS-80 (Vangelis), and I've
borrowed a lot of my old SID chip code here which works very
similarly.
Features:
5 Waveforms - Sine, Triangle, Sawtooth, Pulse (with pulse
width modulation), and Noise (good for hisses of gas leaks and
radio noise)
Filters - Low pass, and High pass (Butterworth) with variable
cut off frequency and resonance.
Filter envelope to sweep the cut off frequency over time.
Analogue style CV & Gate split.
Unique addressable polyphony (slide to different chords,
polyphonic portamento!)
Oversampling for reduced aliasing and maximum quality at high
frequencies.
Reverb
I've also build my own reverb unit. This actually incorporates some
code I wrote for a prototype in 1998! Getting the parameters tuned
is critical to a good sounding reverb, or it sounds like a million
screaming demons escaping from hell through a metal tank..,
so I leveraged the effort I'd already done and rewrote a new version using the
same timing constants.
Here's a clip of the synth playing a few chords with the reverb.
I didn't have time to make a sampler in time for this dev log
update, so just some spacey synth sounds for now, but that will be
added later and extend the range of sounds dramatically.
Music Engine
On top the audio system, I've also built my own music sequencer..
which is text based and uses a compiler I wrote lol (I've got to
have a least one of those in there somewhere!). This uses a custom
scale-relative notation that I've always dreamt of to let me
change key & scale quickly and have all the other tracks
follow it. It should make it easier and quicker to explore the
space of musical ideas
It's working well and I'm really quite pleased with it! I
just haven't had time to really use it properly yet, but I can
flesh it out now and hopefully make some interesting instruments
and music.
I think the tools you use really do shape what you make. Some of
the best computer music ever made was by Rob Hubbard who used an
assembler! It seems counter-intuitive, but in many ways text is
easier to edit, cut & paste, layout how you prefer etc. You
write more with your ears than your eyes.
It's also similar to what I used back then to make C64 music,
just before trackers came along. So that was the initial
inspiration for numerical input, but I've extended it with
scale-relative notation, and also time-relative notes, so they can
be moved together as a group, or even interleaved with previous
notes for call-and-response etc.
I was also mindful of the creative transposing of Michel Geiss's
sequencer on Jean-Michel Jarre's Equinoxe (Part 7)
- if you know what I mean, you know! ;)
I've also added hot-swappable file editing so it's possible to
edit the patterns while it's playing.
The pattern sequencer can also send any message to any of the
devices, so it allows for complete automation of all dials and
settings.
Too Much?
Should I be writing my own audio engine and music tools from scratch
as well as the game? Probably not! But I did it anyway.. :P And
now Starship Colony has powerful in-game audio machinery - it
will find uses... everywhere!
We have a vast galaxy of stars, but we also need some planets and
moons..
Here's my first attempt at an arid Mars-like planet, with various
geographical regions - high rocky mountain planes, sandy dunes.
In the lowlands, dark blue basalt volcanic rock beneath the dust.
In the polar regions are large white ice caps - also
occasionally found elsewhere on high altitude peaks. These are a
good source of water, not just for drinking but also for fuel
& air (H2 and O2).
Procedural planet generation
There are also craters everywhere. Notice how they can punch
through and displace the surface material revealing the layers
below. There will likely be exotic deposits to mine here.
This is the view from space. When in orbit you'll be able to scan
the surface and select your landing site. The surface terrain will
reflect the kind of terrain you've chosen.
It's all completely procedurally generated at runtime! More
planet types will be added in due course.
Here's a quick video showing the planet in rotation.
(Apologies for the YouTube compression - the original has finer details and richer colour.)
New Procedural Planets (Preview)
It's hard to overstate the amount of work that went into this
update behind the scenes. My initially simple 2D sprite engine has
grown into a full 3D engine at this point to support 3D planet
meshes and 3D lighting alongside the core 2D game.
There's all sorts of knock-on effects when you can rotate the camera.
A 2D background image won't work here and you need a sky box, so I've
had to implement that too. It's extra work, but I think the
improvement in quality and extra gameplay possibilities is worth
it. :)
Big Engine Upgrade
This is just a quick update to let everyone know work is going well, and to talk about some changes.
An Elephant in the Room
It's been a choatic couple of months. I'm currently making some big changes behind the scenes to improve the look of the game - A major title just suddenly made themselves look a lot like us - so that's a big problem.
So I'm taking steps to put some daylight between us again. This extra work is going to delay the launch unfortunately, but the bright side is it should result in an even better game.
In hindsight it probably wasn't wise to reveal a lot of unreleased features years before release. From now on I'm reluctantly going to be keeping new features under wraps, at least until the trailer is ready.
Engine Upgrade
Behind the scenes a lot is happening that I can't show off yet. The engine is getting some major extensions and upgrades to allow for some improved visuals. Some initial test prototypes of this look great! So I'm now confident enough to go ahead with the full engine overhaul.
There's a series of new features that go along with the upgrade, and I can't wait to show what I'm currently working on. You'll have to forgive the lack of screenshots, but the engine features being built right now will likely be generating a large portion of future screenshots! So stay tuned!
However, I'll give you a hint and show you a screenshot from something I made back in May...
May 2006 that is!... ;)
Planet generation from Totality Online (2006)
Mailing List
I'm planning to set up a mailing list soon that you can subscribe to for release news, and to get into early play tests. Check back for that.
In the meantime if you want to chat, we have a friendly Discord community that's growing nicely.
New Galaxy and Solar System Map
Galaxy Map Rewrite
I've completely rewritten the galaxy map shown in the last
update. It's now a core native part of the game rather than
running as in-game software in a virtual machine. This has
improved a number of things.
Galaxy Map Version 2 (Native)
Firstly the resolution is now far higher, which is really needed
for stars. The retro CRT effect was nice, but YouTube's
compression can't handle it, and nobody wants smeary videos.
The galaxy image overlay is now drawn with the GPU and smooth
filtered which improves the look of the galaxy gas & dust.
After some thought I've decided to remove the in-game software
and virtual machines. They're taking too much of my time to
maintain and I think there are better ways of doing the same
things with plug-ins instead.
The previous version would cache the star data as files on a
virtual disk for the virtual machine. If you pan around the galaxy
you'd end up with hundreds of thousands of files on disk, and
that's just one console in the game. At some point you have to
save and load all this too. This was the point I realised I had to
draw a line to the simulation depth and pull back a bit. There are
better ways of doing all this.
So, the new version is completely native, and generates the stars
procedurally on the fly. There are no files used, so nothing to
save. It's faster and lightweight as it should be. I'm pleased
with the improvement in quality.
New Solar System Map
For every star seen in the galaxy map, there's an entire solar
system to be explored. I've just started work on the System Map to
display these.
New Solar System Map (Preview)
For testing I've used the real solar system, with real scales and
distances. Though it's 2D the orbital data is real. We have proper
semi-major axis distance, eccentricity, period, even the 'argument of
periapsis'. I've also simulated proper Keplerian motion (where
things speed up on closest approach). You can only see it on a
time-lapse, but it's there!
The planets and moons are just coloured circles on the map for
navigation purposes. They'll obviously have more detail in the
main game view. I still have to add asteroids to the map, and
integrate it with the galaxy map, but we're getting there! :)
Work Begins on the Galaxy
It's about time we had somewhere to go, so this month I spent time
adding in a whole galaxy!
Real Galaxy
I wanted the galaxy to be realistic and impressive in size, not
just a small puddle of dots, but something astronomically large
and awe-inspiring. For me, the sheer scale of space, the huge
quantities, and vast distances, are all part of the magic and the
wonder, so I had to at least attempt it.
So, I've used a real astronomically correct map of the galaxy -
Credit to NASA/JPL-Caltech/R. Hurt (SSC/Caltech). The galaxy's
arms are real and denote the highest density of stars, so I've
used this to guide the procedural generation. You can see in the
video below how closely it follows the map. And the Sun (Sol) is
correctly positioned in the Orion arm.
Real Stars
Additionally, all the stars within 100 light years are real
stars! And they're correctly positioned in galactic
space! Yes, I had to get real star data and transform them
from equatorial coordinates relative to Earth into galactic
spherical coordinates, and then into galactic Cartesian
coordinates used for the game.. I'll spare you the details
of that adventure!
The data also needed some clean-up and filtering to remove double
entries for binary star systems etc, and some name fixing.
(Astronomers have the worst naming conventions! See the
'variable-star designation' naming system for ample
bemusement). I've also scaled the vertical dimension to make
everything easier to see. It's extra work, but now the
galaxy is a real place, and it brings the fiction one step closer
in your mind.
In the video the player clicks on the Navigator's console to open
it up in a window.
AstroNav software running on in-game computer console
AstroNav Software
The console is an in-game computer, that actually runs real
in-game software you can modify while playing! In this case it's
running AstroNav.bas which draws all the stars to the CRT screen,
showing you where you are in the galaxy, and lets you look around
and plot a course.
It's actually loading the star positions for each sector off disk
files - this is *your* navigation data! As you explore beyond the
known systems you'll add to it.
Each blue grid sector is 100 light years across. The minor grid
lines mark 5 light years. You can also see a fuel radius circle.
This is roughly how far you can get. At the moment this is just a
placeholder, but when hooked-up to the network, should be able to
ask the storage tanks how much they have.
You'll also be able to set a destination target, then the heading
will be sent to the Pilot software which deals with realtime
flight adjustments. It in turn will send network commands to the
thrusters. You'll be free to modify all of this! - maybe make your
own autopilot, or simply use someone else's (you don't need to
code to play).
I suspect this in-game navigation software will change quite a
bit over time, and become more polished. This is the very first
version, and a proof-of-concept for in-game software in general.
It's an area that sets Starship Colony apart from other colony
sims. I'm excited by its power and potential to modify the
function of every hardware item in the game in ways I haven't even
thought of yet! It's like Starship Colony's Redstone, but
Basic is far easier to work with. It's a tinkerer's playground.
AstroNav Basic program that draws the stars
This is just the start. There's more to add to the galaxy -
numerous factions of humans and... powerful things in the deep... :)
More Behaviours, Fire and Crew Schedules
There's lots to cover this month - many new crew behaviours have
been added:
All characters now have a basic 'Run To Safety' panic behaviour.
If there's no air to breathe, or the temperature is extremely hot
or cold, they'll run out of the room and find a safe place to
stop. Fire also causes them to move away quickly! Something long
overdue!
Related to that there's a new Temperature stat, and moodlets for
being too hot or cold, or pleasantly warm.
I've also added Food, Drink, Toilet and Rest stats to all the
crew. This is reflected into crew needs panel.
Eating updates the Food stat now. And they'll stop everything and
go eat when extremely hungry, rather than just starving to death.
Likewise sleeping updates the Rest stat, and they'll stop
everything and go to bed when extremely tired. And they
automatically wake and get up when fully rested.
Food / drink / toilet / rest / hygiene depletes over time. A
whole range of moodlets for these have been added. When stats
go really low they start taking damage.
I've added toilet behaviour, including a stop everything and go
to the toilet when the need is extreme. Yes, now your number 1 can
do a number 2. :)
There's also washing behaviour. Added washing after toilet. Also
added a stop everything and go wash when extremely dirty. Plus a
new Hygiene stat to track this.
There's a new drinking behaviour - go to sink (or drinks
machine), get glass of water, sit or stand drinking water. Added
glass of water icon. Plus, you guessed it - a stop everything and
drink when extremely thirsty behaviour too.
And finally I've add a pilot behaviour with operating the console
as a sub-task. Now bridge crew will man their stations (all
piloting for now).
More Fire!
Fire has had some attention too this month. Fire now has various
sized flames, generates heat, spreads, consumes O2 and generates
CO2. Fires will also go out when all the O2 is consumed.
I've also added fire-fighting behaviour - automatically triggered
if they see it nearby. No longer will they sit idle doing the
'this is fine' meme. They will jump right to it! :)
New Crew Schedules Interface
Another large piece of the puzzle - the Crew Schedules interface
was added, so you can now manage crew schedules for work, sleep,
meals etc.
Of course for that to work, I had to also add Time. So there is
now a date and time. I've also added a vertical line across the
schedule showing the current time to make it easier to look up
what each crew member should be doing right now.
Also numerous bugs were fixed, too many to list them all. Things
like getting stuck on corners, or trying to breathe inside walls,
trying to sit at a console when there's no air, trying to fight
fire during a decompression. They now have a bit more common
sense.
The whole update has added massively to the feel of the game.
It's really coming together now. There're still many things to
tweak and balance, but the basics of day-to-day crew life is now
in and working. I'm very happy with progress :)
Character Skills, Needs and Moodlets
There's been a lot to fix after last month's big architectural
change to allow for plug-ins. But I don't like going a month
without something new to show, so I've also given the characters
some much-need attention and added some new features:
Character Skills - Variable, flexible, not limited to a fixed list, can be expanded.
Character Needs - Colour-coded bars showing primary needs.
Character Moodlets - Positive and negative to varying degrees, colour-coded for readability. Also flexible and expandable.
Character Roles - Completely user-defined. It's your ship, your crew, your rules!
To go with that we have some new GUI panels to show all the new
info. I've kept a layout familiar to players of other popular
colony sim games.
Character Info Panel
At the bottom we have a character info panel that appears as you
click on a character. It shows Name, Role, the Ship / Station they
belong to, and Age.
In the middle is the main health bar you can't miss.
The current task the character is doing is shown below that, with the
full task stack shown. So, in the context of say harvesting, it
will show the general Harvesting behaviour, followed by the
current sub-tasks such as walking to a plant location. More
complex behaviours have more complex sub-tasks, which are
displayed here. This is something I should have added much earlier
as it's allowed me to debug a few problems now I can see what's
going on more clearly. It should be useful for players to
manage their crew in a similar way.
At the top of the panel, there's a couple of buttons that open up
more detailed Skills and Needs panels.
Skills Panel
On the Skills panel you can see skills listed with their level of
expertise. Rather than have a standard fixed set of skills, I've
decided to try something different and have the skills work like
the moodlets. Just as in real life skills are numerous and varied,
and most of us don't have our mining skills shown on our CVs,
because mining is a niche activity like every other specialist
skill. A single limited list of skills doesn't seem like a good
fit for all eventualities. I thought about going back to more
general D&D attributes like 'strength, dexterity and
intelligence', but I like the idea of specialists in numerous
fields, especially in a high-tech sci-fi setting like Starship
Colony. Otherwise we'd end up with 'intelligence' being used to
measure a character's ability in everything from astro-navigation
to xeno-linguistics when clearly these are very different skills.
And specialist skills allows for characters to become valuable in
unique and interesting ways. In difficult situations you may have
to make some tough choices about who to save, and good games are
all about making interesting choices.
Lastly we also have some Background flavour text. I need more
work here to flesh these out. I had to make a word-wrapping text
box just for this. Just one of the million little things you have
to do when you build everything including the engine yourself..
Needs Panel
I also made a new colour bar control and put it to good use in
the new Needs panel:
Here you can see colour-coded bars for the major needs. The bar is
divided into regions, such as green, yellow and red you can see on
the bottom edge of the bar. As the bar falls into each region it
takes on the colour. I found this to be more visually appealing
than splitting the main bar into segments which can get visually
noisy. I'm still tweaking, but I think this design is cleaner and
you can still see the critical areas to watch out for.
Happiness Bar
The big Happiness bar at the top right is the overall mood of the
character. And you can see a breakdown of the smaller moodlets
influencing the character below, and by how much positive or
negative. Again there's lots to be fleshed out here, but I do like
the flexibility a moodlet system offers. There's a lot we can do
with this, yes, including 'Ate without a table'! I fear there
might be riots if I didn't include that one. :)
To increase your happiness bar, please wishlist Starship Colony on Steam:
I've just completed a major update to the architecture of the
game. We now have a plug-in system!
This allows in-game objects to be created completely
independently of the main game code, then plugged-in at runtime.
This means the game can handle new objects it's never seen
before! And that allows for modding! :)
I've migrated all the current built-in game objects to the new
system as a 'Core' plug-in. This will always be loaded. This helps
me prove the system and ensure it has all the functionality
required by objects.
For example, the Electric Heater - it has custom code to check
the temperature, produce heat if it's below a given temperature,
consume power when it's on, and also draw different graphics
frames based on this. All this can be achieved by communicating
with the main game to interact with the various systems (such as
heat, power, graphics drawing etc).
Another example is the Engine object - it has custom code to
consume hydrogen and oxygen from its pipe inputs, accelerate the
ship it's attached to, and render the thrust flame particles.
The game no longer needs to understand anything about electric
heaters or engines or how they work - it only has to provide a
method for the object plug-in to interact with the game, and they
handle all the details themselves.
This helps keep the game code clean and separate from object
specifics, and allows modders to make their own objects.
It's been a huge architectural change behind the scenes, and more
difficult because it's happening after many objects have already
been made. I've had to carefully plan the migration, and
transition changes in stages to keep everything working. It felt a
bit like trying to change a wheel on a moving car.
One major problem was the binary file format I was using. It's
fast and efficient when you know exactly what data you're
expecting, but now we have to load and save objects we've never
seen before! So that needed to be completely rewritten, and I
decided that a text based format would simply be easier to read
and write, both for myself and for modders. In cases like this
flexibility beats efficiency, though with some careful design, it
turns out it's only fractionally slower than before and still
takes only a few dozen milliseconds to save, so I'm happy with
that.
There are still more areas I can plugin-ify, but all the
difficult work has been done, so I can gradually open-up other
areas of the game to modding in the future.
It's been hard work, and I'm pleased with the progress, even if
it's not easy to show here, it should pay dividends in future.