International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
433
Game Development using C++
Divya. S. N
Department of Computer Science and Engineering, Shirdi Sai Engineering College, Bangalore, India
Abstract— This paper is a literature survey on Game development using C++, which requires keyboard for input and all programming languages are mostly text oriented. The use of C++ in game development is being evaluated in this paper. Games’ quick evolution, demands great flexibility, code reusability and low maintenance costs. Games usually differentiate between versions, in respect of changes of the same type (additional animation, terrains etc).
Keywords— C++, Computer games, Object, OOP, Game development
I. INTRODUCTION
Computer games have been a preference to most of computer users. Nowadays, it does not only focus on computer that we normally use in our office or house, but handheld devices such as hand-phone and Personal Digital Assistant (PDA) have also been a target platform for users to play computer games. Computer games come in various types to suit different user‘s requirement such as role playing game, educational game, sport game and entertainment game. Researches reveal that the focal group in computer games is adolescents (Griffiths & Hunt, 1995; Subrahmanyam et al., 2001) [1]. The first generation of computer games were text adventures or interactive fiction, in which the player communicated with the computer by entering commands through a keyboard. By the late 1970s to early 1980s, games were developed and distributed through hobbyist groups and gaming magazines, such as Creative Computing and later Computer Gaming World. These publications provide game code that could be typed into a computer and played [24].
Games are the first advanced graphics techniques to demonstrate the quality of graphics they produce [12, 13]. It has been acknowledged [14] that game industry draws on research from academia, corporate R&D labs and in-house work by game developers. In 1952, A.S. Douglas wrote his PhD degree at the University of Cambridge on Human Computer interaction. Douglas created the first graphical computer game - a version of Tic Tac Toe. The game was programmed on a EDSAC vacuum-tube computer, which had a cathode ray tube display [11]. William Higinbotham created the first video game in 1958. His game, called "Tennis for Two", was created and played in Brookhaven National Laboratory. Spacewar is one of the first computer games.
In 1962 Stephen Russell constructed a computer game that was revolutionary for its time. Spacewar was the first game intended for computer use. Many developments in the history of the computer game are not technological but purely conceptual. Spacewar and Pong are games for more than one player. The time from approximately 1977 to 1993 is completely dominated by games for single players. Digital games are one of the most profitable industries in the world. According to the ESA (Entertainment Software Association) [17, 18], digital games (both computer and console games, along with the hardware required to play them) were responsible in 2004 for more than ten billion dollars in sales.
The earliest computer games were limited by memory constraints. This forced content, such as maps, to be generated algorithmically on the fly: there simply wasn't enough space to store a large amount of pre-made levels and artwork. In the mid-1980‘s, interactive fiction began to become gradually more graphical. In the early hybrid The Hobbit (Melbourne‘s house 1984), all interaction still is done by typing, and all game elements are described textually, but some locations are also represented graphically:
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
434 Among early players of text-based interactive fiction, a certain amount of nostalgia is directed to the old games and newer, graphical games are viewed with skepticism. The last purely text-based interactive fictions were published in the late 1980‘s, and with the arrival of the mouse, textual interaction was replaced by graphical interfaces. Games are our legacy for the future, and we must take pride in our history. The past shows us how far we had to go to get to where we are today, and it puts into perspective how far we still have to go: the past is the prologue to the future [13, 22]. Aligned with the creation of language-based tools, an emerging tendency is to make models first-class citizens for game development, in the same sense that source code already is an essential part of game development. Models can be described by visual Domain-Specific Languages (DSLs) [20], providing a richer medium for describing relationships between abstractions and giving them greater efficiency and power than source code.
II. OVERVIEW
By 1987 the IBM PC market was growing so rapidly that the computer had become the largest and most important platform for computer game companies. More than one third of games sold were for the PC, twice as much as those for the Apple II and even outselling those for the Commodore 64. With the EGA video card, an inexpensive PC clone was better for games than the Commodore 64 or Apple II.[25,26]
By 1989 Computer Gaming World reported that "the industry is moving toward heavy use of VGA graphics"[27] which gave the PC graphics. The use of computer mouse was driven partially by the success of adventure games and high resolution bitmap displays allowed the industry to include increasingly high-quality graphical interfaces in new releases. Further improvements were made possible with the introduction of FM synthesis sound. The rise of the Creative Labs Sound Blaster card, released in 1989, which featured much higher sound quality due to the inclusion of a PCM channel and digital signal processor, led AdLib to file for bankruptcy by 1992. Also in 1989, the FM Towns computer included built-in PCM sound, in addition to a CD-ROM drive and24-bit colour graphics.[28]
By 1990 MS-DOS comprised 65% of the computer-game market, with the Amiga at 10%; all other computers, including the Apple Macintosh, were below 10% and declining.[29] In the same time frame, games such as Myst took advantage of the new CD-ROM delivery format to include many more assets (sound, images, and video) for a richer game experience.
The faster graphics accelerators and improving CPU technology resulted in increasing levels of realism in computer games. PC gaming currently tends strongly toward improvements in 3D graphics.[30]
Gold commented that computer games development is different from other types of software development because computer games include far more artistic content than other types of software systems [36, 35]. A modern computer game may include hundreds of thousands, or even millions of lines of code [37]. Developing a modern computer game may involve a team of over 50 professionals ranging from computer programmers, designers and testers, to animators, artists and musicians [38].
III. LITERATURE SURVEY
Requirements For Game Development Using C++:
1. GUI-gives the visual appearance of the virtual file system to the end user. GUI color schemes, layout, working and behavior are quite similar to Windows Explorer. Graphics consist of any images that are displayed and any effects that are performed on them. This includes 3D objects, textures, 2D tiles, 2D full screen shots, Full Motion Video (FMV), statistics informational overlays and anything else that the player will see.
2. Turbo C++- was a C++ compiler and integrated development environment and computer language originally from Borland. C++ development has come a long way since Borland first introduced Turbo C++ in 1990. Over the years, Turbo C++ evolved into Borland C++ and then C++ Builder with new language and development environment innovations like visual development to greatly increase developer productivity [8].
3. A level editor-(also known as a map, campaign or scenario editor) is a software tool used to design levels, maps, campaigns, etc. and virtual worlds for a video game. An individual involved with the creation of game levels is a level designer or mapper. Level editors are used to create environments and other tools may be used to view assets before they are incorporated in the game. Images of the player's character were also hard-coded, being drawn, frame by frame, by source code commands. As soon as the more technologically advanced use of sprites became common.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
435 5. Interface-is anything that the player has to use or have direct contact with in order to play the game. The interface is not as straight forward as the above definitions and it goes beyond simply the mouse/ keyboard/ joystick, which is only the first contact the game has with the player. The interface includes graphics that the player must click on, menu systems that the player must navigate through and game control systems such as how to steer or control the pieces in the game. Half of a game‘s Artificial Intelligence is also related to interface.
Table 1:
Features and descriptionof certain tools used:
Feature Description
User Interface Information display screens containing textual and/or
graphical elements are supported.
Game flow Each game should have at least a main character, an introduction screen and a
game over screen.
Sound Background music can be associated with games or information display screen.
Input handling Keyboard only.
Artificial Intelligence Enemies can be set to chase the player within a room. More elaborated behaviors
can be created visually by combining predefined event triggers and event reactions.
Target Platform PCs running Microsoft
Windows 98 or higher
6. Flixel-supports Animations, Collisions, Movement, Tile-maps, Particle effects, Visual effects such as flickering, screen-shaking, blend-modes, alpha adjustments, etc., Simple physics (Box2D can also be used with Flixel), Keyboard and mouse access, Audio controls for volume and muting, Pausing gameplay, Site-locking, Pre-loading.
7. Gameplay-is a fuzzy term. It tells how fun the game is and the length of playability.
8. Story- The game‘s story includes any background before the game starts, all information the player gains during the game or when they win and any information they learn about characters in the game [16].
IV. C++ IN GAME LOGIC
During the 1990s C++ grew to become one of the most popular computer programming languages. Today C++ remains high on the Tiobe rankings. C++ is the most popular high-performance, object-oriented programming language in use today. The article, "Why C++?" by Kyle Wilson discusses why C++ is the best language for game programming. The feature of C++ that makes it so suitable for games is "platform availability" (selected by almost everyone, 86.8%), followed by the ability of directly manipulating raw memory via pointers, encapsulation in classes and the compile-time knowledge of type size (67%).
Although until now there is not much work found on C++ use in games, we believe that such a use can be proven very useful in this domain. This fact can be examined by investigating the source code of games for the existence of design patterns [2]. As a first approach, we will provide examples of how object-oriented design patterns [8, 3] could be used in simple games. In addition to that, we will present real games that could use these object-oriented design patterns and improve their design.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
436 OOP helps organize code by organizing it into what are known as objects. Objects hold information about state and behavior: States are the characteristics of the object, or the words you would use to describe it, and usually take the form of is or has descriptors. A computer is either on or off, a chair has four legs, and you have a name. Behaviors are the things the object can do, or the actions the object can perform, and are usually verbs that end in ―ing‖. You are sitting, using a computer, and reading this article.
The simplest method of achieving polymorphism is through the use of Interfaces. An Interface is like a job license: it lets the outside world know that you are capable of performing certain tasks. By using Object Oriented Programming, the internal working of an object is hidden from the rest of the program (Encapsulation) i.e. the details are hidden, it reduces the ability of other objects to directly modify an object's state and behavior.
V. SIGNIFICANCE OF C++IN GAME DEVELOPMENT:
The efficiency and power of C++ make it the best language choice for core game engine technology, where runtime efficiency is important and iteration time is not. For gameplay code, however, those requirements are reversed. The ability to iterate quickly on gameplay and get immediate feedback on design changes is paramount. But gameplay logic executes infrequently compared to physics or graphics routines, so highly-optimized native-code inner loops are less important. For rapid iteration, a simple language that compiles quickly or doesn't need to be compiled at all is used. Inorder to make changes and see their effect immediately in-game, restarting or reloading of the game is not required. C++ as nowadays it is the most common language that games are written in. There are still games being written solely in C and a smattering of assembler is used but the trend is very much to C++. This is mainly because games have got bigger and more complex. With C++ you can more easily manage and maintain huge amounts of code than with C.
Other languages like C# (C sharp), Java, Flash etc. have their place. Games written in these languages run slower than C++ games but the advantage (in theory) is rapid development. The problem with C# is that only the Xbox community games area supports C#. Java and Flash can be used for online games. All major game consoles use C++ only. Other devices like phones are becoming gaming platforms. The iPhone development is done using Objective C and for Android phones it is Android. Microsoft has released XNA which is a set of tools that allow to quickly program games for Windows and the Xbox 360 console. Programming is done in C#. Inorder to start a career in games C++ is required.
VI. GAME ARCHITECTURE
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
437 Concerning game mechanics, Bjork et al. (2002) introduced a set of design patterns which essentially are descriptions (employing a unified vocabulary) of reoccurring interaction schemes relevant to game‘s story and game play. As such, these patterns are not related to the software architecture [42] or code. The proposed patterns are collected from interviewing professional game programmers, from analyzing existing games and from transforming game mechanics. As mentioned, ‗‗The way to recognize patterns is playing games, thinking games, dreaming games, designing games and reading about games‘‘. An example of such a pattern is the Paper – Rock – Scissors pattern that is well known in game design community (also as triangularity).This pattern is used when there are three discrete states (or options for a player) and option A defeats option B, option B defeats option C and option C defeats option A.
Concerning game programming examples of object-oriented design patterns in two game modules will be presented in the succeeding paragraphs.
Designing The Game:
Game design is primarily an artistic process [10, 39], but it is also a technical process. There are certain technical steps that should be followed. They are: i) Determine initial Requirements, ii) Develop interface, iii) Develop Logic for Game play and iv) Develop Logic for Scoring points.
i) Determine Initial Requirements:
While writing a game program, after selecting the goal of game, we need to determine the initial requirements. It can be easily determined if we have already described the game. The general description is the most important part of the Game Design specification. When the coding is prepared for the game, general description is constantly inorder to know what still needs to be done.
ii) Develop interface:
The interface is the mode of communication between the player and the computer. It composes input and output. While developing the interface, the programmer should develop the static and dynamic screens. The static display is the screen which remains unaffected by the player‘s actions i.e., the input by the player. The dynamic display is the screen which is governed by the player‘s actions. The dynamic screens show what has changed since the earlier screen [41].
Examples of static display screens are Game selection screen (which describes the menu options), Game start screen (screen at the beginning of the game, start-up parameters, characters, intro music), and so on..
Examples of Dynamic display screens are Message screens (in response to the actions of the player i.e., if the player commits an illegal move/action, a message is displayed), End of Game Screen (which include messages [19] and responses to questions like what happens when
player loses/ wins the game? Where does the player go when the game is over?) and so on.
iii) Develop Logic for Game play
This step involves developing a proper logic for game play. The programmer must specify or program everything that includes response to the player‘s action, response to system events, rules of the game and if it is a two player game (if the computer is a player), then the computer‘s moves and actions. Sometimes in some games, some random situations/ processes/ numbers, etc are to be picked. To achieve this randomize( ) and rand( ) functions, stdlib.h header file is used. The randomize( ) function initializes the random number generator with a random value and rand( ) is used to generate random numbers e.g., to generate a random integer between the range 0-9, we may give:
(int) (rand( ) % 10)
iv) Develop Logic for keeping scores:
We need to decide about maximum number of chances allowed, the scoring mechanism, whether it is tied to timing or not, etc. Once in a while, the player needs to be rewarded or penalized for reaching that point in the game.
The following is a simple Game Design of a Game called Jumbled Word:
i. Ask the player to guess the correct word.
ii. If player does not enter the correct word then it shows that the word is incorrect.
iii. Initialize the maximum guess as five.
iv. If player needs hint , player should type hint &it will show the hint about the word.
v. After the guess, the score will be display.
vi. If the user want to continue press the letter y Otherwise any letter.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
438 An example of flowchart logic is below:-
PC gaming technology
Hardware:
Modern computer games have great demand on the computer's hardware, often requiring a fast central processing unit (CPU) to function properly. These processors allow the computer to simultaneously process multiple tasks allowing the use of more complex graphics, artificial intelligence and in-game physics. [30][31]
Similarly, 3D games make use of powerful graphics processing unit (GPU), which accelerates the process of drawing complex scenes. GPUs may [32] come packaged with a discrete graphics card with a supply of dedicated Video RAM, connected to the motherboard through either an AGP or PCI-Express port. It is also possible to use multiple GPUs in a single computer, using technologies such as NVidia's Scalable Link Interface and ATI's Cross Fire.
Sound cards are also available to provide improved audio in computer games. These cards provide improved 3D audio and provide audio enhancement that is generally not available with integrated alternatives, at the cost of marginally lower overall performance. [33]
All personal computers use a keyboard and mouse for user input. Other common gaming peripherals are a headset for faster communication in online games, joysticks for flight simulators, steering wheels for driving games and gamepads for console-style games.
Software:
Computer games also rely on softwares such as an operating system (OS), device drivers, libraries and more to run. Today, the vast majority of computer games are designed to run on the Microsoft Windows family of operating systems. Whereas earlier games written for MS-DOS would include code to communicate directly with hardware, today Application programming interfaces (APIs) provide an interface between the game and the OS, simplifying game design. Microsoft's DirectX is an API that is widely used by today's computer games to communicate with sound and graphics hardware. OpenGL is a cross-platform API for graphics rendering that is also used. The version of the graphics card's driver installed can often affect game performance and game play. In late 2013, AMD announced Mantle, a low-level API for certain models of AMD graphics cards, allowing for greater performance compared to software-level.
Multiplayer:
Local area network gaming:
Multiplayer gaming was limited to local area networks (LANs) due to their higher bandwidth and lower latency. LAN gaming requires two or more personal computers, a router and sufficient networking cables to connect every computer on the network. Additionally, each computer must have a network card in order to communicate with other computers on the network, and its own copy of the game in order to play.
Online games:
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
439 Types Of Online Games Played Most Often:
The below graph shows the various online games played by the gamers.
Evaluation
Evaluation 1:
To evaluate the benefits of object-oriented programming in game development, we have studied three existing games (Asteroids, Egg Catch and Pac-Man) [6, 2]. These games have been selected because their code is publicly available and multiple versions of them are released. The program evaluated has been developed using C++. The design patterns in the C++ program have been detected by manual inspection and employing reverse engineering tools.
First, let's imagine that we wanted to make the classic game Asteroids. To identify what the objects are in Asteroids, try describing it. The objective of Asteroids is to score as many points as possible by destroying asteroids and flying saucers. The player controls a triangular-shaped ship that can rotate left and right, fire shots straight forward, and thrust forward. As the ship moves, momentum is not conserved – the ship eventually comes to a stop again when not thrusting. Think about what in this description could stand alone or the things that are described that could have state and behavior. These become our objects.
The objects for Asteroids are: a ship, an asteroid, a flying saucer, and a bullet.The cool thing about objects is that we normally describe things in terms of objects in everyday talk, so they usually reveal themselves through a description.
Asteroids
Now that we have identified our objects, let's define the state and behavior for one of them: the player's ship. Think about what attributes describe the ship; these are its states. Then think about what the ship can do; these are its behaviors. A ship has states of: rotation, momentum and thrust and behaviors of turning, moving and firing.
The next game we'll use as an example is Pac-Man. The player controls Pac-Man through a maze, eating Pac-dots or pellets. Four enemies [ghosts] roam the maze, trying to catch Pac-Man. Near the corners of the maze are four larger, flashing dots known as power pellets that provide Pac-Man with the temporary ability to eat the enemies. The enemies turn deep blue, reverse direction and usually move more slowly. Pac Man is highly popular arcade computer game in which the player controls Pac Man via a maze, eating pellets.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
440 The original Pac-Man arcade game
For Pac-Man, there are three objects: Pac-Man, a ghost, and a Pac-dot. A power pellet isn't really its own object because it's a special Pac-dot (we'll talk about what to do about this in a later paragraph. we‘ll describe the ghost object because it's more interesting. The ghost has states of colour, name (+1 if you can name all the ghosts off the top of your head), state (eatable or not), direction and speed, and behaviors of moving and changing state. You are to implement the 4 ghosts in a way that replicates the behavior of the original game. All ghosts are controlled by a single controller object that inherits from Controller. To get started creating the Pac-man program, seven sprites are built. Start by creating a sprite named Pac-Man with only a single costume. Then create a sprite called Horizontal to be a horizontal bar and vertical which will be a vertical bar. The sprites will be used to build the maze for Pac-Man and should both be the same colour. Next we will create a sprite called Point Pill that Pac-Man will eat as he goes through the maze. We will then create a sprite called Ghost 1 with a single costume. This ghost will be Pac-Man's enemy and will be copied to make further ghosts later in the game. Lastly, we will create a sprite called Power Up in any colour that is different from the Point Pill sprite. When Pac-Man eats a Power Up, he will have the ability to eat the ghosts for about 10 seconds and score 100 points for every ghost he eats. Our last sprite will be called Game Over and will display a game over message on screen once three Pac-Man characters have been eaten by the ghosts and the game is finished.
There is a need to use polymorphism to control all the objects throughout the game. If the code is reused to build more games, one would probably end up with more polymorphism, due to the re-using of interfaces. But at this point, if it's the case that there are more methods in the implementations than in the interfaces, then the interfaces are serving a purpose--they're hiding implementation details from the clients, who are thereby forced to conform to the interface, enabling the polymorphism. We can use C++ inheritance to share functionality and interface.
Much of Pac-Man‘s design and mechanics revolve around the idea of the board being split into tiles. ―Tile‖ in this context refers to an 8 x 8 pixel square on the screen. Pac-Man‘s screen resolution is 224 x 288, so this gives us a total board size of 28 x 36 tiles, though most of these are not accessible to Pac-Man or the ghosts. As an example of the impact of tiles, a ghost is considered to have caught Pac-Man when it occupies the same tile as him.
Individual Ghost Personalities: ―This is the heart of the game. I wanted each ghostly enemy to have a specific character and its own particular movements, so they weren‘t all just chasing after Pac Man in single file, which would have been tiresome and flat.‖
In order to develop simple animation of characters in the game, flixels are used. Animation code (blocks) will be kept separate from functionality code (blocks) so that sprites can be reused with simple changes to the costumes and minor changes to some variables. This is how computer languages and scripts that are fully object oriented work.
The procedure is repeated for Egg Catch Game, which is a small game that is developed in C++ language. The egg randomly falls down and we have to catch it in basket, we have performed 2D scaling, rotation and transformation to make game more attractive.
The Logic Behind
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
441 Logic behind moving of eggs--every time thrower want to drop egg he put egg value in top of matrix, since every 100 msec the matrix is reviewed and screen is redrawn the egg can be shown on the screen, now for moving action each time top row is copied in its lower row and soon that and last row is discarded. This is the logic of moving multiple egg in screen.
Evaluation 2
This part of the paper shows how to go about game development for a simple game program known as ―High/ Low number guessing game‖.
General description of High/Low number game:
The computer picks a random integer from 0 to 100. We shall use the random( ) method to generate a random number. The computer asks the user for a guess. The user types a number. The computer checks that the number is from 0 to 100.
If the number is less than 0 or greater than 100, an error message will be displayed. If the user‘s number is less than or greater than the computer‘s number, then the computer prints a message saying that ―the number is too low‖ or ―the number is too high‖ respectively and asks for another guess. If the user‘s number is equal to the computer‘s number then the computer prints a message congratulating the user and the game will end. Note that the player will be given a maximum number of chances for guessing the number.
Now let us analyze different elements of the game design
i) Initial requirements:
In this game, a number is generated randomly. Thus we need to have a variable to hold the number to be generated. For this, we should declare a variable called number by using the statement:
int number;
Also, a number is to be guessed by the player. So we need one more variable to hold the guessed number. For this, another variable called guess is declared:
int guess;
Now to calculate total number of chances taken by the player, we require another variable chance:
int chances=0;
And to store the score, a variable called score is used:
int score=0;
Another variable called chanscore holds the score for one successful chance:
int chanscore=0;
The maximum number of chances allowed for a user is declared through the statement:
const int totchan =7;
ii) Developing Interface:
In order to interact with the user, many messages have been displayed, of course using cout statements. Examples of these messages are:
Welcome to the High/Low game
I will pick a random number from 0 to 100
You must try to guess the number
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
442 To tell the player whether the number is high, low or equal, messages are displayed and also to display the messages indicating the number of chances left for guessing.
iii) Developing the Logic for Game play:
The logic of this program generates a random number using randomize () and rand ( ) functions and lets the user enter his/her guessed number. Then the guessed number is compared with the computer‘s number. If the guessed number is not equal to the generated number, then the user is intimated about it. If the guessed number is equal to the generated number then the player is congratulated. All this is done using a do while loop (inner loop) that terminates if the user has guessed a correct number or total number of chances taken become equal to number of allowed chances. Further, an outer do while loop gives the user a chance to replay the game.
iv) Developing logic for keeping score:
Score is being calculated as per following specifications: chanscore= 100/totchan;
Here chanscore variable stores the score for 1 successful chance. The total score is calculated as:
score= chanscore*( totchan- chances);
More the number of chances left more will be the score. The total score is calculated as: number_of_chances_left*score_for_one_succesful_chance.
VII. FUTURE RESEARCH
Computer games acts as a tool or methodology in psychological research especially for behavioral change. Playing video games helps in the development of perceptual and cognitive abilities and motor skills. While playing video games, children acquire problem-solving skills, learn teamwork, and become more alert. It also helps improve their short-term memory. Playing video games requires them to make faster, accurate decisions, thus developing their decision-making skills [9].
Interactive video games compel a child to practice more and more in order to be the best. Playing, devising gaming strategies, and winning gives children a sense of achievement and boosts their confidence. A study conducted by the University of Rochester states that, "Gamers perform better in tests that involve focus, speed, multi-tasking, vision, and accuracy than others or non-gamers." So playing video games can teach your children [22] to concentrate, plan, and come up with different
strategies to reach the goal [5], perform multiple tasks at the same time and learn how to handle complex situations.
This virtual environment is the future of education as it offers an interactive way for students to learn and succeed in this competitive world. Include PC games during computer hours in schools, which help in increasing the concentration skills, logical thinking, visual learning and artistic skills. Also behavioral changes such as aggression, ADHD, and stress can also be reduced. Finally, a complete game engine, or a game, that uses all conclusions from the above research, is planned to be implemented.
As every coin has its two sides, even it has got advantages and its drawbacks. It also affects children behavior because they take those illusions to be real and become more aggressive while facing real situations [4]. So even parents get worried and pay great attention towards each and every activity of their children. Doctors even found it that it is harmful for the gamers because they get addicted to gaming and lead to eye strain, wrist, back pain etc. Obesity is also a big negative cause which occurs due to constant addiction to games. Last but not the least demerits are that it affects their education and separates them from their surroundings and they tend to live an isolated life which affect their brain as well. It is important as well because it helps the users to face their phobias in a controlled environment which helps them to recover their fear. It is also useful for those students who are having language and learning disability as it‘s a unique and interesting way of overcoming the same. An unique way of socializing while playing on computer and also online games .This is a great help for those who work in a 24*7 working environment for them it gets hard to revive their excitement for life but by diverting their interest to computer games can make their life go smooth as it releases their stress out.
To decrease the negative effects of gaming on children, when buying games for kids, parents should check the age limit mentioned on the cover by the Entertainment Software Rating Board (ESRB). They should also avoid buying games that have too much violence in them.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 4, Issue 10, October 2014)
443 An article by Dr Neil Gordon in 'Perspectives', the newsletter of the Independent Games Developers Association, highlights some of the ways the games can be applied as part of teaching Computer Science. The article describes about developing a serious game aimed at school children to promote the subject of computer. It also describes the use of beginning programming languages to school pupils [23]. Educational video games, handheld devices, and media production tools can allow young students to see how complex language and other symbol systems attach to the world.
VIII. CONCLUSION
Currently, computer game development is one of the fastest growing industries in the worldwide economy. The continuous development in the strategies and techniques of developing games in the current industry is because of making it more and more appealing for the users. Object-oriented programming is one way to organize code in a game.OOP focuses on objects that are defined by their state and their behavior. This paper aimed at evaluating the use of C++ concepts in game development. In order to achieve this goal we examined two open-source games. The results extracted by the two games were almost identical and indicate that patterns can be beneficial with respect to maintainability. The game version that includes the pattern under study has reduced complexity and coupling compared to a prior version without the pattern. Additionally, the application of patterns tends to increase the cohesion of the software. In contrast to that, the size of the projects has increased in the pattern version.
Consequently, due to the evolving nature of games we believe that the appropriate employment of design patterns should be encouraged in game programming.
REFERENCES
The heading of the References section must not be numbered. All reference items must be in 8 pt font. Please use Regular and Italic styles to distinguish different fields as shown in the References section. Number the reference items consecutively in square brackets (e.g. [1]).
[1] Bowman, M., Debray, S. K., and Peterson, L. L. 1993. Reasoning about naming systems. .
[2] Ding, W. and Marchionini, G. 1997 A Study on Video Browsing Strategies. Technical Report. University of Maryland at College Park.
[3] Fröhlich, B. and Plate, J. 2000. The cubic mouse: a new device for three-dimensional input. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems
[4] Tavel, P. 2007 Modeling and Simulation Design. AK Peters Ltd. [5] Sannella, M. J. 1994 Constraint Satisfaction and Debugging for
Interactive User Interfaces. Doctoral Thesis. UMI Order Number: UMI Order No. GAX95-09398., University of Washington. [6] Forman, G. 2003. An extensive empirical study of feature selection
metrics for text classification. J. Mach. Learn. Res. 3 (Mar. 2003), 1289-1305.
[7] Brown, L. D., Hua, H., and Gao, C. 2003. A widget framework for augmented interaction in SCAPE.
[8] Y.T. Yu, M.F. Lau, "A comparison of MC/DC, MUMCUT and several other coverage criteria for logical decisions", Journal of Systems and Software, 2005, in press.