A game engine for Windows games is that it allows you to hide the messy details of Windows-specific code that doesn't necessarily have anything to do with a game.
In case you're wondering, there's nothing magical or mysterious about a game engine. A game engine represents an organization of the code for a game so that general application tasks are separated from game-specific tasks. The benefit to the game developer is that you can add features to a game engine that you will be able to reuse in all of your future games. Additionally, using a game engine allows you to simplify the code for your games and focus your attention on the game code that matters most. Once you get accustomed to using a game engine, you'll wonder how games could be created any other way. In reality, most commercial game developers do have their own custom game engines that they've developed over years of learning what common features most games require. Your own game engine will likely improve and expand upon the game engine in this book as you design and develop more demanding games.
It is the responsibility of a game engine to handle the chores of setting up a game, making sure that it runs properly, and then shutting it down. Although it is true that these tasks are required of any program, certain aspects of initializing, running, and cleaning up after games are truly unique to games. Therefore, it is important for a game engine to address the unique needs of games and help make the process of building games around the engine as simple and straightforward as possible. With a well-designed game engine, you'll find that creating a game requires a lot less code than if you had not relied on a game engine. The idea is to develop certain core game routines once, stick them in the game engine, and then never bother with them again unless absolutely necessary. For example, once you've written code to load an image and draw it on the screen, there is never a reason to rewrite the code again. Loading and drawing images is a basic feature required of all game engines.
Breaking a Game Down into Events
Every Windows program can be broken down into events, which are things that take place while a program is running, such as mouse clicks and window resizes. Just as Windows programs have events that they must handle, games have their own unique set of events that must be taken into consideration during development. The initialization process of a game can be considered an event, and its responsibilities are to load graphics and sounds for the game, clear the playing field, zero out the score, and so on. Similarly, user input carries over to games as well, meaning that mouse clicks and key presses are events that games certainly must concern themselves with. Additionally, keep in mind that, in Windows, it's possible for some games to be minimized or otherwise placed into the background, which means that you'll probably want to pause the game. This activation and reactivation process can be represented by a couple of events.
Although many other events could certainly factor into a game engine, the following are some of the core events applicable to just about any game:
*
Initialization
*
Start
*
End
*
Activation
*
Deactivation
*
Paint
*
Cycle
The initialization event occurs when a game is first launched and gives a game a chance to perform critical initial setup tasks, including creating the game engine itself. The start and end events correspond to the start and end of a game, and they provide good places to perform initialization and cleanup tasks associated with a specific game session. The activation and deactivation events come into play when a game is minimized or sent to the background and then later restored. The paint event is sent when a game needs to draw itself and is similar to the Windows WM_PAINT message. Finally, the cycle event enables a game to perform a single game cycle, which is very important, as you learn next.
Establishing the Timing for Games
If you've never taken a look at a game from a programming perspective, it might surprise you to learn how all the movement and the animation in a game are orchestrated. You will learn all the details of animated graphics in Chapter 9, "Making Things Move with Sprite Animation," but for now, I want to touch on the importance of game timing as it applies to animation and other facets of games. Every game, except extremely simple card games, relies on some sort of timing mechanism to enable the game to break down its execution into frames or cycles. A cycle of a game is one slice of time, which usually corresponds to a snapshot of the game's graphics and data. If you think of a game as a movie playing on a VCR or DVD player, pressing Pause allows you to view a single cycle. Stepping forward one frame in the video is like moving to the next cycle of the game. In any given cycle, a game takes care of updating its graphics, as well as performing any other calculations and processing related to how characters and objects are moving and interacting with each other.
A good way to get a grasp on the importance of game cycles is to take a practical game as an example. The classic Space Invaders game was mentioned in the opener of this chapter, so let's use it as an example to demonstrate game cycles. When Space Invaders first starts, the ship is created, along with several rows of alien invaders. Each of these objects has an initial position and velocity. If Space Invaders had no timing or game cycles, the game would be forever frozen in its initial state, as if you had pressed a permanent Pause button when the game started. We know that this isn't the case, however, because the game starts out with the aliens slowly moving across the screen. If you were to view Space Invaders a cycle at a time, you would notice that, in each cycle, the aliens are only moved slightly. This is because there happen to be quite a few cycles taking place in a given period of time, which gives the effect of smooth motion.
The more cycles a game can run through in a given amount of time, the smoother the game appears to run. As an extreme example, compare the "smoothness" of a slideshow to a motion picture. The slideshow abruptly moves from one still image to another with no transition or sense of smooth movement, whereas a motion picture shows fluid motion as if you were experiencing it in real-time. Similarly, a game with only a few cycles per second will appear choppy, whereas a higher number of cycles per second will result in a much smoother game. A larger number of cycles per second also gives you more flexibility in speeding up or slowing down a game to arrive at a perfect speed.
Knowing that more cycles result in smoother graphics and better flexibility, you might think that you could crank up the cycles per second really high. As with most things in life, there is a trade-off when it comes to game cycles and game efficiency. The problem lies in the fact that the amount of processing taking place in a game in each cycle is often considerable, which means that to perform numerous cycles per second, your computer's processor and graphics card have to be able to keep up. Even with the blazingly fast computers prevalent these days, there are practical limitations as to how fast most computers can perform game processing. In reality, most games will fall in the range of 15 to 20 cycles per second, with a maximum speed surpassing that of a motion picture at 30 cycles per second. Except for some rare situations, the minimum speed you should shoot for is 12 cycles per second.
Now that you understand how the timing of a game is expressed in terms of cycles, you can probably see why a cycle is a type of game event. It works like this: When a game first starts, you initialize the game engine with the game speed in cycles per second. Let's say that you go with 12 cycles per second. The game engine is then responsible for setting up and managing a timer that fires a cycle event 12 times each second. The game code receives these cycle messages and handles them by updating the objects in the game and redrawing the game screen. You can think of a cycle event as a snooze alarm that keeps going off over and over; except in this case, it's going off 12 times a second. Your game clearly isn't getting much sleep!
All drawings and text within this book are the property of their respective copyholders and should not be reproduced
The big idea is to start with a “form.” Then develop other “forms” on it. Build your final lines in by selecting, eliminating the lines you do not use. I leave mine in to show how it’s done.
Draw a circle. Attach two smaller circles, not far apart, anywhere. You can put a third above and between them. Then draw the middle line so it passes between the two small circles. Proceed as usual.
Posted by virtualinfocom 9:55 PM
Category:
1. Make a time table and apply it in your daily life. In your time schedule give some extra time to hard subjects.
2. You have to practice frequently. Note down all the important formulas in paper and hand on it somewhere in your study room. Learn these regularly and also test in written on a paper.
3. Don’t read continuously instead take some breaks. I am not taking a long break like one or half hour, just go for 10 minute break in your studies. It will keep your mind fresh and you will find interest in studying. Hence you will learn the question easily.
4. If you are getting bore and feel sleepy leave that subject and switch to mathematics, you can try music on and do your sum . It happens in a case when you are not able to solve a particular question or not able to learn questions in spite of frequent attempts. Such question makes a student sleep or bore. Discuss the same question with your friends in class or coaching center, try to find out the solution with the help of your teacher or friend.
5. Written practice is must, take a watch in front of you and try to complete the answer within the time .
6. Leaning in the morning time is good. As well in the afternoon try put your mind into subjects like Life Science and Geography.
All the best for your exams. www.virtualinfocom.com
Posted by virtualinfocom 7:14 AM
Category:

