answersLogoWhite

0


Best Answer

It brings the general benefits of inheritance, which is that classes which are alike may share some features which are common for all of them.

example:

You are making a strategy game, and want to make lots of units to command and fight.

Class: Unit

has hitpoints, weapon strength, a name, etc..

Class: AirUnit

has all that Unit has, + a special flag that says that this unit can move trough places on the map with forest or ocean without penalty

Class: AttackHelicopter

has everything from Unit and AirUnit, + a flag that says the unit gets a bonus against enemy tank units, and does not require an airfield to land.

The benefits come from the fact that you can write one piece of code that can handle all types of units.

Your users can have a list of all their units

ArrayList army = new ArrayList();

task forces can be made as lists, build queues for bases can use the same technique, etc..

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What benefits does inheritance bring to game programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you need to do to become a game designer?

To become a game designer you need programming and game designing skills.


What has the author Ron Penton written?

Ron Penton has written: 'MUD Game Programming (Game Development)' 'Beginning C# game programming' -- subject(s): C# (Computer program language), Computer games, Programming


What is a good school for video game programming?

a card game


What is the easiest game programming language?

Scratch


What does '' I'll bring the game board you bring the ice'' mean?

It means that I will bring the game board and you will bring the ice.


How can one learn Java game programming?

There are various companies and websites that offer Java game programming software and how-to. Some of these companies that offer information are Game Dev and Zet Code.


What are the different career options in the computer programming field?

Usually when your computer programming, your developing software for a company. Depending on who and what is needed, is where your career will change. Video game programming is an example where you will develop software for a video game company.


Who gets the money in the westing game will?

Turtle Wexler wins the game and wins Sam Westing's inheritance


Westing game Why did chris refuse to sign his inheritance check?

Chris refused to sign his inheritance check because he suspected it was a trick by the Westing Game to manipulate or control him. He did not want to be a pawn in the game and decided to opt out by refusing the money.


Are there video game programming schools nearby?

I am unsure of what area you are in, but there are many video game programming schools located around the country. Hopefully, one will be located near you!


What does game programming require an in-depth knowledge of?

Definitely some or other programming language and maths skills. Other skills depend on what type of game you are making and if you are going in alone. A good and easy way to get started is with Game Maker (www.yoyogames.com), if you don't have any programming background or experience.


Is there a real programming language that resembles GML - the language in Game Maker?

GML IS a real programming language. But anyway, all programming languages are about the same, with different syntax.