Skip to main content

Concept: Monster Spawns.

Today I had some ideas on what to do about monster and room management spawns.

I want to add random objects, monsters and props such as tables to the map, but I want them to be placed in a way that makes sense and has some kind of internal narrative.

I don't want you to enter a room and see:
  • an empty book case
  • a skeleton
  • an elf
  • a potion of speed
  • a rug
  • a telescope
  • a green slime
  • some writing on the wall
  • a puddle of rats blood 
What I want is that you enter a room and see:
"Some guards standing around a table, on the table is a lunch buffet of green cheese and mushroom sandwiches. In the corner two guards are sleeping on bedrolls. A guard captain is sitting at a card table playing cards."
The above situation would be the result of three themed spawns:
  1. A table with appropriate contents and some appropriate monsters standing around it.
  2. Sleeping monsters on bedrolls (perhaps with optional equipment spawns nearby)
  3. A card table with one or more themed monsters. 
The spawns would be packed in to the room, if there wasn't enough room another spawn would be substituted.

I'd use a dictionary a little like this:
Yes, that's right arrays can contain function calls.

There are other indexes in the dictionary as well as the object spawn arrays, the level index would restrict spawns to different levels, the x_size and y_size are not really needed as you could just measure the array lengths to get that info, but you could include a theme key here such as "insects" or "horror".

The random monster function calls a random monster from the meta list of monsters using a guideline of max xp cost and starting state, allowing sleeping, frozen, stone or polymorphed (etc...) monsters to be placed.

With this kind of method you could have spiders (a monster) and cocooned prey (a prop), or a book case and scattered books (all props) or a barracks with beds, chests and sleeping guards and lookouts. Further refining the random monster function, you could use a wild card such as False or None instead ofXP amount to use XP from a general spawn pool (calculated in relation to the player's strengths and weaknesses). Or you could add an extra argument to the function such as monster type, which only adds monsters with that type to the random generation pool. A typical type would be "furry" which would generate giant rats, wererats, werewolves, cave bears and such, or "insect" which could generate all kinds of bugs, or "human" or whatever. The more tags you have, the more you can control the spawns and create more narrative for your game, but the more chance of getting an empty list.

For instance you spawn a monster formation on level one which includes a random monster call for a "demon". The xp pool is just 100 xp, but the lowest level "demon" monster is 5000xp. That's going to result in no monsters being spawned unless you have a fall back, like:

       monster_instance = monster("giant_rat", "crazed")

In which case the player is going to be so busy dealing with a berserk Giant Rat they may not notice the "pentagram" and "sacrificial_altar" props in the room.

The above concept may need tweaking a little, the final game is going to include props that can block your movement but also others that don't (such as a puddle). In that case it would be fine for a spawn location to include a prop as well as a monster or object. Objects could also be placed inside or on props (such as food on a table).
Imagine entering a room and seeing a zombie feasting on a fresh corpse, or an egg that splits open to release a juvenile giant spider.

Anyway, today I'm going to be experimenting with saving and loading and maybe try moving a player object around the map.

As a closing video I'm going to post this, which is exactly what I don't want my game to be like:


I hate the way you can upgrade the rusty helm (which doesn't look nearly crappy enough to be a rusty helm by the way) while still fighting and running around. How? Does he have an army of crafting gnomes stuffed into his loin cloth?
And you can speed up the upgrade by paying for it. Again, how does that work?
Although the worst thing was the massive in game tutorial pop-up which completely covered the bossfight (and the bosses spawn was ruined by happening mainly off screen).

No wait, the worst part was:

He had several special abilities, but there seemed little point in using them as every enemy fell to a few quick slashes of his mighty rusted sword.

I don't have full details of the combat system I'm going to use yet, but rest assured it will feature more than just tap=slash, and special abilities will be useful.


Popular posts from this blog

Make your game models POP with fake rim lighting.

I was watching one of my son's cartoons today and I noticed they models were using serious amounts of simulated rim lighting. Even though it wasn't a dark scene where you'd usually see such an effect, the result was actually quite effective.

The white edge highlighting and ambient occluded creases give a kind of high contrast that is similar to, but different from traditional comic book ink work.

I'll be honest, I don't know if there's a specific term for this effect in 3d design, since my major at university was in traditional art. I learned it as part of photography.

You can find plenty of tutorials on "what is rim lighting" for photography. It basically means putting your main sources of light behind your subject so that they are lit around the edges. It can produce very arresting photographs, either with an obvious effect when used on a dark subject...

..,or as part of a fully lit scene to add some subtle highlights. See how alive the subject look…

How to... build a strong art concept.

So you want to make some art assets for your game. The first on the list is a Steampunk Revolver for your main character to shoot up Cthulhu with. Quickly opening your internet browser you start with a Google image search. Ah, there is is!

It might be a good idea to find a few influences so you don't accidentally end up copying a famous design.

Just mash them up and you're ready to go! Off to your favorite modeling program.
But wait! isn't there more to building a strong design concept than that?

Of course there is.
One of the diseases of modern design is that of recursion. Everything is a copy of a copy of a copy. This is especially a problem with "historical" concepts. Over the course of that recursive process the concept becomes infected with modern design elements, and ends up looking very similar to everything else that anyone else has ever made.
If you want to come up with a really fresh idea, you have to get beyond secondary references and go look at real …


Ok, so it's not exactly skynet, but I have got my first AI state working, kind of.

The first state is "HOLD" in which case the agent stays in place where they are and shoots at any unit that comes in range. When I started writing this module, I found that the existing method of triggering actions wasn't good enough to allow the AI to choose the best weapon or target. It worked by simply sending a command to the unit to trigger the currently selected action.

If the action is valid, it triggered, if not it didn't.
That's fine for play controlled units, as that's all they need to do. But AI needs to know in advance if the action is valid. The player can get that info from UI feedback, but that wasn't available to the AI player.

There were three problems:

1. The UI feedback duplicated code in the action trigger function. These  two sets of code could get out of phase so that UI feedback was wrong.

2. The action trigger didn't give enough feedback for …