Umjesto uvoda: Why 2D game development?
With so much emphasis on 3D games on most modern platforms, it can feel like the art of good 2D games is backsliding. I will admit that I myself am guilty of immediately thinking of Mario or Tetris whenever someone mentions 2D gaming. I have to take a moment to remember the vast array of recent successful 2D games. Off the top of my head: Angry Birds, Braid, Limbo, Marvel vs. Capcom series, Kirby’s Epic Yarn, and about a quadrillion (it’s a real word, I looked it up – may be an exaggeration) Nintendo DS, Flash, and Facebook games. Taking a moment to think of it, we can see that there are some really great games still being made as 2D. Good thing for us too, since 2D gaming is much easier to start with than 3D. For starters, the math in 2D development is much simpler than 3D and a lot of it is based on concepts learned in early Algebra. When you are new to game development and programming in general, the math can get a little overwhelming. It is good to keep it as simple as possible to start. Along the lines of simplicity, many of the general concepts you will learn in game development (collision detection, rendering, and coordinate systems just to name a few) are much easier to learn when you are only dealing with two dimensions. If your passion is 3D (and only 3D) development, don’t be put off by this series either. Many of the development and game concepts you will learn in 2D in this series are easily transferred to 3D. For instance, while the rendering and game logic can change, the general structure and order of a game loop remains the same. It is pretty easy to see that all around, 2D is the best place to start your game development journey.
The Allegro Game Library
In this series, we will be using something called the Allegro Game Library. In olden times, when you wanted to represent something graphically on a computer screen (like, say, a video game) you had to program all of the low level functionality yourself. This meant working directly with the operating system and video / audio / input drivers to make your game work correctly. A bunch of time was spent figuring out the operating system specific function calls and getting everything to work correctly. Porting from one OS to another was a complete nightmare. All in all, things were very difficult to maintain. Enter Allegro. At first I was going to describe Allegro, but the website (http://liballeg.org) does such a great job, I felt it was a shame not to use it:
“Allegro 4 and Allegro 5 are cross-platform, libraries mainly aimed at video game and multimedia programming. They handle common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.
According to the Oxford Companion to Music, Allegro is the Italian for «quick, lively, bright». It is also a recursive acronym which stands for «Allegro Low LEvel Game ROutines». Allegro was started by Shawn Hargreaves in the mid-90′s but has since received contributions from hundreds of people over the net.”
Essentially, Allegro handles all of that low level, operating system specific, ridiculousness so that you can go about doing what you want to be doing: making games. The super cool thing about Allegro? It works for just about any C++ compiler on the three major operating systems (Windows, most distributions of Linux, and iOS). This means you can work in any environment that you choose and porting your game to any and all operating systems is a breeze. The end result is that you get to worry about learning to make great games, and not about all that behind the scenes stuff.
What you need to succeed
While this series is aimed at true beginners, there are some requirements.
- A very basic knowledge of C++
Introductory C++ programming is outside of the scope of this text. That being said, I have been very careful not to include any topics that would not have been taught in any introductory C++ course (or that could not be easily learnable from a few internet tutorials). If you’re not sure if you have the required knowledge, see the side bar.
<Note: Topics that are generally used in this text are: variables, functions, structs, and arrays. If I hit upon any topics outside of this list, I will briefly describe it in a side bar (like this one) and give you information on where to go to learn more.>
Note: This introduction and the text above was taken from the following website which we are going to use in further tutorials and articles in our 2D game development. I use the text above instead of my intro to my 2D game development course. I have read it all and I think that it was good replacement for my intro and that's why I paste it here, of course with credits to his respected author and owner. Special thanks goes to Mike Geig which website is truly amazing place of resources for making very cool and interactive 2D games.
Article taken from:
Please see official YouTube channel to learn more: