Spawning systems and scorpions

Not all enemies need to be placed consciously: we also need enemies that are not directly related to the story, for pharming, getting experience or simply immersion purposes. As the first level of our game features lots of beaches, we chose the scorpion as our first spawnable enemy. Spawnable enemies are enemies that are not placed in the world by us personally; instead we define areas and population densities, based on which the game itself will spawn enemies on random positions in said areas.

There is no standard system for this, and even though there are modules that can do this for you, we wanted full control over this feature, so that we developed a simple system from scratch ourselves.

In the interface of Unity, the tool in which we develop our game, we now see large blue rectangles on the beaches defining the spawning areas for our scorpions. It was quite complicated to make this: especially visualizing the spawn areas and being able to rotate them is quite a pain in Unity, because the software assumes that whatever you visualize should also be visible in the game. Whatever you want to see but not visualize in the game is called a gizmo, but it’s exactly these gizmos that only have very basic functionality (just rotating them is a pain)!

Another issue: after a recent upgrade of Unity our assets had inflated from 4 GB to 14 GB, and nobody knew what was causing it (not even Unity themselves), but by pure coincidence (we now know which button to press!) the assets deflated to 4 GB again, making the game a lot smoother and enabling us to re-enable shadows on grass and vegetation. Thanks to this bonus, we got much better graphics and even more importantly: much smoother gameplay!

Theory is nice, but what does this mean in practice? In the video you can see our scorpions in action. You will notice they have animations and sounds. If you look carefully, you will also see that we have refined the enemy health bars: they fade in and out based on the distance and the attack range of the enemy, so that you can’t cheat and spot enemies from afar that haven’t noticed you yet. Also, when enemies die they don’t just disappear anymore, but neatly fade away.

The good news: as we got the spawning system working, we can use this for many more enemies than just scorpions, so that we will be able to populate the world with many different monsters and animals!

P.S. The animations are still clunky here and there, and this is a continuing process we’re still working on! As said, everything you see is merely a work in progress. As indie developers, we do not have 600 people working on a game for five years at a stretch. What you see here is the result of two people working on a game in their free time for two months.

Post your comment

New main theme
Loot and item stacks