Small Gods – Resource Storage

This wasn’t as hard to implement as I was expecting it to be, to tell the truth.

Basically, all I’ve done is set it up so that the AI produce goods while working and if they fill their inventory with said goods they’ll go to the nearest storage depot with space and dump their goods there. The actual implementation of it is sort spaghettified and I’m sure that there’s a better way of doing it, but it works!

I’m not sure how I’ll end up implementing the whole resource system in the final version of the game, however. Right now it’s taking a similar form to that of the resource and storage system in Black and White where storehouses have a cap on the number of each type of resource they can store and so when a storehouse is full you need to build a new one. however, I may change it to be more akin to a traditional RTS resource system where collected resources are transported to a location that teleports it into a magical place where it’s accessible to all-comers.

Continue reading

AI Are The Worst

I hate them. I really, really do.

Seriously, I spent something like three hours today fixing something that I thought I had fixed yesterday but which turned out to have been broken all along in a way that made me think it was working. In any case, I have made it so that AI will now check to see if a worksite is fully occupied before determining whether they should go to it.

If a building is not fully occupied the building will be evaluated based on its distance to the AI and if it’s the closest one the AI will select it as the target and increase its current worker could. Meanwhile, a building that is fully occupied will be skipped over in favour of another workplace altogether. I don’t yet have a behaviour for what the worshippers should do if all workplaces are occupied (right now they’ll go to the first workplace on the array generated when they ask for the closet workplace), but I’ll handle that sometime tomorrow or Friday.

I’ll also need to add a similar behaviour for when the AI are looking for houses, and I’ll need to set up the AI to lower the current occupancy count of their workplace when they stop work. They don’t do that yet as I was tired of writing AI code and decided that 50% was a good place to stop (although realistically it’s about 25% done at best).

Continue reading

The player can no longer imitate ostriches.

Just a little update. I’ve changed the way the game handles movement so that players can lean in really closely to the terrain in order to examine things while still retaining the ability to move around using an Xbox 360 controller. It’s not perfect, but it works for now and I’ll improve it in the next few days.

I’ve also added a menu screen because I might as well get started on that, and I’ve gotten started on asynchronous loading so the game doesn’t freeze when the player tries to load the next level (though the testing level is so small that you don’t see it). Asynchronous loading will also give me the ability to have all sorts of fancy, animated loading screens (including games within games if I hate myself).

Finally, I added gaze input for selecting buttons using some great scripts provided by Peter Koch at


Do AI dream of electric sheep?


No. They dream of fire and hate and irritating the hell out of me.


I suppose I should back up a bit. For the longest time, the AI of the player’s worshippers would only bounce back them and forth between their house and the nearest source of food depending on how hungry they were. I tried to expand the behaviours by including a stat called ‘energy level’ that would decrease over time and would trigger the return home behaviour if it dropped below a certain threshold. i also included a wandering behaviour that would trigger whenever other, more important behaviours weren’t active. Apparently this was a mistake as it completely blew the minds of the AI worshippers to the point where they’d either jam up forever or completely freak out depending on what minor changes to the code I had last made.

It took two days and a completely revamped AI system to fix this issue, but now the AI will wander around until they get hungry or tired and then walk to the nearest food source or their house, respectively. When they’re full and well rested they’ll begin to wander around again and the cycle starts over. I also included a repeating check to see if the AI has a house. If they have a house the AI does nothing, but if they don’t have a house they’ll try to get one from the game manager. If the AI still can’t find a house they’ll then start to wander around the map (unless they get hungry in which case they’ll go to the nearest source of food and then start to wander around).

As you can guess from the above paragraph, the behaviours themselves are pretty simple but we’re already starting to see them come together in fairly complex ways. Embedded below is a video of the current state of the game. It should be Fun to further improve on the AI.

Check out the AI in action here:


VR Makes Everything Better


Okay, maybe not everything, but it is pretty cool being able to look around what will be the gameworld in the prototype simply by turning your head (even if I’ve not had a chance to really sort everything out yet). It took me about 4 days to get the Oculus DK 2 to finally work on my PC thanks to a missing VGI to HDMI adaptor, and when I finally received an adaptor it somehow ruined my PC’s wifi connection (via curse, I assume).

That said I’ve managed to do a decent amount of work on Small Gods. Player’s can click and drag the mouse in order to adjust their view, there’s a (currently broken) AI who finds a home, moves to that home, moves to a food source when hungry, and then returns to their home when full, and as I’ve mentioned above it all works with the Oculus DK 2.

My plans for the next week or two will be to: Fix the AI so that they actually do things, add an in-game object that hangs above the terrain and represents the mouse cursor so that players can see where the mouse is (the Rift doesn’t show the mouse cursor), and I’ll be trying to adjust the rate of motion of the DK 2 as one-to-one replication of motion is too little to matter on the scale that Small Gods takes place on. Ideally, players will be able to lean down in real life in order to zoom in and follow their worshippers as they wander about the map and carry out their tasks.

Small Gods – One Sheeter

So….. This is pretty much the start of my indie game development career, huh? Well, I suppose that I should get to work….


Title: Small Gods

Intended systems: PC (Oculus Rift, and HTC Vive), and PS4 (via PS VR)

Target age range: 16-30

Intended ESRB rating: Teen

Gameplay summary:

In Small Gods players take on the role of god charged with growing the inhabitants of a village into a world-spanning civilization. Place buildings, raise mountains, carve rivers, and cast powerful spells using VR controllers to combat deadly threats from the environment and rival gods.

Modes of gameplay:

A sandbox world map set on isolated islands/archipelagos. Players must tell their worshippers to construct buildings and harvest materials in order to grow their civilization from a small town to a sprawling metropolis. Players must also defend their worshippers from deadly mythical/fair-tale creatures, environmental hazards such as volcanos, tsunamis and floods, and from hostile gods and their worshippers.

Unique Selling points:

  • Built entirely for VR.
    • Allows players to lean in and watch their citizens go about their lives.
    • Gives a truly ‘gods-eye view’ of the world.
  • Players can manipulate the environment in an almost tactile way using Razer Hydra/HTC Vive/PS Move/Oculus Rift controllers.
  • Players can smite or help NPCs with a flick of their wrists.

Competitive products:

  • Sky World
  • Black and White (one and two)
  • Godus
  • From Dust

Kinds of play (ranked)

  • Challenge
  • Sensation
  • Fantasy