Saturday, October 13, 2012

Repositories - Back up ALL the files!

Repository? What is that and why is this related to game engines? Well it's useful for game engines, more specifically programming in general and has a variety of other uses too. A repository is sort of like a back up system for your code (or other files). If you have a repository for your code and you make a really terrible mistake later on, you have the ability to revert to an older version and restore code! It has a lot of other things too but let's seperate this blog post neatly into some sections first.


Backing Up


Repositories have the ability to back up your files and revert to older versions. You would set up a folder of your choice as a repository and from there the program will let you do a variety of things (program of your choice, I use mercurial and tortoise HG, but more on that later). Essentially I can choose which files I would like to include to back up, so even if there are a ton of files in the folder I chose, I can select each one that I want and exclude the ones I don't want. There is even a file called .hgignore that allows you to ignore certain types of files so that they will never appear when choosing to select what to back up.

From there (for mercurial) all you have to do is add a comment that says something about what you're doing so, something like "Just created this program that adds numbers" or "[ADD] Added the ability to multiply to program". And then you just click commit. This will add a new "revision" which can be reverted back to in the future. You can add new revisions whenever you want to add a new file or change a file.

It's also possible to branch off as well, which means you're making another version that might be significantly different. From there you can multiple branches, each changing different things and even merge them later. So you could edit one file A, and one file B in a different revision. And later on do a merge that allows you to have both the changes. There can be conflicts though so you will have to use some provided tools to resolve those.

Sunday, October 7, 2012

Concept Art Creation & Tips

Development for this year's game has already begun with my group Scorching South Studios. We have already began preliminary game design ideas as well as concept art for the models we're going to create. Each of us had to do concept art for either a character or several props, each of them all needed orthographic views for Front, Side and Top as well as a perspective drawing.

In this post I'll detail my process for creating the various views as well as some tips on how to make life easier in photoshop for making concept art in this style. Here I draw one of the "pirate" characters in our game, Violet Blackwood.

Here is a link to a description of our PIRATE GAME

Outlines

First we begin with our outline of the shape of the body. Since this is concept art we don't necessarily have to make it like a painting. A good step for beginners and experts a like is to draw a stick figure and figure out where the joints are. This gives a basic idea of our proportions. Make sure to use references if you don't know your anatomy, there are plenty of guides out there so I won't be covering how to do anatomy. Not to mention I still have some ways to go to fully understand anatomy.


Here I am simply drawing only half of the pose since this is a front pose and we can use an easy trick to make things easier and more accurate.


We can select the layer our pose was on and simply make a copy of it and flip it around. Voila the full pose in half the time and matching the other side.



From there it's all up to your design ideas for what you want the character to look like. Look up references for what you might want and look for inspiration. Figure out who your character is, how they might dress, what kind of expression they might have, etc.



Since we already have a base outline of the shape of the body, we can make changes if we aren't satisfied with a certain copy. Here I have redone some features, just using the base outline I made earlier. I even have a copy of the old outline from the image above in case I want to use it or reference it.

Saturday, October 6, 2012

Game Engines & Glitches!

Although I did an old post on glitches, I would like to do another because glitches are so interesting and I can take another look at it more so from a Game Engine point of view than computer graphics one.


What are glitches?


Glitches are a common issue in a lot of games and can range from being problems with graphics, to gameplay itself. A glitch is a very broad term for the game behaving in an improper fashion. A behaviour that is not the one intended by the developers. Pretty much every gamer has experienced a variety of glitches in different games, sometimes obvious, sometimes subtle. Sometimes they are a hilarious occurance and othertimes a frustrating detour to the gameplay. It can even go so far as to break the game for you, preventing you from proceeding and just causing mental suffering.

Friday, October 5, 2012

Linearity versus Freedom in RPGs

The balance between control and freedom between the players and game developpers has teetered since the beginning. Developers have tried to find the right balance of leading players into their story and levels while giving them enough freedom that they aren't suffocated and can have their own unique experiences.

But its not just about freedom. it's about the type of game is being represented. Some games benefit more from a linear experience while others are better suited to give more freedom. Every game is different and requires the right balance to fit with the games mechanics. In this post we will take a look at how some games have gone linear or given freedom and how they faired.

Three layers of Freedom

Before we begin let's take a look at the three types of linearity/non linearity we can have.

Linear

Pretty much controlling the entire experience, forcing you onto a single path to one objective, no alternate paths or methods of completing that objective. Players learn new things in the appropriate order and developers can make sure everything goes right.


The path is very guided in Linear. The gray lines represent missions/obstacles that must be completed in order to proceed.

Semi-Linear 

Players are sent to complete their objective but they can use alternate methods of completing it. Players are given some amount of freedom but they are still being led slowly towards the final goal (Main storyline). Developers will have less control as players can do certain actions out of order that can make the experience not the intended one designed by the developers.


There are many more choices, alternate paths but to proceed any farther you must reach the end of the current level. From there you will get more paths.

Friday, September 28, 2012

Ogre3D : Making a robot arm

Game Engines is a course all about programming through and through. The teachings of this course is to understand the core building blocks to create engines in an efficient manner. Besides learning how to build engines, we at the same time learn how to use and modify existing ones to suit our needs.

Like any course this one requires homework which is done in a different manner than most schools. You are awarded "XP" points for completing a homework question, which builds up until you reach enough that you are allowed to do the midterm, and later the final exam. I started off with a simple one so as to get points more easily and start myself off easy.

All of the code we do is used by using an engine compiled and built by our professor and TA, along with the open source "Ogre3D" engine. I'll briefly go through the steps I took into understanding and creating the question I decided to do, which was to build a robot arm.


About Nodes and Skeletons

The robot arm itself is supposed to be like a skeleton, able to move its arm and fingers around such as a human would do. With Ogre3D the task isn't so bad thanks to some of its features. First of all to create a skeleton you need to have whats known as a hierarchy of nodes. Nodes essentially act as our joints and are the basic building blocks you need to make a skeleton. You want to strategically place these nodes where the joints of your body would normally be.


A Skeleton, each dot represents a node, a joint like a bone in the body

Wednesday, September 26, 2012

Portal 2 - Ways to design a level

Portal 2 is a rather simple game with pretty basic mechanics but the concept of having two portals to play with via portal gun opens itself to limitless numbers of puzzles. With Portal 2, Valve later released a level editor for the community to share. The level editor itself is very easy to use and with basic knowledge of Portal 2 of even just experimenting with the level allows you to create all sorts of puzzles. For Game Design our goal was to create a Portal 2 level with our group with some requirements.

I’m not going to talk about what I did to fulfill requirements for the assignment, instead I'm going to go through what I learned in designing a level. Essentially what I should do and what I should not do for a puzzle. These dos and don’ts are up for debate but I feel these are things that really help in level design.

My designed level (With testing and additional content from teammates)


NOTE TO THOSE MARKING THIS ASSIGNMENT : ONLY READ THIS BLOG POST AFTER PLAYING THE LEVEL

What to do!
_____________________________________________
Make it obvious what a button does

When triggering a button, you need to make sure that you see it affects the environment around you. This means if you press a button, a cube should drop down for you to use right in front of you or near you. It shouldn’t be all the way across the map where you can’t see or hear it.

Laser gate on

The reason we do this is because that way it won’t confuse the player needlessly. Have a button be in viewing distance of what the result is going to do, or at least keep it close enough so that players will see the result without having to search too much. Having an obvious audio queue can also work but isn’t as effective. We need to provide the player some feedback on their actions otherwise it’s needlessly harder. If we want to make a puzzle harder, it should be because they need to think about how to solve a puzzle, not more difficult because they need to find out what your button did and where it dropped the cube.

