Examples3

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.

[UPDATE] 7/11/2017

Time has spent working on getting a basic form of the character modeled, with animations working in UE4 as well as basic AI that will react to sound if no enemy is detected, or detect an enemy if it sees it within the degrees of its conal vision. Additional features include among others:

-Characters rotate head bone to face nearest target/enemy, allows them to look up/down if the target is at a different elevation

-Characters now randomly blink using a special material that slides an alpha mask down the UV of the spherical eyes, which were cut in half and flipped to be overlayed. The result is a material instance that powers random blinking to give more life to the character. *Must remember to stop blinking from occurring upon death.

-Characters now play a death animation while transitioning into ragdoll physics, giving the best compromise between having static death animations, and having ragdoll physics that don’t look too much like becoming a flimsy puppet upon death.

-added in bullet decal effect and particle blood effect.

-added in basic reaction hit animations, currently uses one additive animation offset in an animation montage, and scales the blend of the montage randomly between 0.1 and 1 before playing. Playing the montage is called upon taking damage. Will add in more animations from different angles to increase the variation between hits.

-Spring arm camera boom programmed to switch between shoulder-aiming and regular aiming. Character will automatically orient its rotation to movement, or rotate to face the aiming reticle dependent on whether the player has “fired” or shoulder-aimed in the last few seconds.

-added in procedural grass/tree scattering feature, derived from making a custom grid for that actor. Foliage will use the grid to generate an even point distribution of placement, and then depending on the percentage will either fill all, none, or partial of the invisible grid. Allows grass and tree features to be parented to tiles, in order to create grass or trees during runtime that align with the area of a cell.

-added in a volume remover feature, which will destroy any instances of grass or trees, etc. within its invisible box volume. When parented to buildings for instance and scaled to fit a building’s bounding geometry, will destroy any grass or trees that might of been generated where the building is located, preventing any tree or grass from appearing inside the building’s interior.

Advertisements