Most Helpful Customer Reviews
30 of 35 people found the following review helpful:
5.0 out of 5 stars
A note from the author, January 12, 2005
This review is from: Game Programming All in One (Paperback)
Please note: Amazon combined all of the reviews from the 1st and 2nd editions of this book when the 1st edition went out of print. These are essentially two totally different books. The first was a tutorial on C++ and DirectX. The second covers C and Allegro and game development. This book is the second edition to the bestselling Game Programming All In One. This new second edition is a complete rewrite of Game Programming All In One with a completely new direction, new goals, new assumptions, and new development tools. All In One 2E has done away with the C++ tutorials, Windows programming tutorials, and DirectX tutorials. In fact, this book does not cover Windows or DirectX at all. Instead this book focuses on game programming using a cross-platform game library called Allegro. This library is extremely powerful and versatile. Allegro opens up a world of possibilities that are ignored when focusing specifically on Windows and DirectX. A full quarter of the first edition was devoted to a C++ language primer, while another fourth of the book focused on Windows and DirectX basics. I decided that for this second edition we did not need to cover those subjects again, and thus this book uses the standard C language and the sample programs will compile on multiple platforms. The Windows version of Allegro uses DirectX, as a matter of fact, but it is completely abstracted and hidden inside the internals of the Allegro Game Library. What we are provided instead is a basic C program that includes the Allegro library and is capable of running in fullscreen DirectDraw mode using any supported resolution and color depth. Additionally, Allegro provides a uniform interface for sound effects, music, device input, which are implemented on the Windows platform with DirectSound, DirectMusic, and DirectInput. Specifically, Allegro supports DirectX 8. Imagine writing a high-speed arcade game using DirectX, and then being able to recompile that program (without changing a single line of code!) under Linux, Mac, Solaris, FreeBSD, Irix, and other operating systems? Allegro is a cross-platform game library that will double or triple the user base for your games with the help of this book. This book will teach you to write complete games that will run on just about any operating system. Specifically, we focus on three compilers: Visual C++, Dev-C++, and KDevelop, and the sample programs will be written using both Windows and Linux, with screenshots taken from both operating systems. You will have the opportunity to use your favorite development tool in all likelihood since Allegro supports several C compilers, including Borland C++, Borland C++Builder, Apple Development Tools 2002, and several other compilers on various platforms. The target audience are beginning to intermediate programmers who already have some experience with C or C++, or someone who wants to learn to develop with a C or C++ compiler, and will use this book as an entry-level guide. The material is not for someone new to programming, but just to game programming. I must assume the reader has already learned C or C++, because there is too much to cover in the game libraries, interfaces, and so on, to focus on the basic syntax of the actual language. It was difficult enough to support three different compilers and integrated development environments without also explaining every line of code. Intermediate-level experience is assumed, while extreme beginners will definitely struggle. This book is not extremely advanced--the source code is straightforward, with no difficult libraries to learn, per se, but I do not explain every detail. I do cover the entire function library built into Allegro, since that is the focus of this book, but do not explain any standard C functions. The goal is to get up and running as quickly as possible with some game code! In fact, you will be writing your first graphics programs in chapter 3, and your first game in chapter 4. You DO need a basic understanding of C or you will quickly get lost. Someone who has done some programming in Visual C++, CodeWarrior, Watcom C, Borland C++, GNU C++, or even Java or C# will understand the programs in this book. Those with little or no coding experience will benefit from a C primer before delving into these chapters. The emphasis of this book is on a cross-platform, open-source compiler, integrated development environment, and game library. The reader will not need to learn Windows or DirectX programming, and these subjects are not covered. The primary IDE is an open-source (freeware) program called Dev-C++, and is included on the CD-ROM. The game library is called Allegro; it is also freeware, open-source, and included on CD-ROM that accompanies this book. The reader has all the free tools needed to run the programs in the book. This book is highly accessible to all C programmers, regardless of their platform of choice. This book's source code and sample programs will run, without modification, on all of the following systems: Windows 9x/2k/ME/XP/2003, Apple MacOS X, Linux (any version), BeOS, QNX, Unix (Irix, Solaris, Darwin, FreeBSD), and believe it or not, these programs will also run under MS-DOS (DJGPP, Watcom C). So, that is just about every computer system out there. At the same time, the Windows version supports DirectX, so it is future-proof as well. The programs will run in fullscreen or windowed mode with full support for the latest video cards. As you can see from the table of contents below, this is a very 2D-oriented book, with many chapters devoted to sprite programming. There is no coverage of 3D--none. But these chapters are perhaps some of the best you will find on the subject of 2D sprite programming and background scrolling anywhere. Part I: Introduction To Cross-Platform Game Programming 1: Demystifying Game Development 2: Getting Started with Dev-C++ and Allegro 3: Basic 2D Graphics Programming with Allegro 4: Writing Your First Allegro Game 5: Programming The Keyboard, Mouse, and Joystick Part II: 2D Game Theory, Design, and Programming 6: Introduction To Game Design 7: Basic Bitmap Handling and Blitting 8: Basic Sprite Programming: Drawing Scaled, Flipped, Rotated, Pivoted, and Translucent Sprites 9: Advanced Sprite Programming: Compiled Sprites, Collision Detection, and Animation 10: Programming Tile-Based Backgrounds with Scrolling 11: Timers, Interrupt Handlers, and Multi-threading 12: Creating A Game World: Editing Tiles and Levels 13: Vertical Scrolling "Arcade Games" 14: Horizontal Scrolling "Platform Games" Part III: Taking It To The Next Level 15: Mastering The Audible Realm: Allegro's Sound Support 16: Using Data Files To Store Game Resources 17: Playing FLIC Movies 18: Introduction to Artificial Intelligence 19: The Mathematical Side of Games 21: Publishing Your Game Part IV: Appendices Appendix A: Chapter Quiz Answers Appendix B: Useful Tables Appendix C: Numbering Systems: Binary and Hexadecimal Appendix D: Recommended Books and Web Sites Appendix E: Configuring Allegro for Visual C++ and Other Compilers Appendix F: Compiling The Allegro Source Code Appendix G: Using the CD-ROM
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
7 of 7 people found the following review helpful:
5.0 out of 5 stars
Covers 2D programming with Allegro library, July 2, 2004
This review is from: Game Programming All in One (Paperback)
I admit I am excited about this book, which covers game programming with the open source, multi-platform allegro library. Much easier to use than Direct X, Allegro and this book get you up and going pretty quick. Topics include sprites, sound and AI for your games. The code examples are written in C (not C++), and a copy of Dev-C++ and Allegro come on the enclosed CD. My only complaint is no coverage of 1st person 3D topics, but as the author states, the reason is 3D engines and games built on that engine are difficult for a single programmer to create alone in a reasonable amount of time, if at all. The focus of the book is on a single developer creating quality 2D shareware and freeware games with good game play. Emphasis on incorporating other freely available tools and libraries to help an individual programmer or small team reduce the amount of coding and resources and to get the title completed is another theme, and he discusses the issues surrounding getting the game published in a small chapter at the end.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
8 of 9 people found the following review helpful:
4.0 out of 5 stars
Effective game development intro for any programmer, April 17, 2005
This review is from: Game Programming All in One (Paperback)
Game Programming All in One, by Jonathan Harbour. (This is NOT 3D Game Programming All in One, which is a Torque tutorial.) It uses C to program the Allegro game library (a multi-platform library). Even a VB.Net programmer will find the C language easily understandable in its listings. It comes with a CD that contains the Dev-C++ C compiler (much easier to use than Visual C++), the open-source Allegro game engine, the MappyAL game map designer, and a load of royalty-free sprites. The book explores horizontal and vertical scrollers, animated sprites, collision detection and gravity effects, as well as sound functions. As far as learning C, a programmer of just about any language will find that a non-issue with this book. At most, you might need to refer to Sams Teach Yourself C++ in 10 Minutes, to clarify some of the funny C symbology, such as myobject->length Since Allegro is open source, its comprehensive documentation is somewhat disorganized (~120 pages with no TOC or index), and is mainly useful for looking up some particular syntax. The Harbour book, on the other hand, is well organized, and covers all of the essential aspects (except 3D) in a systematic way, with admirably clear demo code (most of which is presented in the context of a functional game). Allegro does 3D as well as 2D, but that is beyond the scope of the book. After reading the book, you would have to dig the 3D functions out of the Allegro documentation, or go on-line to the numerous Allegro user sites for tutorials. The book provides a number of URLs for these sites. Now about Allegro. It supports the following operating systems (and more): Mac OS X, Windows, MS-DOS, IRIX, Linux, Darwin, FreeBSD, BeOS and QNX. It does 2D and 3D functions, and for Windows compilers generates specific calls to DirectX 8. Some specifics: Raster operations - lines, geometric shapes, Beziers, etc. Filling 2D Sprites - masks, run-length encoding, compiled sprites, translucency, lighting Bitmaps - blitting, rotation, scaling, clipping 3D Polygons - wireframe, flat-shaded, gouraud-shaded, texture-mapped, z-buffered Scrolling - double or triple-buffered, hardware-scrolling Animation - flip-book animated bitmaps, FLI/FLC playback Windows Drivers - Direct X windowed and full-screen, GDI device contexts DOS Drivers - Bunches of drivers for DOS as well as for all supported OSs Sound: Wavetable MIDI - volume, pitch, pan, blend, drum mappings Digital Sound - 64 channels, forward, reverse, pitch, pan Windows & DOS Drivers - WaveOut Direct Sound, Windows Sound System, AdLib, SB, SBPro, SB16, AWE32, MPU-401, ESS Audio drive, Ensoniq Other Features: Device Input - mouse, keyboard, joystick Timers - Hi-res timers, interrupts, vertical-retrace Compression - read/write LZSS compression files Data Files - Multi-object data files, encryption, compression Math Functions - Fixed Point arithmetic, trigonometric lookup tables 3D Functions - vector, matrix, quaternion manipulation Text Output - Proportional fonts, UTF-8, UTF-16, Unicode Oh! Did I mention that Allegro is free and royalty-free? It doesn't have a physics engine, but since gravity and momentum are easy computations, and collision can be easily handled with bounding spheres and boxes, I think Allegro is an amazing bargain. But I don't think I would have the patience to learn it from scratch by using just its own documentation. The MappyAL map editor, which also comes with the book, allows you to import a set of tile bitmaps as a source pallet of tiles and draw them onto a map of just about any size, in up to 5 layers. Each drawn tile can hold up to 7 embedded data values, and can be toggled for collision. Among the many output options is a CSV list of the entire map containing the tile indexes. MappyAL is also free and royalty-free. When referenced into an Allegro-based C program, MappyAL is tightly integrated, automating many of its features. FOR TEACHING A CLASS? Since this is a Thomson/Course Technology book, college instructors may wonder if it is suitable for teaching a class on game programming. It certainly is. (Appropriate prerequisites would be either a semester of C or C++, or two semesters of VB.Net.) This would allow each student to build several complete games for his or her portfolio during the span of a single semester. Attempting to include meaningful 3D game development in this first semester course would up the ante of prerequisites to an unacceptable level. Make 3D a second semester of game development. Also for would-be instructors, all the required software comes FREE with the book. One down-side for an instructor is that there is little course support accompanying this book. Yes, there are end-of-chapter questions, but they are not particularly exam material. There is no syllabus, no teaching notes, and no PowerPoint slides. As a teacher, I just say, "so what." Standard course support is probably meaningless for this particular subject area. BIGGEST COMPLAINT: Getting the Allegro libraries properly installed and compiled, so you can begin the book, is quite troublesome. Unfortunately, the comfortable narrative style of the main body of the text is continued in the two appendixes that explain the excruciating process of setting up Allegro. A numbered, step-by-step list would remove much of the present ambiguity in the instructions. Contributing to the confusion is the merging of steps among the several compilers explicitly supported: "It's exactly the same, except for these differences." Boo! Present separate, step-by-step lists in the next edition. CONCLUSION: This is a great book for new game developers. The writing is lucid, and should be easily understandable to a programmer with moderate experience in just about any language. VB guys, have no fear. College instructors will have as much fun as their students. Since the Allegro game library also includes support for 3D game development, none of the material learned here will go to waste.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
|