Laser gate off. The button is in plain site of the laser field so it's easy to tell what the button did.

In my level, I’ve positioned all my buttons in such a way as if you look close to them, you will see the result immediately or soon enough. For example, a button will drop the cube right next to you, or will raise a bridge right in front of you.

_________________________________
Lead a path for the player

In other words, don’t make a giant room that doesn’t look like it has any particular order or requires a lot of back tracking. The reason we would want to lead the player is because we want them to get to our puzzles, this isn’t an adventure game. Now there is a limit as to how much we should lead the player, don’t point out everything for them, but point enough out for them to get somewhat of an idea of where to go. Don’t have three paths and in no sequential order scattered about.


The purpose for this game is for players to solve puzzles, not wander around like an adventure game. Though designers could attempt making a level like this, the main draw to playing portal is puzzles. Any moving around without doing any actual puzzle solving could be considered boring. Walking around to get to the end of the hall just isn’t fun.

The goal is in sight, all you need to do is figure out how to disable the threats in your way

For my level I lit up the path (This was actually a requirement for our levels) but I also made it very linear, you can actually see your final destination right away. I made it obvious where you need to be, you just have to figure out how to get past the obstacles in your way. Some key areas are also highlighted by lights though you still have to figure out how to solve the puzzle once you get there.

___________________________
Allow some mistakes

The player is going to make mistakes and we shouldn’t always punish them too terribly with them. One bad thing to do is make it so if players pass a certain point, but forget something they become permanently stuck and have to restart the level. This is especially terrible if there isn’t even much of a clue that continuing without a key object will end up this. I made a jump in one level to test and found out I became stuck at the bottom because I couldn’t portal to anywhere else.

For my level, it is possible to return all the way to the beginning if you dropped a cube

One debatable thing is the use of precision mistakes. For example I played a level where I had to use a reflection cube to aim a laser to a laser catcher to cross a bridge. If at any time the laser slipped off, the bridge would fall under me. Now this is difficult to cross and it’s a neat idea but for some players it can be frustrating because they know exactly what to do but one small slip up leads to restarting a level. This can lead to even more frustration if this is right at the end of a level meaning you have to do everything all over again because of that. If I were to use this in a level, I would just force them to restart the bridge, not restart the level. Either that or have a checkpoint right at that spot.

On the topic of checkpoints, one thing to do for a level is that if you plan to have a very dangerous area where players will die, try to keep it closer to the beginning rather than the end. This way if they make the mistake of dying, they will be able to retry as soon as possible rather than having to go through the same beginning puzzles over and over. Eventually that just becomes a chore because you already know how to solve everything at the beginning and have to keep doing it over and over.

Precision mistakes are minimal as the player is given the whole length of the level to try aiming this laser

How I used this in my level, you ride across a tractor beam throughout the level, spotting obstacles in the distance. You can also see these obstacles before riding the tractor beam too. I ensured that players could return to the beginning of the level by raising a bridge if they forgot anything important. To solve my puzzle, I also give you ample time and alternative ways to get to the finish so as to avoid players blaming precision mistakes. At the end of the level, you have to destroy some turrets with a laser beam and using a reflection cube. The farther back you start on the tractor beam the more time you have to target the turrets in your path. There is also a fairly wide window you have to destroy the turrets even if you start as far forward as possible.

_________________________________
Don’t have “Troll” buttons

Try not to have buttons that will screw over the player, especially into death. Don’t have a button that immediately kills a player for pressing it, unless it’s obvious that’s what the result will be. Don’t have buttons that randomly cause effects like that or put you at the beginning of a level unless you make it clear pressing it will have that effect. It will only serve to frustrate players and make the experience worse.

These two button (left) in my level used to be unhelpful. This has been rectified.

For my own level, I did in fact have a “troll” button, where activating it would not really help you. It wouldn’t kill you or set you back, but it wasn’t helpful either. Players in general will want to press the buttons and have them do an effect of some sort that will help. My buttons simply disabled the laser that would allow you to kill the turrets blocking you from the end of the level. Now I have it so pressing the buttons will instead activate the laser so that you can proceed. I made the button actually give some benefit for the player.

__________________________________
Get rid of anything useless

This one should be fairly obvious and it’s to make sure not to have any areas that look like they mean something, but they don’t actually do anything. So don’t have a bunch of buttons in an area but pressing them actually does nothing. It will only confuse the player even more, similar to the problem I mentioned earlier of having buttons who’s effects are obvious. Don’t have corridors that lead to nowhere either, they should be either a means to complete a puzzle or a way to get to another puzzle. This is similar to the troll button issue except these serve to waste time rather than frustrate the player.

The button behind this cube is given use to flip the turret in the distance. It may be a one time use, but it always benefits the player.

For my level, I got rid of any extra areas that weren’t needed. I had a small corridor that had a reflection cube but I got rid of the cube because I had already provided a reflection cube at the beginning of the level. Hence I made sure to get rid of the corridor later because it wouldn’t make the puzzle any better. I also made sure every one of my buttons did something meaningful. This is also part of the reason I changed the buttons that disabled the laser (noted in the trolling section), because they didn’t actually help you at all. You could get by without even touching them, which confuses a player even more.


Difficulty vs. Accesibility
Level beaten!

Everything I have said is relating to making everything easier to understand for players. It is my belief that it’s a very good practice. There is a reason that Portal & Portal 2 did so well in their campaigns despite them being brief. It’s because they were all very accessible, pretty much anyone could go through the game and enjoy it. They pretty much adhered to all the “What to do”s that I mentioned. Everything was clear and straight forward, the difficulty was in figuring out the puzzle, with no other issues in the way.

Think about it, if you suddenly had useless buttons, buttons that changed things in the level far away, way out of your sight then that’s just going to confuse and frustrate you right? That’s not confusion by logic, it’s just confusion to frustrate, it does not benefit the player experience in anyway. Sure it can promote observation but the key to making levels that will appeal to players is to make it accessible and it’s easily possible to keep observation too.

That’s the point of good level design to draw in players, to make them want to play even if it’s difficult. You want to make players like your levels and play through the game. If word gets out your game is broken, punishes players and is confusing in its level design, people don’t want to play. So making accessible, but difficult levels is really the best way to go. It’s simply good level design.

Sunday, September 23, 2012

Goals are the Spice for Games

Multiple game types are no strangers to games. Video games have been implementing multiple different modes for you to choose from since the very beginning. These can range from coop, to multiplayer and such but the most drastic thing to change are the goals to winning the game. The mechanics of the game remain intact (such as going from Campaign to Multiplayer) but the goals to winning have changed. No longer do you focus on getting to the end of the level and continuing the story. In multiplayer your goal can vary but the most common one is get the most kills, either solo or with your team.

Within the subset of multiplayer lies a vast array of different modes though, each with different goals. The same can be said for some singleplayer modes as well. The point is that changing the goal can affect how you play the game itself. 

In my Game Design class we did an activity for the purpose of looking at different goals in a single game. We played a coin tossing game essentially, with everyone having different goals. It was easy to see some people playing much differently, such as one person flicking coins to try and knock off others the whole time, while others were simply trying to flip coins to land on another coin to gain points. After seeing this activity I could really see how much goals can vary the gameplay.

For this post I'll take a look at various games and the other modes with different goals they offer and see how they change the experience. Let's first take a look at Left 4 Dead 2 and how a goal change in the game leads to different level design.

Left 4 Dead 2

Campaign mode vs Survival Mode

Left 4 Dead 2 is a survival horror shooter with cooperative gameplay in every mode it has. There is always a team you are with, you are never alone. If you decide to run alone you will be easily picked off by the infected. In the main campaign it has you and 3 other players trying to reach the end of the level. In the campaign, you move with your team from point A to point B, hoping to make it to the next checkpoint before dying. Simple enough, how pretty much every other campaign works in a shooter. 


