Skip to content

Procedural Town Generator (Unreal Engine 4)


Seen above is some of the work done in 2 days time after starting a new game project in Unreal Engine 4. The goal being to design, develop, and finish a fully playable game prototype in less than a week. Currently, the game takes an input integer to determine the overall map size to be generated, and then proceeds to decide where roads and empty lots should be placed as cells. Once the roads and empty lot cells are generated (each cell being 1×1), the game then figures out which cells contain a road that goes off of the edge of the map (black markers), and from that list chooses to where to place the player spawn (blue marker) and the enemy AI spawn (red marker).

Once that’s decided, each cell then selects from the corresponding lists of model pieces and individual components that match its previously figured out requirements. As an example, a cell might be defined as containing a straight road. It selects a random road variation from the list of current models. It then creates two sidestreet class actors and joins them so they line up at the sides. One sidestreet class might decide to become a sidewalk class, which contains its own functions that allows the chance to occur of creating 0-4 buildings on top of it. It chooses 3, and selects from different building models that can fit within its space. The other side of the street decides to become a parking lot instead of a sidewalk with an empty lot, and so chooses to become a parking lot which may or may not be filled with a randomized assortment of cars, and each car can be randomized in both rotation of parking, what model it uses, and the color of that model.

Currently the grid generation appears simple, but the variation should exponentially increase as assets of models and classes get added to the library; allowing for sweeping global changes to the entire game with the push of a button or the changing of a float.

Next steps will be to develop a series of functions that allow for a more advanced integration of how the AI is both created, and how it interacts with the map; such as including an option for a certain number of AI to be created inside buildings scattered throughout, as well as a specifically marked location, whether they should automatically patrol through different cells, defend a building, generate hints of where they can hide or take cover, etc..

Also are plans to add a new series of commands that run after the initial map generation to determine how the game plays out for that specific map, such as the simple neutralize all enemies objective, defend a building/item, escort a VIP, prevent robbers from running to the street borders of the map after fleeing a bank generated in the center, etc.

Rebel One (Personal Game Project)

Prototype Level

Here’s an early video of a personal game project that I’ve worked on for about a month so far in the unity game engine between jobs. The project originally started as an exercise in increasing my knowledge of game programming in order to supplement my primary focus on artwork production and game design.

Some things learned coming from an artist dabbling in some game programming:
-Raycasting is powerful, and you can get a lot of mileage out of simple boolean checks, distance equations, and time.
-Some things that I thought would be complex for me to program turned out to be really simple.

-Somethings I took for granted == not so simple. Save game states, who would of thought.

-Debuglogs and printing out script variables is valuable when I haven’t implemented any visual feedback yet.

-I hate nullreferenceerrors

-And not really programming related, but level design (and flying around the level in the editor for hours…) is still fun!

The following deals with more of what goes on in my mind when I’m focusing on the other side of development.

The overall aesthetics focus on a minimalistic depiction of a war between the blues and the greys, while introducing rather computerized elements such as the strange grid floor animations and the choice of trees showing their “raw” billboard components rather than “actual” alpha masked-leaf textures. Not necessarily pure abstraction-ism because the objects are representative, but as a mixture between both representationalism and basically me playing with elements of abstraction. Plus, a little bit of animation and massFX pre-baked destruction goes a long way!

The color palette is kept to a strict and deliberate choice of complementary blues and oranges when dealing with the main city layout and enemies, with greys being used to ground the player and eventually his AI comrades. Textures will be used in an almost spot color manner in order to keep visual interest going throughout the game.  Three separate directional lights are used to fine tune the control over each surface, especially since most of the environment relies on solid color so a high level of attention must be paid to how each side is lit, with ambient occlusion playing an important role in helping to distinguish the different features of each model from one another.

These choices were made with the goals of both creating a hopefully light and refreshing visual design of the game, and perhaps most importantly, one that is both malleable and manageable for a one-man project.