Discounts for Badass Locomotive

Badass Locomotive is now up to 67% cheaper! The new prices are 

1.49 US$ | 0.99 € | 0.99 GBP

Buy directly from me
 

Building Levels in Unity – Part 3 of 3

This post originally appeared on paladinstudios.com

Hi!

It's me again, Matthias of Paladin Studios. This is part 3 in a series about the level design of The Fork Of Truth. The first two parts are here:
In this final post of the series, I'll go into all the smaller and ancillary tricks that make the entire level come together.

 

Point of View

The view of the game has to be carefully considered, and a slight variation influences the way we see the game. Make the camera "over the shoulder", and it feels like a 3rd-person brawler. Keep it high in the air and static, and it becomes a real-time strategy game. If you have it hovering above the player, moving with her, suddenly it feels like an Action RPG.

2013-07-15_16032013-07-15_1603_001
(The near and far positions of the Fork of Truth camera - note the angle difference)

We tweaked the camera settings for a long time. Ultimately we decided on variation of the Action RPG camera, angled to look down on the player in a fixed orientation. The pitch of the camera changes slightly, depending on the zoom level: When the camera is closer to the ground, it will tilt towards the horizon. If it's up in the air, it will lean towards looking down vertically.

 

Choke points

The level shape changes from small corridors to open areas. By adding "choke points", players are forced into the funnel of the level, which prevents them from wandering and getting lost in open space. The path is ultimately linear, but there is enough room to go off and explore for a while. Natural bottlenecks lead players back onto the path again.

2013-07-15_1605
(The level for the Fork of Truth demo, with red arrows pointing at the choke points)

The level gives the player the possibility to explore and find goodies, but also a clear path towards the end goal.

 

Details

Wherever feasible we try to add fun details into the environment which tell their own story and give "life" to the world.
Fishing-equipment near docks:
lfg_fish_01

Trampled fences, the aftermath of a goblin-raid:
lfg_trampled_fence_01

Signposts to show you're on the right track:
lfg_sign_01

Fake cows, because we didn't have time to model actual ones :P
lfg_cows_01

It's these little details that tell the story of the environment: Who lives here? What has happened? Is it dangerous? What can we expect next?

 

Lighting

We use a simple directional light with realtime shadows. A little tip for lighting: The sunlight color should typically be a little bit yellow, and the shadows should be a little bit blue-ish. This simulates a clear blue sky (blue coming from all directions) with a "yellow" sun (the directional light).

 

Fog

At a certain distance from the player fog is generated. This obscures far away objects, saves rendering-power, and adds to the atmosphere. The level can be also made more "spooky" by increasing its density.

LFG-Fork-Of-Truth-16
A subtle fog (as seen above) can enhance the atmosphere of the scene - but don't overdo it.

 

Changing the Atmosphere

When the heroes enter the forest, the atmospheric theme switches subtly. The lighting gets darker, and the fog creeps closer. Objects placed beyond that point are more dilapidated and have more muted colors. Here you can see the new settings. Note the differences to the other screenshots:

lfg_new_ambience

 

Sounds

Several sound sources are placed throughout the scene. Adding subtle sound effects can have a huge impact on the level. Hearing birds chirp and water rush help you to fully immerse yourself into the game, as it it were a real place.

 

Reactive Environment

The environment does not have to be static. Even though we did not have the budget to add NPCs, we still wanted to add some interaction with the environment other than just bashing enemies. When the gang enters the village, each time they walk near a house the villagers close the shutters, saying things like "Hide yo kids! Hide yo wife!". This makes the world feel populated, even though there aren't any actual characters around.

lfg_speechbubble_01

There are many ways to achieve these kinds of effects, just think of things that the environment could "do" to respond to your actions or presence. Ducks could fly away, a deer could chase off in the distance, a child may come up to play with you. The possibilities are endless.

 

Treasure Chests

Who doesn't love goodies? Whether it's treasure chests or simple hidden loot drops, it's a great thing to discover something edible/sharp/pretty/valuable. The beauty of a chest is that it's always a little surprise what they might yield. They spring open, uncovering the treasure - yummy, apples!

lfg_chest

 

Texturing on the ground