Campaign mode: Beginning of the first level 'Crash'

However in the alternate mode survival, your goal is now to stay alive as long as you can with your team. Your goal is no longer to move from location to location but to simply hole up somewhere and give it your  best shot to stay alive. There is no winning in this mode, there is simply the satisfaction of getting the longest time alive in a level.

You still have access to the same items as you would in campaign but in terms of level design there are several changes.

  • In survival you are no longer forced to wander around or being forced to go to certain areas to proceed. You can stay in the same spot for as long as you want, but the catch is that the areas you can go are now limited. 
  • Survival mode takes place in much smaller areas and wandering off is not a wise. Another difference is that the amount of enemies is increased so surviving can actually become a daunting task.
  • You have unlimited supplies for ammo located in an unsafe spot (Depends on the map but typically its not easy to get back to supplies). Health packs are limited however
  • Special infected appear more frequently, especially Tanks.

Survival Mode - There is now a timer to show how long you've been surviving


With Survival mode, things have to be changed in terms of level design in order for the mode to work properly. Simply putting you in a campaign level and telling you to survive though it does change the goal won't actually make it fun. By changing a bit of the level design and rules slightly to fit with the now changed goal, it allows the mode to be significantly different to play then the campaign counterpart. Otherwise it would just be campaign mode with a slightly different shell which wouldn't be different, wouldn't give variety and wouldn't help the game.

By making a game mode with a different goal, it forced some aspects of the game's level design to change as a result to accomadate the goal. The experience is different and gives another way to play the game just because of a decision to change the goal of the game.

Let's take a look at another popular shooter with several different game modes.

Call of Duty

The Call of Duty franchise has had a wide array of game types (so have many other shooters) since the very beginning. Here I am going to outline three distinct game modes with very different goals from each other and methods of victory. Let's compare these modes which are Team Deathmatch, Domination and Search  & Destroy.

Multiplayer Modes

Team Deathmatch is the typical get as many kills for your team as you can. The first team to a certain number of kill is the winner.

Domination's goal is to hold 3 areas at strategic locations. These areas are always located in the same spot and once captured will give points to your team for every second they are under your control. They can be recaptured by enemy players. The team to get to the score limit first wins.

Search and Destroy is different than the other 2. For one you only have one life for a round and there are multiple rounds in a match. Teams alternate between defending and attacking. Attackers need to place a bomb and have it detonate, or kill the entire enemy team to win. Defenders need to run out the time limit (rounds are only a few minutes), defuse the enemy bomb if they planted it or kill the entire enemy team.

Comparing the Modes

So now let's compare them all shall we. Team Deathmatch has the most simple and typical goal, run around and kill as many people as you can. The most efficient method to achieving victory is to make sure you die less than you kill. This is typically considered the most "mindless" of the mode since it's not always necessary to think up advanced tactics to get a certain position.


Team Deathmatch - You can see the score required to win in the bottom left

Domination requires more thinking because you need to have people cover the areas you have captured as well as send in people to capture other points. Its a constant balance of keeping what you have and taking from the enemy. Since the goal is now different then Team Deathmatch, it becomes unadvisable to run around the edges of the map, far away from capture areas because that won't help to attain victory for your team.


Domination - Three locations A, B and C to capture and defend


Search and Destroy becomes far more challenging with a lot of varied goals all around in the mode. In order for these goals to become available (such as taking out the entire enemy team) some changes needed to be made. For taking out the enemy team, the rule of unlimited lives had to be changed to a single life to accommodate the rule. 


Search & Destroy - Attacking team planting the bomb

