So, a number of factors go in to writing sample code in books that arent a factor for day to day programming. What you do not do however, is make global loop counters!
I did not say I use Global Loop Counters, I said I use Global Variables as a Loop Counter. There is a difference. Apparently All of you brainiacs do not seem to think the others are capable of doing / and controlling something you can not.
I have been programming in various languages for 25+ years, albeit simple apllications not games, maybe there is a difference. But I never had a problem with my use of globals and the way I use them.
Look beyond your own experiences and realize that something can be done differently and effectively. Maybe I have an advantage, I code alone. so my usage of globals is well known be me.
Although the book uses C++ with Allegro. It does have a good amount of what you are looking for. Game Programming all in One.
I will say that each book I have read on the subject of Game Programming and Graphics, each takes a different approach. Variations use different languages, different Graphics Libraries and So on.
Other Books would be Game Coding Complete, DirectX through Visual Basic. < This one uses VB6, which I know is antiquated, I mention it only because of the ideas and if you are good at C++, then translating the code from VB6 to C++ should not be a problem since there are few variations.
I would also keep in mind, that these books give you only the basic ideas. To fully develop what you may have in mind is going to take you applying yourself and trying things you have learned and expanding the code / ideas in the book.
Years ago I purchased Game Programming for Teens in Visual Basic. < This also Deals with VB6 and DirectX. This Book Shows you how to build a Fantasy RPG. the RPG is very "Basic". No Magic Spells. No Searching for traps and So on. It does show how to make 2D maps and includes animated sprites to get you started.
Starting with small games and completing them is a very good motivater. Starting off, stay simple. Until you get used to how to make a game itself, stay away from graphics. Graphics is a whole new school of learning. I usually start off a new game ideas by building all of the functional code for the game and have all the output done in text. Then I add the graphics.
Here is a simple idea. Paper - Rock - Scissors. Very simple with some decisions to figure results.
I am currently doing the samething you are in exactly the same to areas. So this is what I am doing which seems to be helping me.
In C++ :> I am taking code that I wrote in another language and writing it in C++. I am taking Blocks of code that are related that I know work, and I am making them work in C++. Here I am focusing on text only at this point so I can focus on learning the C++ language and how it relates to my game code.
In Allegro > Here I am focusing on learning implementing the Allegro Library and Puting images on the screen. Next I will look at creating my Animations sequences in the 2D format. I am using images from the same game, so that I know they work. This allows me to focus on presenting these images and the animations, without slowing myself down by worrying about the gaming code.
Once I am comfortable with working with both seperately then and only then will I combine the 2 together. That is basically how I handle all my stuff. By focusing on 1 aspect at a time, then copy/paste everything together.
one of the first things that I will ask is to see the person's very first game and then ask the coder if he or she felt that they had completed it. For the first several games, I look at completion as being more important than skill since the coder was a beginner after all. I will be looking for evidence of mental toughness.
The ability to be able to follow through to the end some thing that was started, is a very important quality in a beginner in programming. After all, if you tend to quit because something is not going your way, or not the way you anticpated, you will always be a biginner.
my college teaches that even organizations have to end projects unsuccessful, making a Closeout document and learning from their mistakes if they are any good
Unfortunately the U.S. Government never attended your college. Maybe the President and Congress should apply for a Government Student Load and Attend your School. Enough on Polotics. I personally feel that any school that teaches that type of philosophy is also teaching a self-defeatist attitude. As a group, if a project has to be abandoned for whatever reason, it maynot be the project that has failed, but the team itself. Groups should be able to identify what is not working, (bad code or bad people) and make the proper changes.
My largest project took me some time. The initial code worked perfectly for the customer as it was designed to work. When asked a year later to expand on that project to extract different information from additional input that all worked with the original code, I hit a mental wall. I could not finish it. I did not quit. I brought in different help for a different perspective, which got the project done.
It was not the project, I knew that, it was the members on the project unable to wrap their head around how to complete what the customer wanted. Including me.
I agree with Spiro - Just start making games. Your Problem is that maybe what you are trying to make is way over your head at this point.
The next "ZOMBIE APPOCOLYPSE" is not a game you want to start off with.
My first Program was sort of a game. When American "FANTASY FOOTBALL" first became popular, my freinds and I bought a peice of software to track our fantasy league. The program was flawed and would crash at a certain point. I was studying programming, got determined 1 night, read the rules book, which contained everything the program was supposed to do, and wrote the program. Guess what ? It worked!!!! Just like it was designed to do. And our Gaming League pressed on.
Here is a hint > "You are most likely beyond the guess a number game". If you are into Sports, write a sports game. Do it text based. Make it WORK!!!!! Then get the Graphics part down. ( Study the Graphics, just do not concern yourself with them until you get the game coding down )
An American style Baseball game Text Based has surprisingly minimal game coding, with alot of statistics and data. Cricket is similar.
I have read over your post 3 times trying to descern what possibly is not being said. I do not think the question is "what Are You Doing Wrong" as much as it may be "Where Are You Going" Maybe you are not quite sure what your end goal is and wondering if you are using the wrong tools to get there.
You do not buy an airline ticket before you know where you are traveling.
Maybe you should redefine what your goal is with your game, then select your tools.
I personally have never used any of these game engine makes. I started to design my own games, simply because that I personally felt that alot of the single player games became to difficult beyond a certain level. I wanted to make sure that the Computer (AI) was playing me "HONESTLY", even though the program would have to know what I had as far as resources and I knew nothing of what it had.
So I set out to write my own "Game Engine" where the AI player was essentially was as blind to my resources as I was to it's. While seperate sections of code acted as a Game Administrator.
To recap. You are not doing it wrong, you just need to define what you are trying to do.
In alot of side scoller games I have seen, the graphics are from a side view. Have you considered making your Graphics from a "Bird's Eye View" ? Arial Conbat Games, where you fly a WWII type Aircraft - Attack Ground Targets or other AirCraft Show all of your objects from a Top-Down View and were essentially a "Side- Scroller", even though The Graphics Scrolled from the Top of the Screen to the Bottom.
Also a Split View Screen or Multiple View-Port Screen, could provide you with both views at the same time.
(This Section has been Edited. Apparently it contained bad advice although it was working for me So I have removed it ) All of the above mentioned are good as well. Focus on learning the language first. A good book to start can be found at the on-line bookstores. Learning C++ through Game Programming. This book aides in teaching C++ and some game mechanics. There are NO Graphics in this book though, its primary focus is on learning C++ and Games
I Thank each of you for your input. I found The Information referenced and was able to find several answers to my questions at these locations.
There was several items That I was looking for but was looking in the wrong catagories. Several post by others whom were searching for the same answers to the same questions I had, accelerated my search!
Your feedback and quick responses is the main reason I joined this Forum. Keep up the good work!!
I will do my best to give back as much, if not more, help to others.
Although, I am quite a bit older than a Teen, when I started to look at designing a game with graphics I tried to keep it as simple as possible, since I had no place to go a "Raise My Hand" to ask a question. So what I did was, I picked up 3 books that were easy to understand...
1 - " Game Programming for Teens"
2 - " Visual Basic Game Programming for Teens"
3 - "3D Game Programming for Teens"
Each book takes a different approach to the Game Programming world. 1 & 3 Use a Language called BLITZ which is available for free and contains it's Graphics Library. The Full Language Documentation is in the software which re-inforces the books.
1 & 2 is for 2D Graphics using Sprites and both provide FREE Spite sheets to use while learning.
2 Deals which Visual Basic and the DirectX Library and shows you how to implement them.
All 3 build Complete Games which you then can modify and build into your own Game. 1 & 3 do a Arcade style Game while 2 does a RPG with a single charactor.