As mentioned in part 1 of this series, you can paint on the terrain in the scene. What is also possible are gradients between several textures, and the creation of mash-ups between those two.

We use this to put dirt on cobblestoned roads:
lfg_road_01

And leaves on the ground in forests:
lfg_forest_01

 

Asset Store

Unity comes with its build-in Asset-Store, where you can get all kinds of stuff for your game

Our time was very limited, so we decided on concentrating on the characters first.

Character Shot - Benny Character Shot - Cale Character Shot - Krunch Character Shot - Richard

Sadly this meant we wouldn't be able to give the same amount of care to environmental objects. The compromise to solve this situation was to use external assets for a few selected high-intensity items, which are used throughout the entire environment.

Houses were a good choice, as those are usually expensive in terms of time to invest. We found a nice pack of medieval building-elements. From those we assembled the buildings. We then re-did the textures, so they would fit our art style and aesthetics better.

Be careful with what you use - some assets need a unique, custom-built approach, while others are more generic and can be bought. Always try to keep the game consistent - this goes for sound, visuals, animations and any other assets you purchase and/or create.

 

Backstory

If at all possible, start with a little backstory on the environment. Who lives here? What kind of people are they? How do they make a living? Where do they walk? Are there any enemies? What are they up to? Where do they come from? We actually wrote a backstory for the village and its surrounding environment, even though you can't see it. This hidden lore is the basis of everything in the region, and adds to the believability of the place.

 

Conclusion

  • Fine-tune the camera angle, and adjust the environment to make it fit
  • Use "open" areas and choke points to balance exploration and progression
  • Lighting and atmospherics do not have to be static - change them to change the mood
  • Add ambient sounds to increase believability
  • Can you let the environment react to the player?
  • Where are the goodies? Treasure chests? Little easter eggs?
  • Use the Unity Asset Store to quickly fill the level with content (but use it wisely!)
  • Write a backstory so it's easier to fill in the details of the level
There are many, many ways to build a level. I hope this gave you some new insights into creating levels in Unity, and maybe help you with your own!

The Fork of Truth Kickstarter ends July 19th. Please back the project and spread the word!

Thanks, 

Building Levels in Unity – Part 2 of 3

This article was originally posted on paladinstudios.com

Hi!

It's me again, Matthias of Paladin Studios. This is the second of three articles on how we built the level for the Kickstarter demo of The Fork Of Truth.

Part 1 deals with the basic environment setup in Unity, using Unity Terrain. If you haven't read it yet, you can find it here. In this segment I'll go into the environmental objects, and how they are set up.

Overview

Basic Setup

When you work on levels, you have two approaches: Using a modular tile-based system (think "Lego") or building everything manually. Previous Paladin games, such as Momonga – Pinball Adventures and Nikko RC Racer use the build-it-manually approach. It gives you a great deal of freedom, but because the levels take more time it limits the scope of the game. The level construction also becomes an inflexible and time-intensive process, which hurts iteration and experimentation.

momonga_01
9

Tiles works differently. Instead of building every asset by hand, we create a set of building blocks, which can snap together. With a small set of blocks you can create some pretty wild variations. Perhaps the biggest advantage of a tile-based system is that it allows for a quick build-test-refine cycle. Setting up (or changing) an entire scene is easy and fast, which allows you to quickly test different variations of the level.

Tiles

Everything in the game (buildings, crates, fences) is an “object”. Each is made to fit easily into the larger game, and it's sized specifically to align to tiles. Because all objects are sized in this way, they also align to the other objects in the game. An object is essentially a 3D model in Autodesk 3DS Max. Every object sits in its own file, and this file contains everything it needs. This is what an object could look like:

lfg_model_watchtower

This proto-watchtower appears at several points in the level, and can be complemented with other objects like palisades, crates, barrels etc. Note that the pivot point is at the bottom of the object. That way we can easily place all objects “on the ground”, as their zero-points are already there too. We save this object in a folder titled “models” in Unity. From there, they are automatically imported into Unity, ready to be used within the game. The proto-tower is not final, it is a simple blockout. The artists have made this for a general indication of size and shape, but we still need to make the final 3D model. We can already start populating the level with this mockup, by turning the 3D model into a prefab in Unity. These “Prefabricated Objects” will be the building blocks we utilize to assemble the level geometry.

