How do we make the player feel like the world of Reverie is alive?  Well there are plenty of things! Let’s talk about the two main way we do this, NPCs and the environment.
Realistic NPCs
One of the obvious things is the other living things of the game: Non Player Characters (Yes, NPCs).  An NPC by itself isn’t very exciting. If they have no AI or no interaction with the player, they just stand around taking up valuable game space.  Here is an example of that:
This version of Grandpa doesn’t feel alive, he doesn’t move, he doesn’t react to the player’s presence at all.
Now compare that Grandpa to this one (Granny helps too):
This version of the Grandpa looks at the player when they are close to show the player that this NPC has human like reactions, thus making him feel more alive.  The Grandma in the above GIF is a good example, if she was just standing still in the hallway, she wouldn’t be very interesting.  However, giving her a wandering AI makes her feel alive thus making the world feel alive.
Another thing that NPCs can have to show life is idle animations.  Idle animations are what we give to NPCs that don’t have any AI that makes them move around the world.  For example, this guy that hangs out in the forest, he shuffles his feet around and scratches his beard, these are two human movement to make him feel real and alive.  The flies also help as well, not only do they add movement to the scene, but they also add to his character.
Ok enough about NPCs, let's talk about the environment itself being alive.
Living Environment
Creating a living and unique environment can be where a lot of the work comes in. Â Just think about what you would expect to see if you walked outside: flowers, trees, birds, insects, grass, etc. Â All of these things move. Â Translating this into a game like Reverie provides a challenge. Having each of these things move definitely helps, but only small animations is essential. Â Having the grass move as the player walks around is a possibility but that could make the game look a little messy (remember, Reverie is being made for the Vita, quite a small screen). Â
Here is what a still environment looks like:
As you can see, there is nothing going on here! We have the trees and the grass and the flowers, but everything is static and lifeless. Â This does not make the world feel alive.
Now look at this:
There are leaves blowing in the wind, there are butterflies fluttering around, the river is flowing up and down the bank.  Even with the player’s character standing still the world feels more involved things are happening without the player having to do anything.  All of this creates a more life-like scene as the game world acts much like the real world.
Can there be too much?
Although creating a living world is important to get the player immersed in the game, we also have to make sure the screen isn’t too busy.  Using the last GIF as an example, if we had our trees rustle around and move, the screen would definitely look more alive, but too much movement can be distracting; especially if there are enemies patrolling the area too!  If you pay close attention to each thing that is animating that GIF, you’ll notice that the butterflies are only moving in a very small area, the flowers are only moving up and down, the river’s flow is only subtle, and the leaves blowing over the screen are fading in and out.  All of these subtle animations add together to make one big picture; having our tree’s move around a lot will be distracting, and having the river splash up the sides of the bank could get overwhelming too.  All of this is something we think about when creating the animations and putting the scene together.
Now to wrap things up
We hope you enjoyed learning more about the behind the scenes of Reverie. If you have any feedback about the length, technical depth or anything else about the blog post, contact us on https://twitter.com/rainbite or https://www.facebook.com/rainbite . We love getting your messages, and we try to reply as much as we can, so hit us up! VivaLaVita!
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
âś“ Live Streamingâś“ Interactive Chatâś“ Private Showsâś“ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
Reverie was designed with old style action/adventure games in mind.  This means that the map is made up of tiles.  Think of the Legend of Zelda: Link’s Awakening, or almost any of the 2D Legend of Zelda games and how they handle their overworld tile system.
This is Link’s Awakening world map:
And this is one tile of the map:
In these games, one tile is the same size as the user’s screen and the player will move their character to the edge of each tile (edge of their screen) to transition to the next.  Link’s Awakening was made for the Gameboy console which is why the tile is more square.  We are creating Reverie in a similar way.  Each tile is the same size as a Playstation Vita screen, which is 960x544 pixels. Our resolution for our pixel art is 318x180, so we then scale the images up to match the screen pixel size.  We can talk more about why we have done this in a separate art post if you want, let us know on Twitter or Facebook if you want!
Reverie does have a slight difference in our tile system as some of the tiles are double the Vita screen width or height, or even more. Â For example, the home town which we have shown parts of in various Twitter images and GIFs, is two tiles wide and six tiles high giving the player more freedom to wander the town.
The interior spaces, like the different houses and the shop in the town, are handled a little differently as well.  They aren’t tiled like the overworld or the dungeons are.  This is because it would be super annoying to have a screen cut every time the player enters a different room in the building.  The only time there is a screen cut inside of a building is if the player is moving to a different floor.
Oh and we are using the Unity engine. Â That part is important.
Each tile contains lots of different parts to it.  The walls, the floor, the obstacles and any enemies that are in it.  This is where we had to decide if we wanted to use Unity’s prefabs or scenes.  So let’s talk about those.
Prefabs
One the great things about Unity is the prefab system. Â A prefab is an asset that stores any object complete with components and properties.
Here is an example of our HealthPickup prefab. Â
Everything under the “Inspector” tab is a component with it’s own properties.  All of these components and the values of the properties are the same across all instances of the HealthPickup prefab, whether it is spawned at runtime or already created on startup.
Prefabs are convenient for easy world creation, as we can drag a prefab into a scene directly from the folder and it’s there with all of its values and sprites and animations (if it needs them).  While this is super useful for world creation, it didn’t really work well for our tile system.
Scenes
A scene in Unity is essentially a developer’s playground.  Scenes make it easy for a user to add or remove any object into the game world.  This is a basic scene in the Unity editor that is used by literally anybody who creates a game in Unity.  On the left there is a Hierarchy of everything in the scene.  We can click on anything in the hierarchy and manipulate it however we want. Anything in the hierarchy is classed as a game object or a prefab (hint hint).
A scene makes it easy for the user to edit an object in the game world and change their components and properties in the Inspector.
Another useful thing about scenes is being able to drag an object or prefab from a folder directly into the game world. Â Here we drag the BeachUmbrella prefab into the HomeTown scene and place it on the beach.
As you can see in the hierarchy, when the BeachUmbrella prefab is added there and the Inspector shows its components with each of its properties.
Scenes over Prefabs
Now, we could have made the entire town a prefab along with every other tile we plan to have in the game, and have the world map be only one scene.  While this would have made the hierarchy really messy and confusing to use, the biggest issue is that nesting prefabs is impossible in the current version of Unity.  A nested prefab is a prefab inside another prefab.  For example, an enemy is a prefab that holds the enemy’s sprite, animations, and A.  This could be nested into a prefab that is a group of enemies.
As you can see here, the town alone has a lot of objects and prefabs in it… Like, a lot.Â
Although a lot of these things are just 2D sprites, there is a lot of stuff going here. Â There are colliders on the walls of buildings and cliffs, colliders on the base of every tree, bush, and umbrella.
In the end the main reason why we used Unity’s scenes rather than the prefabs is because prefab nesting isn’t viable at the moment and the hierarchy would be extremely messy.  Using scenes to represent each tile helps to make creation and management of the map easier. Here is how we load our tiles using scenes.
Ways to Load Tiles
Okay, so now I’m going to get into the nitty gritty technical stuff. I have tried to make it as easy to understand as I can, so hopefully I get my point across well.
Adjacent Tiles
All of the names of the scenes in Reverie are stored in a 2D string array for each map.
This is the part of how the map is set up:
This picture shows the initialisation of the first map as well as the assignment of some tiles. Every time a scene is loaded for a map we check the tile position on the map that we want, which then returns the name of the scene to be loaded. A scene transition is started when the player walks out of the width or height of the current scene.
Here is the code for checking if the player has left the current scene:
The normal way that we load tiles is to load the adjacent tile to the player by decreasing or increasing the x or y index for the map array, and then looking up the scene name by the x and y index. The MoveDir variable defines which way the player needs to move and how much of the map index is changed. We then transition the player in the direction of that tile and unload the previous scene after the transition is complete.
If that was too complicated here is what the transition looks like behind the scenes:
Only one tile is ever loaded at any time.  By using this system we don’t have to put premade triggers in every scene to determine which scene should be loaded next, which makes my job a lot easier!
Teleport Loading
The other way that scenes are loaded in Reverie is by teleporting the player to a specific position and loading a different scene by name. An example of this is any doorway that loads to the interior of a building. The screen will fade to black as the player needs to be teleported to a separate scene which is not a part of any map.
Here the player is teleported to the inside of a house:
This allows us to create interiors that are larger on the inside and aren’t counted as part of any map, which gives us the freedom to expand the map if we want to. Implementing each of these teleporters is more time consuming than using a map system.  This is because each scene and the position that the player ends up in must be manually typed into each teleport trigger, and this is then tested to make sure that the player ends up in the correct place. Testing this kind of stuff is pretty monotonous, but sometimes game development is like that.
This is the trigger to enter the player’s house:
Now to wrap things up
We hope you enjoyed learning more about the behind the scenes of Reverie. If you have any feedback about the length, technical depth or anything else about the blog post, contact us on https://twitter.com/rainbite or https://www.facebook.com/rainbite . We love getting your messages, and we nearly always reply, so hit us up! VivaLaVita!