Hello. It’s been a while – and to be honest I’m forcing myself to write this now, because otherwise I’ll have too much catching up to do. First up – as the title suggests, I’ve moved on to a new project. I did do some more work on International Road Bastard, but hit a point where I wasn’t sure about it. I added physics to all the other cars for starters (which they needed if they were going to fly up in the air and get pushed off cliffs etc.), but that stopped them doing their nice “spinning wildly out of control” thing which made the game much less fun. I’d need to code that back in, and that’s part of the issue. Things were starting to look like a lot more work (the player’s car needed to be done properly too for example), and at the end of it all I could see is a silly little game – fun, but ultimately quite throwaway, and that didn’t appeal.
Whilst this was happening I’d been playing My Time At Portia – a nice (if unfinished) Harvest-Moon-ish game with a focus on building, rather than farming – and it got me thinking about something I’ve had at the back of my mind for a long time now. Harvest Moon in space (very literally Harvest A Moon). Before now I’d always dismissed this out-of-hand as being too big, but I had a few days off and didn’t fancy trying to wrangle Road Bastard into shape, so I thought I’d just have a pop at it, to see where it went. I had a head start from another work-in-progress project – a moon base simulator – which gave me a curved world (which I wanted) and a nice little landing pad with rocket that would set the scene nicely.
So I copied this project, ripped out a few bits that weren’t needed, and then knocked up a crude astronaut character from Unity’s spheres and cylinders. Then I also knocked up some crude models of several stages of growth for my first crop – space radishes. I quickly implemented this, which gets us to here (those radishes grew from a planted seed, and through 4 stages of plant before fruiting):
At this point I came to a realisation about the game – it doesn’t seem anywhere near as big as I’d assumed. I mean – there’s a lot of peripheral stuff in most HM-style games, but when you cut to the chase it’s largely inventory management over time. You have stuff in your inventory (seeds and tools etc.). You use tools to prepare the ground, then plant seeds. Then you wait for a while, before harvesting them to get crops in your inventory. Then you store them, or sell them, or combine them with other things to create different items in your inventory. That’s the core. Add in animals which are similar, mining, foraging and fishing and you’ve got most of the good stuff. Then it’s just a case of what else you add to bulk out the package. This realisation gave me renewed interest in carrying on with the game and the ideas came thick and fast (it’s genuinely one of the most fun things I’ve worked on – so many neat ideas…).
At this point I took stock though, and tried to think what the big issues would be. Clearly, the fact that the game revolves heavily around inventory management means that there’s going to be a lot of GUI work, which is something I try to do as little as possible of. There’s a lot of learning needed here, and that’s not something I take to well (I love accruing knowledge, I hate having to sit and read documentation or watch over-long tutorial videos for hours when I could be making cool stuff instead). The other major issue is going to be character work – I need animated 3D models for the player, livestock and any other NPCs I use. This is stuff I’ve done passably in the dim and distant past, but again – there’s a lot of learning involved, including finally using Blender (which I’ve had installed for ages, but have been trying my best not to go near wherever possible – hence using Unity’s primitive shapes for everything so far). However it’s certainly doable, and if it turns out I’m not up to it, I could always consider getting a decent character modeller/animator to do these bits for me (I’d be reluctant though – I really like being a one-man team).
So, to cut to the chase the game seems pretty achievable, and I’ve got more ideas than I know what to do with, so I just crack on. And because I’ve identified inventory is the key to the game, I’m forced to address this right away. I’ve never incorporated a proper one in a project before now, so I have a quick google, and find a Unity tutorial that gives me a good start point on both how to manage an inventory, and also some pointers on working with the GUI for it. So I quickly cobble together a makeshift quick inventory for the player, with some very rough placeholder artwork:
And then I immediately decide that I’m an idiot, and should replace the artwork for something that won’t make me hate the game. So I redraw the item slots as something halfway competent, if a little bland, and that looks – if not good – then a lot less rubbish:
And on that note I decide to have a crack at changing the way the game looks, because this is straight from my moon base prototype. I’ve not got a clear idea in my head yet of an art style, but I know what mood I’m after, so I have a pop at pushing it that way. I also add a few basic buildings to set the scene – which is basically an American mid-west vibe, but in space, so there’s a windmill and a water tower. The player’s house I decide is going to be a bunker under the ground, so that little cube is just the entrance. Which brings us to here (this is by no means final, but it’s much closer than old pink-world up there):
The final thing I’ll cover in this post is the curved world thing. The way it was implemented in the moon-base prototype was as an actual curved world – the map was actually part of a sphere. I soon realised that this is a horrible way to do it (unless I’m missing something obvious – which isn’t unlikely, admittedly). But basically I found that the easiest way to move the player’s character around on the outside of a sphere is to simply rotate the sphere (and everything on it), whilst keeping the player stationary. If they move forward you rotate the sphere toward the screen, if they move right you rotate it to the left etc. This seems simple enough, but doesn’t work for other entities though. So if you want an NPC to move between two arbitrary locations on the surface of the sphere it’s a right palaver. What I ended up doing was temporarily rotating the entire world so that the NPC was at the top, then spinning everything around the vertical axis so that the NPC was facing the thing they wanted to move towards. Then I could set them to rotate forwards around the sphere toward the target using the sphere’s centre as the pivot. Then I’d rotate the sphere back to its original orientation, with no-one any the wiser. It’s one of those things that you realise is utterly insane whilst you’re doing it, but then follow it through to the bitter end out of morbid curiosity.
Basically, that had to go, so I had a quick search on the Unity asset store and found a nice shader that performs some kind of wizardry to create the effect for me. The world now is actually perfectly flat, everything works as if the world is flat, it just ends up looking curved in-game. This is what the place looks like with the curvature set to zero:
The other benefit to doing it this way (other than not being hideously-unworkable obviously) is that I can alter the curvature without having to change, you know, almost everything else in the game (seriously, you’d have to remodel everything for starters, and then all rotation speeds would change and, crikey… it would be a nightmare. Whereas with this I can just type in the figure “30” to make it do this:
Right, that’s the lot for now. I am playing catch up with the blogging, so the next post hopefully won’t be too far off.