We automate prefab generation with Merlin's Prefab Lab, a plugin that automatically creates a new prefab in Unity for every 3D model. When you then change the source 3D model, Prefab Lab will update the model inside the prefab while preserving the dependencies. When the prefab is up to date, all the objects in the scene will be updated as well.

Naming Conventions

Every team member can access, modify and create objects. As such it becomes necessary that each object is clearly named, so that there is no confusion in finding them in the huge library. There are many ways to name objects, but we are looking for a structured way that allows us to find the objects in the project folders. Whatever convention you choose, be sure to follow it All The Time.

We use this convention:
"Tree Broad Leaved 01 3x3 Green"

The structure is "IdentificatorModifierVariantFootprintOptical Distinction", written with capital letters and spaces between the words. It starts with the thing (“Tree”, “Rock”, “House”), followed by the main modifier (is it a large house? A small house?). This is followed by a running number, to allow for variants of the same thing (i.e. 2 different “Rock Large”). The footprint tells us how big an object is in tiles, so we immediately know how big it is without adding it to the scene. This naming scheme groups all related objects together naturally, so we can easily navigate the object library.

Placing Objects

To place an object in the scene, go to the prefab in your project-folder and drop in into the scene:

lfg_editor_01
lfg_editor_02

That's it! Repeat that with a several other items, and the level will fill up quickly. Then simply tweak the position and rotation of the objects until you are satisfied with the results.
lfg_editor_03

Snapping Objects

Placing objects in a row is quite useful too. Since all objects have been built to fit the “grid”, they can be snapped together. This way we can create farm-fields (and other constellations) in no time at all:

lfg_field_01 

Holding down Ctrl while moving an object will snap it to the grid. The snapping distance can be adjusted in the Snap Settings (Edit -> Snap Settings). This is especially useful for fences. By just snapping them together we can create a longer fence in seconds:

 lfg_fence_01 
Another way to align things is by holding down V while moving. This will snap the current object to any edge or point in the scene. We can also add slight rotations to the objects while duplicating them. By slightly rotating each fence-piece before creating the next one we created this nice rounded enclosure: 

lfg_fence_02

Conclusion

Using a tile-based system allows you to create levels quickly and painlessly.
  • Think in terms of Lego, and determine the tile sizes you want the objects to fit into
  • Name the objects consistently for easy access
  • Use prefabs to let your object updates propagate throughout the levels
  • Use the Snap function to quickly create arrays of objects
For the final game we will create at least 12 levels, all much larger and stuffed with content. They too will be built on the tile system, which is essential for an efficient workflow.

Next time: In the 3rd (and last) part of this series I'll go into all the little things that make a level come together, like lighting and sound.

Curious about the The Fork of Truth? We are running a crowdfunding campaign on Kickstarter. Check it out, and if you like what you see, be sure to back the project and spread the word!

Thanks,
-Matthias

Building Levels in Unity – Part 1 of 3

This article was originally posted on paladinstudios.com

Hi! I'm Matthias Zarzecki, and I'm making the levels Looking For Group - The Fork Of Truth (among other things).

In this series we're going to use Unity to create a game environment. The first part will deal with the basic landscape - the terrain on which the rest of the environment is built.

If you've seen our rockin' trailer...


...or our Kickstarter video, you can see the environment the characters fight in.

To make these videos, we set out to actually built a playable level. It serves as a prototyping area, to test the combat system and overall look-and-feel of the game. We wanted to use actual footage for the Kickstarter videos, so people would know what to expect. Ultimately this resulted in a fully functional game (albeit a rather short one).

Level overview

 The gang starts in the lower right:
 lfg_01 

They break into a village and get in the way of a goblin attack: lfg_02 

Then they get a quest from a farmer (actually a goblin in disguise), and track down the goblin menace. They are lured into a trap, resulting in the final battle in the goblin camp:
lfg_05

The level takes about 10-20 minutes to play through, and is quite fun. So let's talk about how we made this!

Terrain

The entire level uses the Unity Terrain. It is a great way to create natural landscapes.

To get started with Unity Terrain, select "Terrain" -> "Create Terrain" in the menu bar. You start with a flat plane:
lfg_terrain_01

Unity Terrain lets you "paint" on this surface, using different brushes and sizes:
2013-07-05_1438_001

Using the Height painting tool (the first mode), you can paint height differences. Simply select the right mode, and paint your terrain on the plane in the Unity viewport:
lfg_terrain_02

Using the texture painting tool, it is possible to apply textures to the terrain:
2013-07-05_1438

Start with a base texture like grass or dirt, and take it from there:
lfg_terrain_03

Add extra textures to create rocks, sand, any type of ground you need:
lfg_terrain_04

Roads are easy to create. Simply paint a specific height, and assign a road texture to the terrain:
lfg_terrain_05

These are the textures we used for The Fork of Truth:
2013-07-05_1437

With these simple tools, you can create complex terrains that are convincing and interesting to look at. You can see the road texture painted on the right, and the height differences in the pool: 2013-07-05_1434 

Unity Terrain is an awesome feature, and offers a wide array of options and ways to create a world. You can sculpt almost any kind of landscape with it. Create streets, rivers, canyons - all with a swipe of the mouse.

Verticality

But you have to be careful not to overdo it. Things may look great, but a hilly terrain could give you all kinds of level design headaches.

Height differences make placing things a chore. You might end up spending hours adjusting the vertical position of the objects in the scene, so that they don't float in the air or are stuck in the ground.

The basis for the LFG-game is a flat plane. There are still hills and depressions, but these are purely visual. You can't actually reach them. You can see some of these non-flat areas highlighted in the picture below. They are inaccessible due to obstacles and invisible walls:
lfg_hills_02

Another benefit of keeping your level flat is simpler attacks. Attacks and abilities become much more complicated when there is an uneven terrain. Does a summoned tornado move horizontally, or does it move along with the floor? If so, could it move up a cliff? If you are standing on a hill, does your fireball hit the enemies below or do they fly over? What about if there is a hill between you and the enemy?

Keeping the level "flat" gently sidesteps these problems. Games like Diablo, Torchlight and Magicka use a mostly planar environment as well. And with good reason.

Note that even though we kept the walkable areas flat, we did add uneven ground in some places to give the impression of depth. For the extended game we plan on using height in the levels. Height-differences and cliffs make for interesting level design, so we don't want to leave it out for the real thing.
lfg_04

Water

The characters can't interact with water in The Fork Of Truth (yet). Should anything fall into the water anyway, like a goblin thrown by an attack, it is killed immediately.

The river in the level is a depression in the terrain, moving down to 30 units below the "floor-level". Here you can see the river “canyon”, with some decorative objects placed within. All it needs is a bit of water:
lfg_water_01

There are different options for the water surface. The simplest version is a simple flat square with a  blue color and transparency:
lfg_water_02

Unity comes with several water shaders. This is the basic one. It has animated waves and simple reflection, but no transparency:
lfg_water_03

This one is a more advanced version (the coloring is a bit off at the moment). It is transparent, and has all of the wave-animations of the previous one:
lfg_water_05

The next one is just about perfect (it is called "Water4" in Unity Pro). It is transparent, reflects the environment, has animated waves, and nicely fits the cartoony visuals of the game. It also has an interesting "fizzle" area at the borders. Even though it has all of this great stuff, it doesn't kill the framerate like some of the other advanced water types.
lfg_water_04

Conclusion

The level building process in Unity starts with the general terrain layout. Here is a summary of the tips:
  • Use the Unity Terrain for fast landscape sculpting and texturing
  • Keep the walkable paths flat for easier level design
  • Unity has several great water shaders, we used the Pro shader "Water4"
Running around in an essentially empty level with just the ground and water beneath your feet can still be satisfying. If that is indeed the case, you have built a solid foundation for the rest of the level.  

Next time: We'll have a look at placing the objects in the level, and fill up the environment with trees, bushes, fences, and other doodads.

Curious about the The Fork of Truth? We are running a crowdfunding campaign on Kickstarter. Check it out, and if you like what you see, be sure to back the project and spread the word!

Thanks,
-Matthias