1. Money (need access to capital to fund your business)
2. Skill and Knowledge (It is important to be honest about
your own limitations and seek out expert advice and the
support of good mentors when needed.)
3. Feedback (to find other sources of feedback
beyond the latest sales figures)
4. Time (building a successful business requires
a large investment of your time)
some of the rewards of being an entrepreneur:
1.Money (your earning potential is only limited by your own brains and motivation)
2.Create opportunities (you can build opportunities and working conditions )
3.Sense of PRIDE (you have done something for the Country )
4.Time (freedom with your schedule)

Entrepreneurs yet to tap social networking fully’
Sukanto Mukherjee
‘TREAT your start-up as your own baby and nurture it’ – these were some of the insights shared by city-based entrepreneurs at a panel discussion on ‘Start Ups In Today’s Economy – Employment & Growth Factor’ at the Icfai Business School (IBS). The talk was part of Voyage 2010 — organised by IBS under the aegis of Entrepreneurship Week, India (February 6-13) initiative of National Entrepreneurship Network (NEN). Addressing an eager batch of B-school students and aspiring entrepreneurs were Arijit Bhattacharyya, CEO & founder of Virtual Infocom, and Prabuddha Sankar Raychaudhuri, CEO of SEOguru — both city-based it start-ups.
Besides having a viable business plan and customised marketing strategies, both Mr Bhattacharyya and Mr Raychaudhuri stressed on the power of social networking as a business tool.
“In an era when communication happens with a single mouse click, social networking sites like Twitter and Facebook are of immense help to start-up entrepreneurs, especially if they want to reach out to the global markets,” said Mr Bhattacharyya.
On the other hand, ‘the potential of social networking is yet to be tapped fully by entrepreneurs in India’, felt Mr Raychaudhuri. But, as clichéd as it may sound, passion is of utmost importance when starting a business, felt both the entrepreneurs.
“One should be prepared to make long-term sacrifices if he or she wants the business to take off, which is possible only if one has loads of passion and does not run after the money from day one,” Mr Raychaudhuri said.
Adding an anecdote from his personal life, Mr Bhattacharyya said: “I dreamt of being a game developer when I was in school.” Considering that Infosys was started by NR Narayana Murthy and his friends with small capital but big dreams and that it took 13 years to reach where it is today, the role of passion for an entrepreneur has been underscored time and again.
Both the speakers also highlighted the fact that recession is actually a good time to start a business. The downturn can be used to scale up, they remarked. “There is access to capital like skilled manpower at 50-60% lesser cost than in normal situations,” said Mr Raychaudhuri.
At the same time, during the initial stages of a business, the entrepreneur must market the product himself, as he or she cannot afford to hire top-notch managers. Also, there should be sufficient bank balance for at least three-six months to take care of family needs, considering the risks involved, felt both the speakers.
At the same time, ‘money is not the main constraint in an IT business’, said Mr Bhattacharyya. On the trend of Indian IT companies selling more services rather than their own products, Mr Raychaudhuri said: “Whereas a product takes at least $50,000 and 18-24 months to develop, a service can be enabled much faster and at cheaper rates. But, selling a service is much tougher, especially when one has to compete with global giants.”
Hence, an IT entrepreneur must keep all marketing options open, he concluded.
Consider this: American legends Walt Disney and Bill Gates launched two of the country's most successful businesses to date during "down" economies, and 16 of the 30 blue-chip companies that comprise the Dow Jones Industrial Average were started during such times. So, even if the economy is at the bottom of a down cycle, is that so bad for startups?
Not necessarily. Forward thinking entrepreneurs are able to capitalize on uncertain economic landscapes, or even on "down" markets, for a handful of reasons. First, in an uncertain economy, individuals and businesses begin to migrate from those expensive, faceless brands dominating the upper stratospheres of the business world to those businesses--often startups--that are able to offer personalized service with upper management oversight at more cost effective rates. This paradigm shift begins to create additional new business opportunities
for startups, especially for those that possess an intimate understanding of a particular industry.
It is highly unfortunate when skilled workers, such as those from the former leading financial services firm Bear Steams, are left jobless due to economic conditions.
But, while this news rings poorly for the individual and the overall economy, these layoffs (typically from large corporations) mass to form a large pool of qualified workers now available to the startup business owner. Also, it is often during these times that former Big Business
executives may choose to parlay their years of corporate experience into their own entrepreneurial endeavors, flushing the market with new creativity and business ideas.
When companies face tighter budgetary constraints, they tend to outsource jobs and projects with more frequency, creating tremendous new business opportunities for startups.
One of the most important and costly expenditures for a business is real estate; so, when rapidly expanding businesses like Starbucks begin to scale back operations, or companies like Linens 'n Things go out of business completely, startups benefit. The influx of retail and office space to the market creates reduced rents and more valuable concessions from landlords who need to remain flexible in order to fill empty space. As vacancies rise, rental rates typically fall, and this is good news for startups that may have been priced out of some real estate markets.
According to The Index of Small Business Optimism, measured monthly by the National Federation of Independent Business (NFIB), small businesses remained cautiously optimistic in early 2001 when economists were predicting a worsening economy. That's because savvy entrepreneurs knew then what they know now: there are opportunities in an uncertain economy to create the foundation for a largely successful business. And this is good news for the economy, too, which often relies on startup businesses for growth and jobs. In fact, according to The Small Business Administration, small businesses created more than 11 million jobs in the United States between 1992 and 1996.
So, while our economic outlook remains uncertain, I believe today's entrepreneurs should consider jumping into the marketplace. Companies like Hewlett Packard, founded in the midst of the Great Depression, have done exceptionally by remembering that economies, after all, are cyclical.










