"A real man... oughta be a little stupid." - Ryuji Goda.

Report RSS Procedural Map Generation in HL2 | One Month Later

Posted by on

It's been a month since my previous video where I showcased the proof of concept of procedural map generation in Source Engine. During that time I've been working on improving the system and making the results look not as simple as 'backrooms' for example.


I fixed the non-working entity count optimization system that replaces multiple instances of same floor/wall with a single big one. This helped me to use 45-50% less edicts with rooms and hallways alone.

test0066

Then I started working on a prop spawning system. As you can see, some props are randomly placed, while others are aligned to nearby walls.

To make that work, I use a separate script that stores prop models, their sizes, origin offset and some other properties.


I also made the generation of so-called "subwalls" - 128x128 solid brushlike-props, they're used to spice up room shapes a little.

test0069


Then I completely rewrote the generation of lighting and improved prop spawning alot. But one important thing is the new inventory system. Currently it can hold just few ammo types and basic healing items(i still have to come up with much more item ideas to make up for implementing inventory in the first place)


All in all, check out my latest video regarding this devlog!

There are few issues with the lighting currently, but those are almost entirely fixable. Another issue is lack of proper npc navigation system.

I decided to go nuts and just casually place a gazillion of info_nodes on every tile. I can't modify nodes or links in the game, so that's the only way.

And oh boy, there are SO MANY of nodes that whenever i try taking a screenshot of the whole nodegraph, the game barely renders it and crashes almost every time when I type "ai_show_connect" in console.

test0094


NPCs still bump into each wall before reaching set destination, but this is still FAR better than seeing them have brain aneurysm every time their target gets behind one corner. Zombies are capable of actually chasing the player now.

Also I will make rooms spawn props and other stuff(like decals which i'll add later) based on selected presets, each preset will have its own list of special tags and only props with those tags will spawn.

Thanks for reading!

test0090

test0091

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: