Game Development XNA

Game Development XNA framework

Introduction about game development with Microsoft XNA game studio

Microsoft® XNA™ is composed of industry-leading software, services, resources, and communities focused on enabling game developers to be successful on Microsoft gaming platforms. Microsoft provides advanced technology that allows professional developers to quickly enable games on platforms like Xbox 360 and Windows. Simultaneously it provides authoring, development, debugging, and profiling tools, while the libraries provide superior performance and an amazing depth of features.
Zatun has developed the “The Legend of Vraz”, a 2D action packed adventure arcade game for Windows PC. The legend of Vraz is the first 2D arcade game in India created with Microsoft XNA Game studio. It is also one of the earliest Microsoft XNA games developed in India and one of the first games in India from an Independent developer. It is also the first game ever made on Indian Miniature painting style.

Background Study

Before starting the actual game development the team prepared the game design document. Two teams were created which worked in parallel. One team worked on the graphics development which looked for the miniature art and the other team, game programming team, was searching for a particular platform and different game engines. During this period the team checked out other game engines but finally decided to work with XNA.

Game Development

One of the most important phase of the game development was finished; information gathering. After finalization of the platform we started looking on how we can utilize the XNA for the game development with its best. We started from the home page for the XNA and move forward from there looking at different samples and tried to figure out the best optimized solution for that. The learning curve for the XNA seemed to be very low as we had an expertise in C, C++ and C# as well as different graphics library such as Open GL and DirectX.

The following were the base requirements for us to develop a game.

  • Game Menus
  • A graphics library which would give us direct access to the hardware which is available with XNA.
  • A Game world designer, Map Editor, that would help us in faster production of different Levels and Worlds.
  • A Character Animation Editor, Character Editor, which would assist in the developing faster animations with better results.
  • Ease of development of physics that can be included in the game.
  • Ease of implementation of the artificial intelligence inside the game.
  • Applicability of the special effects. Game Menu

Game Menus

Now we are on board the ship of hardcore coding and have just started sailing. We are now ready with the GUI of the game-the menu of the game which handles the game parameters.

Game menu

We started building it from scratch by taking reference from book- Beginning XNA Programming, from Novice to Professional by Alexandre Lobao and others.

We made a general menu initially which gave us the idea about the functioning of menu. We took the approach of Game Components in which every screen was added to the game as a game component. Through this we acquired the knowledge about important features of XNA like Game Components and Game Services.
We also got to know about controlling Sound, display modes and keyboard controls. Dealing with File input/input and mouse was also a part of the learning process so now we were familiar with that also.

Then we began the main programming of our game specific menu but by following the reference as mentioned above we were facing memory issues as every menu screen was added as a game Component which consumed some space in memory and the code would get more and more complex as the number of menu screens would increase. So now we had to think of a very simple way to develop and handle menu because if menu itself would be so complex then mounting the whole game would lead severe memory issues.

We took the approach of a controller which controls the rendering and hiding of menu screen and passing controls to respective screen. The only game component added was the controller which when required to display a screen, would load its contents on run time and would display the screen. This reduced a lot of memory overload as only the visible contents were loaded in game and others are not. This also made our code very simple as in from only a single class – the class of the controller we could manage all the game screens.

Having a simple skeleton ready for the menu, adding the different functionality was not a major task as due to prior knowledge of the audio, display, mouse etc, it was just like fixing the spare parts of the motor engine in proper place. This reduced the development time and effort. Now we will move on to developing the first level of the game.

Map Editor

Map Editor is a utility that allows the faster development of the game levels or the game world. As we have stated in the Introduction section that the game will be a platformer, action and adventure game so obviously we lots of jump and multiple path for the wondering around. We have different layer depths for different images and tiles.

We have even allowed placeholders for different collectibles and the NPCs as well as for the enemies too. This map editor application allows us to draw the collision detection path where player can run on. Bounding boxes are helpful to assign the collision with different objects during the game. We can assign these boxes in the game too.

The NPC characters allow moving during the game into their patrolling area and also able to take appropriate action when the player comes into visibility area. It is more advantageous to assign them in the editor rather than into the game itself. So the Map editor allows us to do this on the fly just on the click on a mouse button.

Once we will finish with one point we can run the application and even check how this thing looks in the real game. Once we found any issues we can straight away go there and sort that issue very easily.

map editor level 4

level 4 2D arcade game

Here it shows different interactive objects which can be directly add into the map editor and then on the fly we can load them into the game.

Game AI (Artifical Intelligence)

Artificial Intelligence is one of the important factor that make the game looks like a real game and the gameplay looks very interactive, the game is engaging the player and make them think.

