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

2D Arcade Game

Our game “The Legend of Vraz” which is a 2D arcade adventure game based in Indian miniature painting style has been generating a lot of curiosity and we have receiving some rave feedback and reviews.

We are finally in Beta and we have made a lot of changes to the game play, AI and animations and have integrated the background music and sound effects. The prince can be controlled both with the mouse and keyboard or mouse only and keyboard only depending upon your comfort.

Take a look at our latest in-game footage from the Jungle Level and the Palace level.

Level 1 – Jungle Level

Level 3- Palace Level

A two dimensional arcade game has been so popular from a long back and grown up lot from quite early to now. There are number of developers who always looking for the two dimensional games to get innovative look to the games. Two dimensional arcade games have a wide variety of development where people love and enjoying more to play games. Many graphical user interfaces, including Mac OS, Microsoft Windows, or the X Window System, are primarily based on two dimensional graphical concepts. Two dimensional graphics are very important in the control devices like printers, sheet cutting machines, etc. It’s also used in most of earlier video and computer games. Two dimensional graphics still used for card and board games also. Typical two dimensional arcade games are especially talking about the action games which consist of a background and various animated characters. Two dimensional pc based graphics is pc based creation of digital images, mostly from two dimensional models like, two dimensional geometric models, text or digital images etc.

Two dimensional arcade games are mainly used on applications which are originally designed and developed using traditional print and drawing. For example, technical drawing, advertising, typography, cartoon creating etc. one such two dimensional arcade game creation done by Zatun named ‘The legend of vraz’, which is a two dimensional arcade foundation in Indian market. Zatun, an independent video game developer released the first Indian two dimensional arcade game ‘The Legend of Vraz’; is a action game for Windows PC with full of fun and quite excitement. It is the first Indian two dimensional arcade game created with Microsoft XNA framework developed completely in-house by Zatun. It is playable by audiences of all ages. It is one of unique game earned big market value and so popular across the world. The game is integrated with the background music and sound effects. The prince can be controlled with both mouse as well as keyboard and it is also flexible to play with mouse only or keyboard only depending upon the user comfort. It has received a so positive response and has number of fans all over the world.

The two dimensional arcade games largely replace by raster-based devices in the last few decades. The PostScript language and the X Window System protocol were familiar for developments in the two dimensional games. The painting style generates a lot of interest to the people and attracts more to play and fun. It’s the reason two dimensional arcade games are receiving good and positive feedback from its users. It’s one of best combination of paint on different scenes using layers. Two dimensional arcade game have their own applications; a two dimensional images, which is not only a real world object representation but an independent object with added semantic value. The reason 2d arcade games are more preferred and popular; because it gives more direct control of an image than 3d computer games. A 2d arcade game have a smaller description of document compare to corresponding digital image based on two dimensional computer graphics techniques. Such documents and illustration are always stored as two dimensional graphics files. The representation of two dimensional arcade games is so flexible it provides various resolutions to match with different output devices.