Thursday, 30 June 2011

Introduction

   It took me many years (3, to be precise) to learn all the fundamental principles of creating a game. I have been researching this topic, and now am very close to understanding how to create a video game in full. But one day I say down and realized that I was bored. After a dilemma of about twenty seconds, I have decided to write this tutorial, outlining the basics of developing a game. This tutorial should help you understand how to create a game, or at least what to look for in order to learn what you need to do. Of course, nothing is in-depth about this  tutorial, but it should still prove to be useful for those of you who want to take up the occupation of visually putting your ideas to life.

   Note: If you have any questions or comments, I would be interested to see them and perhaps modify this text in accordance to the new information/request.

Tuesday, 28 June 2011

Step 1 : Design the storyline + Game mechanics

   the first step in creating computer game, usually, is drafting the storyline. In the game industry it usually one of the first steps undertaken and should not be ignored. This step provokes interest in your game as well as gives you a clear idea of what you have to do to succeed. It is acceptable that you write the story-line and try to keep it sensible and interesting (no, it is not all about using your imagination), though the story should not turn into a mere 'plot'. Were you to create a a game that is simply a series of levels and zombies, then you would have a difficult captivating the players. Try to find more information about story developing which would suit your theme, and there are many of those if you look carefully. One specifically useful blog which I have found useful is the one written by Frictiona Games, and is entitled 'In the games of madness'. Also you might want to look for video game cliches and what makes games boring or great, as this would help you with creating a believable story.
   But I wish to note the definition of the word 'story' in game development. It is not simply a plot of events. It is everything there is about a game. It explains why there might be a gun lying around in a casket, why there are monsters roaming the streets or simply why there is this smiley face trying to save the world. No item in the game should be placed without the story in mind. Place an overturned chair and a broken bottle after a party, but never an F-16 stuck through the window. Items do not simply happen to be lying around. Somebody threw them there, in a rage, perhaps, or simply because they were too drunk to do otherwise. All of this is part of the Story, and it would not matter how small and insignificant it seems.
   One way I use to think up ideas is to remember my dreams and nightmares. They usually provide unique stories, and if slightly altered, could be sufficient for complete games. Listening to music also helps, if your game needs to have a complex story.
   But of course, another method which is sometimes used is to simply create a level and then develop various ideas to conform to that level. Although this method might seem ineffective, it is a possible solution, used by some professional game developers. I personally prefer to reach a balance between the two. In the 'real world', as some call it, the architecture of an area does not conform to a storyline, but the opposite is true. Although it would be acceptable to change an area to fit the story, I have discovered that this should not be overdone. You should not create an area simply to provide for the storyline, but must also take into account the various props which would have been present without the story, such as toilets, car parks, torture chambers etc. and make sure that they present the appearance of being constructed for efficiency and not the gameplay itself. For example, vents should not only be present to reach the current objective, but to ventelate the air. Other vents should exist, even if their only purpose is to provide air conditioning.

   It is also vital to draft the game mechanics for the game. This would include how the player would interact with the world, whether the game is an fps or a tps, point-and-click vs GUI interaction, etc. In some cases this might come as inspiration, instead of the story, though care should be taken as not to simply slap on a story onto the game. It would be advisable to develop these two concept parallel to each other, as it might be necessary to modify one in order to benefit the other. All games should be unique, or you might as well copy and paste another game. Certain games would deserve a sequel, naturally, even if there would be no drastic improvement in game mechanics, but at least reasonable improvement must be attempted.

   I also wish to note that all of these should be considered dynamic, and the development process never be limited to what is drafted on paper. If an idea comes up which appears better and would not conflict with the already created assets, then it should be investigated.

   It is often advised to develop a game prototype as soon as possible, which would help determine whether the game would be great or worthless before much time had been spent on developing it.

Monday, 27 June 2011

Step 2 : Decide on our software

The next thing which you should do is choose on the the software that you consider should be used for your game project. I will go through the optimal software choices here.

Modeling: One of the msot important steps, in my opinion, is modeling. Here are various programs which could be used to create models:

1.To create 3d models you might want to use "3ds Max", which I have found most effective when dealing with models and everything model-related (Texturing, UV Mapping etc.) You would be able to download the 3ds Max trial here: http://usa.autodesk.com/3ds-max/ and try it out for yourself. It supports hundreds of tools necessary (or even optional) for game development, and is used by professionals worldwide.

2.Blender is a free alternative if you do not have the money to spend on expensive software such as 3ds Max. I do not truly have much experience using blender, and I have heard that the learning curve is steep, but many people have created decent models using it and this seems to be a good reason to recommend it. But choose this only if you are unable to afford 3ds Max, as, from my knowledge, Blender is much more unstable and less sophisticated. You can download blender from here: http://www.blender.org/download/get-blender/

3.Zbrush is another program that can be used to create models, but especially high-poly "sculptures". Although learning it is also somewhat difficult and it requires actual skill, working with it is basically like working with clay if you take the time to learn how to use it. But if you were never able to do anything with clay, then you might not wish to try this, for it is not much different in my experience. You can download the Zbrush trial from here: http://www.pixologic.com/zbrush/trial/

    Alternatives to Zbrush are Sculpturis (Free) (http://www.pixologic.com/sculptris/) and Mudbox (Trial: http://usa.autodesk.com/adsk/servlet/pc/index?id=13565063&siteID=123112). But out of these, Zbrush is the most widely used.

4.Poser I would recommended as a character modeling program because it is able to provide high-quality character models with little effort on the developer's part. Although you do not have much control over what you are creating and reducing the polygon count might be a strain on some programs, if you do not wish to spend days on a character model then Poser is your optimal choice.

Of course you might decide buy something exotic such as Maya, but in my opinion it is more suitable for movie development and visual artist. As game development involves the careful manipulation of polygons, in my short experience Maya would not be the optimal choice.

Audio:
   Although I am not much of an audio artist, I am still able to recommend a few programs that would let you create music. Editing sound is not exactly difficult to do and can be done in many game engines as well, so I will not mention such types of software.

1. FL Studio 9 is the only program that I know of which can create proper music, but its vast selection of useless musical instruments makes it difficult to do so. It still can be manageable, but if you are unable to master it, then I would recommended having somebody else to do it (unless, of course, you do not wish to buy it.  A demo can be downloaded here: http://flstudio.image-line.com/documents/download.html

2. Record your own sounds, or use the internet. It is very difficult to create sounds using the computer, so my advise would be to buy a good microphone and record different sound effects for your game. Then perhaps edit them to achieve a science fiction or horror feel.

3. And my final recommendation on this topic is: musical instruments. Buy them, learn them, play them. Indeed, it took me personally 3 days to "learn" how to play the piano. Although after 6 months of practice I am still unable to beat Chopin it the field, learning how to play musical instruments greatly added to my musical skills and allowed me to compose my own personal music.

Texturing: Textures are also an important part in creating a game. You should be able to use all of the software under the "Modeling" section to texture, so I will only show you software that would convert your textures from simple images to seamless normal-mapped textures.

1.Seamless Texture Creator is useful to create seamless textures without wasting cash on Photoshop as well as gaining a little time. It may not be perfect, but I would consider it preferable than spending hours to remove the ugly seams on your models.

2.ShaderMap Pro is the program which I have always used when preparing my texture for my game in the past, as it can automatically create a Normal map, speculiar map and an ambition occlusion, map which might also be usable, with great accuracy and plausability. You simply feed it the flat 2D image and receive a 3D surface ready to export. A demo can be downloaded here: http://shadermap.com/downloads.php

3. Crazybump a good rival to ShaderMap Pro, which is able to provide quality normal maps of perhaps equal or better quality than ShaderMap. This is the tool which I currently use use for normal maps, and it feels to be more effective than ShaderMap Pro.

3. Paint.net is a program which allows you to manipulate textures in order to combine or enhance them. It is free, and much easier to use than Gimp (at least from my limited experience). I constantly use it in order to help texturing my models, and it never fails me in what I need to achieve, especially with the wide range of plugins available.


 
Game Engine: The final piece of software you will probably need. It basically combines all your assets together, allowing you to create levels, script them and play them. There are only three game engines which are worth mentioning in my opinion. They are:

1.UDK, also known as Unreal Engine 3, stands for Unreal Development Kit and is perhaps the most advanced game engine on the market. It has everything that you might need to create a game, but in my opinion it is difficult to change the gameplay much from what it was originally, as most of it is hard-coded into the script files. Unfortunately, there are also some difficulties and problems, such as the quality of real-time lighting and the difficulty in creating intractable meshes. It can be downloaded from here: http://www.udk.com/download

2.Unity offers a much more flexible interface with a greater ease to alter the gameplay, allowing you to disassemble every asset and script them using the easy-to-use C# or JavaScript. Although Unity does not feature any node-based editors such as UDK's Material Editor and Kismet, it still might be easier in the long-run as it does not require you to look through all of the code already present. Writing in JavaScript is much simpler than it seems, and can be done by mostly anyone who cares enough to attept to learn the language. The biggest disadvantage of Unity is that it does not offer as many features as UDK, making its graphics seem laughable in comparison. But If you are intending to create a small game, possibly to play in the browser, then this is he ultimate choice. It might not have as many features, but it is certainly much easier in Unity to implement new assets and script them as you desire. You can get Unity here (Free/Pro trial): http://unity3d.com/unity/download/

3.Cryengine 3 is a newly released engine which is a great alternative if UDK and Unity do not suit your needs. Now, I would go further and say that it is the superior of these engines, but that would only be my opinion. Packed with dynamic lighting, realtime development and a friendly interface (all of which are not present in UDK), it is a great engine to use in order to fulfil your gaming dreams. Any info, as well as the download page, can be found here: http://www.crydev.net/

There are many more game engines, such as the one present in Blender and Irrlicht, but they are no more than insects in comparison with the ones mentioned above.

Sunday, 26 June 2011

Step 3 : Start creating

Now, as you are ready to start creating your game, the most important step is to actually start doing something. It is doubtful that one person alone would have all the skills required to create a game, although this still remains a possibility, so I would suggest organising a small team together, as long as you are willing to contribute in it yourself, of course. Within my life, I have come across cases where fools came to game development forums to start a team, with their only intention being to manage it without contributing any of their own work. Here I will describe step-by-step how to create you game.


Note:

The steps outlined below explain how to create a game, but not how it should be creaed. It must also be realized that gameplay aspects are vital to create something worthwhile.

1.Creating static meshes
   First I would suggest that you would create all the static meshes necessary for your levels. Parallel development (which I belive is the terim) would greatly speed up the time if you have enthusiastic team members, and it could also help if you are unable to model certain kinds of meshes which the other person can. Static meshes are basically objects which make your game look better, but usually not actually serving any purpose, except perhaps to block the player's path. These include houses, pipes, rubbish, glassware, tables, chairs etc. These objects usually do not serve a game-related purpose and are simply there to make the scene look life-like. To create a static mesh you should first create the model (There are many tutorials on how to do that. It is too much to explain as it is different on different software. Popular methods include Poly-Modeling and Sculpting) and then get working with the UV map and texture. You might decided to use/create a proper texture or simply a basic material such as metal, but both can be used depending on the type of model you have. If you wish to simply apply one simple texture, then you should apply the texture to the mesh inside the modeling program (I am talking about 3ds max here, but it should apply to most other programs) before creating a UV map, which basically tells the program how to apply the texture. The latest version of Mudbox does not theoretically require an UV map, and although I would reccomend it for texturing certain objects, its auto-generated UV map can be inefficient at times.
   But if you want to create a professional individual texture, perhans to create something like THIS, then more work would have to be undertaken. I am not a professional at UV mapping, but what I do is add a UV map (usually a box), unwrap the UV map,  open it in the editor (You should see something like THIS) and render it to texture. You can then take the texture (Image) and if you are skilled enough you may be able to draw what you want the polygons to look like, perhaps using Photoshop. Then if you apply the edited image, you would have a completely textured model. This method, of course, can work in reverse, with you arranging the UV map in order to fit the texture. You might of course find software such as Mudbox (Especially 2012) more convenient to paint your objects, but that would be inefficient for some types of static meshes that require exact texturing.

2.Create the main character (Or weapon for FPS's) This might require programming, and differs for different game engines, but here I will explain the basics. To create a character, both main and NPC, you fist have to first prepare the model such as described in the Static Mesh section, but then you also need to create a skeleton to go with your character. The skeleton basically tells the engine (and your animation program) how to move the limbs in order to give them a realistic look. Without it, the computer would simply interpret your model to be a basic set of polygons. After this is completed, different animations should be created, such as walking, running, turning left etc. Perhaps the final step would involve programming the character, giving instructins such as: 'Play THIS animation of THAT bitton is pressed', or 'Ragdolize if health reaches 0' etc.

   But if you have decided to create a FPS, then the process is much easier. Unless the project features multiplayer or realistic mirrors, all that you need to do is create your weapon, animate it for different events, and script it into your game. You might also wish to create hands, which would require steps similar to creating the main character, although with much less work.

3. Now you have a world of static meshes and the player. Or at least should. NPC's are similar to create, as well as many other objects such as intractable meshes and the terrain (usually possible to create within an engine). The next steps would be to animate your world. Create animations for your character (or weapon), NPC's, different events, such as a plane crashing etc., animals, a door opening and so on... This might involve hundreds of animations, but is worth the time. AI (Artifficial Intelligence) is commonly used in games to simulate NPC's.

4. Integrate it all. Take all your sounds, animations, objects, textures, ideas and planning into the engine. This would take some time, but can begin from the time when you start creating your second model. As different engines require different processes to be completed, I will only write about the general steps required by most engines.

   When models are imported into the engine, the textures also need to be imported and made into materials. The materials (I will talk from the UDK perspective here) are basically a combination of your textures (Diffuse, Normal Spec etc...) . They can be adjusted to suit what you need, and end up usually much more than simple textures. These materials are applied onto the appropriate objects. Collision is applied/generated. Static meshes are ready to be used in your level, while other objects might require the animation to be applied or programmed, along with the sound. Wheb this difficult process is completed, you may use all of your objects in you game. These objects must be artistically placed into the level in order to create a realistic look and create a suiable atmosphere for the player, but keep in mind that this could begin after only a few models are created. The rest I believe to be obvious. The story is implemented, voice acting synchronized with the corresponding sequences, etc etc etc.......

   Lighting is very important for games, as it is one of the basis for realism, as well as post-processing, which adjusts the appearance of rendered frames. Particles, too, are commonly a vital aspect of games. Particles such as smoke, fire and explosions are commonly seen, and consist of numerous images on top of each other animated in a realistic way (o rof a single image transforming to your desire, such as sparks). Most engines have particle editors.

If you follow these steps, then your game should come at one time or another. Of course, this is a long process, and requires much time as well as poses many unexpected difficulties. But since this is only a blog post, I believe this information to be sufficient.

Saturday, 25 June 2011

Step 4 : Concentrate on the purpose of the game itself.

   Since all of the technical aspects of creating a video game are dealt with, the most important stage begins. Making sure that people like it. You could hire/ask some people to review your game by playing it, or even release a public early demo. As your knowledge grows as to what people hate or like about it, you should be able to improve the experience by changing the game in order to be more fun/horrifying. After all, a game is a failure if nobody likes it.

   Of course, this process also involves fixing glitches or other issues, but by that time you will have enough experience to be able to deal with them.

   Now, all you have to do after it is finished, is to publish it. My preferable scenario would be paying a few percents to a guy who does it for me. Yours might be different. It is your choice.

P.S. If you are interested, here is the latest video of the game which I am developing: http://www.youtube.com/watch?v=4Ixr02N_NO4 (or not the latest... Just check through my channel)