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:

else:
       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:
tap=slash
tap=slash
tap=slash
tap=slash
tap=slash
etc...

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.

Comments

Popular posts from this blog

Automating Level imports from Blender to Godot

  Recently I've been making some levels in Blender an importing them into Godot. There are only about 7 or 8 shaders for each level, not counting dynamic objects which will be added later. But to improve rendering performance, it can be a good idea to split the meshes up into sections. At that point you might be faced with a list like this: Or it might be even more chaotic, if you didn't use simple names for the objects in your level. So it can take a long time to sort out all the meshes, make them unique and add textures and so on. Blender imports with simple Blender textures, or with placeholder materials. This is sometimes OK, but if your Godot shaders are very different to those used by Blender, it means applying new materials to every mesh object in the level when you import the scene. I found that during the design process, I was importing and readying a level several times before I was happy with the final layout. So at first I was wasting a lot of time. In Blender, I us

Dynamic terrain in GODOT

Long time no posts. I haven't been keeping up with the projects I started. At first it seems fun and exciting, but I always run in to limitations in the setup, plus the grind of just making stuff without any real challenges... It ends up being something that I don't want to commit to. So right now I'm just messing around with some ideas and see what comes out. No commitment to a bigger project, just some time to try new things. This week I've been working on procedurally generated terrain.  In the past, there were some big limitations on how I approached this, because the game world had to have the whole map, from the micro to the macro. I had to choose a scale somewhere between, which meant I couldn't have really large maps, or really small details. I think I've found a way around that. Below you can see two types of map data coexisting on top of each other. The wireframe is the collision data, used for physics and for clicking on the map, to move characters ar

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 ho