Let us take a moment to discuss what a game basically consists of. From a very
high level point of view, a game can be split up into two parts: game assets and
game logic.
Game assets include everything that is going to be used as a kind of working
material in your game, such as images, sound effects, background music,
and level data.
Game logic is responsible for keeping track of the current game state and to only
allow a defined set of state transitions. These states will change a lot over time due
to the events triggered either by the player or by the game logic itself. For example,
when a player presses a button, picks up an item, or an enemy hits the player, the
game logic will decide for the appropriate action to be taken. All this is better known
as game play. It constrains the ways of action in which a player can interact with the
game world, and also how the game world would react to the player's actions.
The very first step is to initialize the game, that is, loading assets into memory,
creating the initial state of the game world, and registering with a couple of
subsystems such as input handlers for keyboard, mouse and touch input,
audio for playback and recording, sensors, and network communication.
When everything is up and running, the game logic is ready to take over and will
loop for the rest of the time until the game ends and will then be terminated. This
kind of looping is also referred to as the game loop. Inside the game loop, the game
logic accumulates all (new) data it is interested in and updates the game world
model accordingly.
It is very important to consider the speed at which updates will occur in the game
world. Currently, the game would just run at the maximum speed of the available
hardware. In most cases this is not a desirable effect because it makes your game
dependent on the processing power and the complexity of the scene to be rendered,
which will vary from computer to computer. This implies that your game world
will also progress at different speeds on different computers with an almost always
negative impact on the game play.
The key to tackle this issue is to use delta times to calculate the fractional progress
of the game world. Now every update to the game world will occur in relation to
real time that has passed since the last frame was rendered. You will see how this
actually works with Libgdx in later examples.
What you have just read was an overview of the basic concept for creating games.
Yes, it is that simple! Frankly speaking, there is a lot more to learn before your
application becomes a real game. There are lots of topics and concepts waiting to
be discovered in this book. For instance, you will need to understand how to use
and manage different images in an efficient manner. Efficiency becomes even more
important if you plan to target mobile devices such as Android smartphones, where
available resources are constantly scarce.
Key to success lies in planning
Great! Now you have a basic understanding of what a game is and may need. It
appears to be a good idea to dedicate some additional time to think about your
first game project and create a plan for it. In general, planning your game projects
is what you should always do in the first place before any actual work is done. For
novice game developers it might be very tempting to skip this planning phase,
which admittedly is a lot more fun in the beginning, but this approach is very likely
to fall short in the long run. You will need some sort of outline of what you want to
achieve. It does not have to be a very long and detailed description.
A simple and brief feature list of your design goals will do just fine for this purpose.
The reason behind this is that you will make yourself aware of each single feature
that is part of your game. In addition, this list will also serve you as a great tool to
measure and compare your progress in the game during the development phase.
Please bear in mind that game development is a very dynamic and iterative process.
Although you should try to adhere to your list of design goals for most of the time,
there should always be room to adapt to shifting requirements. Just keep in mind
that adhering to the list will make sure that you are going to push development in
the right direction. Conversely, it will let you focus on the important parts first,
while also protecting you from running out of time and taking too many detours
that prevent you from reaching the finish line due to unclear goals.
high level point of view, a game can be split up into two parts: game assets and
game logic.
Game assets include everything that is going to be used as a kind of working
material in your game, such as images, sound effects, background music,
and level data.
Game logic is responsible for keeping track of the current game state and to only
allow a defined set of state transitions. These states will change a lot over time due
to the events triggered either by the player or by the game logic itself. For example,
when a player presses a button, picks up an item, or an enemy hits the player, the
game logic will decide for the appropriate action to be taken. All this is better known
as game play. It constrains the ways of action in which a player can interact with the
game world, and also how the game world would react to the player's actions.
The very first step is to initialize the game, that is, loading assets into memory,
creating the initial state of the game world, and registering with a couple of
subsystems such as input handlers for keyboard, mouse and touch input,
audio for playback and recording, sensors, and network communication.
When everything is up and running, the game logic is ready to take over and will
loop for the rest of the time until the game ends and will then be terminated. This
kind of looping is also referred to as the game loop. Inside the game loop, the game
logic accumulates all (new) data it is interested in and updates the game world
model accordingly.
It is very important to consider the speed at which updates will occur in the game
world. Currently, the game would just run at the maximum speed of the available
hardware. In most cases this is not a desirable effect because it makes your game
dependent on the processing power and the complexity of the scene to be rendered,
which will vary from computer to computer. This implies that your game world
will also progress at different speeds on different computers with an almost always
negative impact on the game play.
The key to tackle this issue is to use delta times to calculate the fractional progress
of the game world. Now every update to the game world will occur in relation to
real time that has passed since the last frame was rendered. You will see how this
actually works with Libgdx in later examples.
What you have just read was an overview of the basic concept for creating games.
Yes, it is that simple! Frankly speaking, there is a lot more to learn before your
application becomes a real game. There are lots of topics and concepts waiting to
be discovered in this book. For instance, you will need to understand how to use
and manage different images in an efficient manner. Efficiency becomes even more
important if you plan to target mobile devices such as Android smartphones, where
available resources are constantly scarce.
Key to success lies in planning
Great! Now you have a basic understanding of what a game is and may need. It
appears to be a good idea to dedicate some additional time to think about your
first game project and create a plan for it. In general, planning your game projects
is what you should always do in the first place before any actual work is done. For
novice game developers it might be very tempting to skip this planning phase,
which admittedly is a lot more fun in the beginning, but this approach is very likely
to fall short in the long run. You will need some sort of outline of what you want to
achieve. It does not have to be a very long and detailed description.
A simple and brief feature list of your design goals will do just fine for this purpose.
The reason behind this is that you will make yourself aware of each single feature
that is part of your game. In addition, this list will also serve you as a great tool to
measure and compare your progress in the game during the development phase.
Please bear in mind that game development is a very dynamic and iterative process.
Although you should try to adhere to your list of design goals for most of the time,
there should always be room to adapt to shifting requirements. Just keep in mind
that adhering to the list will make sure that you are going to push development in
the right direction. Conversely, it will let you focus on the important parts first,
while also protecting you from running out of time and taking too many detours
that prevent you from reaching the finish line due to unclear goals.
No comments:
Post a Comment