First of all the game characters should move on the path assign to them and do the patrolling. This means that the character should move on the platform and when they are on the platform they just stand still and play the appropriate animation.

In the other case we have to take appropriate decision when the player character comes in to the visibility of the NPC they have to take appropriate action such as changing the direction, attack the player or dodge if the player is attacking and some other like this. This is a part of the AI. But in this case we have different types of enemies and they have different physic so we can’t take a generic decision. In this case the langur baby can jump as it is light in weight where as the soldier can’t as he has heavy Armour on his body so we have take decision based on this kind of situations.

Even to make the game more realistic we have included different expressions like happy, sad, angry, die and so on. If the NPC can hit the payer twice then they will be happy and miss then sad or angry.

Game Particle System

Particle system is one of the important factor that give realistic look to the game. We have applied particle systems at few many places like in different interactive objects like fire flame, volcano and arrow fire.

For the particle system we have make the particle system manager by our self and use the different objects on them. This manager will take of updating the look and feel of each and particle by make sure that a particular particle requires update. This way we can optimize the thing effectively.

Summary

Game development is a dream of team Zatun. The experience with XNA is also good that we have deliver what we want. XNA is good development platform with lots of resources available on the internet with few dedicated site too.

Advertisement

PC Game Controls

What is a PC Game Control?

A game control is a plug-in device connected to games. It used to entertain the games using system and the control of device. Using pc control one can play character or object of game with the input given to the computer game. A controller usually connected to game console or computer with the way of wire or chord. Especially talking about the present time, one of the big alternate introduced on game control is wireless connection. Game control with wired are classified by keyboard control, mouse control, game pads, joysticks etc. some of the special purpose devices uses game controllers like steering wheels for driving games and light guns for shooting games. The main function of game controls is to direct the movement or action of a playable objects. Mouse and keyboard controller are the earlier and two most used pc game controls where there are number of games direct. One of the good examples of such pc game is ‘The Legend of Vraz’ creation of Zatun. The game can be played using the keyboard control and mouse control both or it can be played by using either of control. ‘The Legend of Vraz’ creation of Zatun is largely popular game played using the mouse and keyboard controls all over the world, especially it’s earned a big market value in India and got good positive response from the players. It’s quite flexible game to play and have lot of fun and enjoy by playing the game.

The type of controller used in a game depends on the kind of the game being played. There are several of controls used in games like, Gamepad, Paddle, Trackball, Joystick, Steering wheel, Touch screen, Keyboard, mouse and mouse pad etc. A gamepad is also known as a joy pad. It is the most common kind of game controller, held in both hands with thumbs and fingers used to apply the inputs. Touch screen is an input device allows user to interact with the computer by touching the display screen. Trackball is basically an upside-down mouse that is control with the palm of user’s hand. One of the advantages using trackball is, it has no need of desktop space. It is quick as user can easily roll the ball on it. Paddle is a controller that features a round wheel and one or more fire buttons. Joystick is a computer device consists of a handheld stick that can be twisted around either of two axes or twisted around a third axis.

The keyboard control and mouse control are classic input devices for a personal computer. Both are the main and crucial game controllers for computer games at present. The keyboard and mouse with the support of the mouse pad realize good speed, comfort and accuracy for the gamer. It’s most used and convenient controls of pc based game devices. Many video game consoles also have the ability to function with a keyboard and a mouse. The computer keyboard is replica after the typewriter keyboard and designed for the input of written text. A mouse is a handheld pointing device used in addition to the keyboard. For game players, the keyboard usually controls movement of the character while the mouse is used to control the game camera or used for aiming.

PC game controls for our game – The Legend of Vraz.

The game can be played with both keyboard and mouse or mouse only or keyboard only depending upon the user preferences.

Our PC Game Controls

Map Editor

Map editor

Hi,

We are ready with our XNA Tile Map Editor.  Rather we would call it a Map Editor. Because in this updated edition you can also have tiles along with free images. So, double bonanza in single price.

And if you ask us the problems we have face while development, we would say they too many to count.

There were issues while making tiles and saving them but free images were fairly easy. There were a few problems in mouse handling, so we had to provide a complete keyboard control to set layer depth, rotation ,etc. (Which you can’t see in video).

Another crazy problem which came up was , whenever you try to move  mouse to scroll window, coordination of mouse and images got messed up and they  would fix  their place anywhere in screen.

We have checked many videos on you tube and have gone through many tutorials and then came up with a detailed list of items to be added in the map editor. We have come up with our unique way of creating map editor which is useful for both Platformer games and RPG games.

Regards,

Zatun Team.