As can be seen, changing the goal to winning the matches presents themselves to very different gameplay styles. Some require less tactics to achieve the win, while others work a lot better with coordination and are much more punishing. Since some levels have objectives placed in certain areas, different levels can become signifcantly different to play. Such as for domination, which will differ much more in tactics due to different locations of capture points in maps then it would for Team Deathmatch.

 It can also be seen that for some goals they need to modify some core rules of the game in order to function properly for modes like Search and Destroy. Unlimited respawns would not work in a mode like Search & Destroy, though it could turn into a different game mode still involving the use of planting bombs. Those modes come in the form of demolition and sabotage.

Now that we've seen how goals can change how everyone has to coordinate together, let's take a look at another game which allows multiple goals to achieve victory.

Age of Empires II



In Age of Empires II, as an RTS you have the option of selecting from a variety of different victory conditions (goals). There is a selection of standard victory as well as alternative victory conditions. You can win any standard game with any of the following Standard Victory conditions.

Standard Victory

  • Conquest : Defeat all opponents. To defeat an opponent destroy all their units and buildings.
  • Wonder Victory: Build a wonder (Takes a ton of resources to make) first and keep it for a set amount of time to win.
  • Relic Victory: Control all relics on the map. These can be taken into and stored into monasteries by monks. Keep them all for a set amount of time to win.
You can complete any of these during the course of a standard match which means you have three potential ways to achieve victory. You can also opt to force everyone to only be able to use one type of victory when creating a game. So you can make a conquest only victory game, or Wonder only, etc.

Alternative Victory

  • Timed Victory: Have the highest score at the end of a certain time, or defeat opponents before then.
  • Score victory: Reach a certain score first. Score is determined by resources gathered, buildings and units built, map exploration, etc.
For these alternative goals, they use a system to calculate score based on the value of your units, buildings, research, resources, units killed and map exploration.

How these Victories make the game different


A Wonder- This is one way to achieve victory in a normal match

It's interesting in a standard game where you can try to opt for any one of the three standard victory conditions. It means you players can decide a tactic that best fits their strengths and their position in the map. They could try defensive via using a Wonder, or explorer by looking for all the relics, or even opt for offensive by going all out to try and destroy everyone. 

This system really appeals to players of all sorts of styles because a defensive player who likes to make a really strong castle would be at a disadvantage in a conquest only mode. They can use their wonder as a chance to obtain victory by staying in their base. And likewise it gives offensive players the chance to go and stop that Wonder camper by destroying everything in their base. Its a very flexible system that shows how giving multiple goals in a single match can cater to players. This also shows how having different goals will promote different styles of play.


Monastery - This can be used to store relics located around the map and is another way to achieve victory

The score system also lends itself to a slightly different style of play. You would still want to be using winning strategies to outsmart the other player but if things draw to a standstill or go to long, there is a chance you can still win by alternative means like exploring the map while one player stays inside their base. Having this different win condition can change your tactics on the fly.

So as can be seen, even with different goals, the base mechanics of the game didn't have to change. The resource collection rate hasn't changed or anything like that, or your unit creation limit isn't changed. The goals are the only thing that will differ which by themselves will make you play the game differently.  And that's the point of goals, to change how you play a game and promote variety and refreshing strategies.

How Goals change the game

Goals can vary in the way they influence the game. As can be seen in COD's Search and Destroy mode, it sometimes require some core rule changes (no respawning) in order to work properly. In Age of Empires II's case, they didn't even require core rule changes.

Whether they change the core rules or not they promote changing the way you play. It makes you think different, aim for things that you wouldn't do in a different mode. The purpose behind multiple goals and game modes is variety, to cater to different playstyles and give different experiences to players.  Sometimes you make the goal the same for everyone, othertimes you allow everyone to win in different ways. The choice in doing that lends itself to allow the game system to used to it's full potential and provide a larger amount of ways for players to enjoy themselves. Not everyone enjoys the same game type, so multiple modes is a great way for players to choose how they want to play and match up with others that want to do that mode as well.

This is how I've seen different goals affect the games I play!