starting a game

Started by
22 comments, last by GameDev.net 18 years, 9 months ago
I suck at programming, so don't blame me for anything I say here:

Do you understand the Game Loop concept? Basically, as I understand it, you have an infinite loop while(1) and then in the loop you have your game fuction routine thingies, like getInput(); setPositions(); draw();, and then those functions repeat themselves until getInput() calls a break or a return or something.
I would suggest you check out this site. They have some really good examples, and if you want to move on to graphics in the future, they have some good beginner Allegro tutorials.
Good luck to ye.
---There are 2 kinds of people: those who know hexadecimal, and those who don't.
Advertisement
I want to add my two cents to this. I'm still kinda a beginner, but I'm now developing a 3D game complete with networking and all those nifty features, a far cry from the first game I made, PACMAN in DOS!

I will guide you from an absolute beginner to an experienced beginner, if you choose to accept the mission.

First of all, get a basic understanding of functions, classes, ability to put classes and functions in seperate files (I just had problems with this, but was able to solve it!) Those are vital to games.

Then learn how to use breakpoints and debugging features, take a day or two to practice it. It's very helpful in locating those troublesome pointers or data or whatever's plaguing your game.

Now with basics of programming mastered (you don't need to master all of the language), you're ready for your first console game/application!

My teacher made me make a few business programs in DOS, they're simple, such as storing employees' info, or calculating leap years, etc. That helped in the beginning. You can do likewise.

Then after all those is done, you should be beginning to feel confident in your skills as a programmer. Remember this VERY important tip: You learn as you go. I still don't know how to program templates, namespaces, linked list (not too good at that one), etc. But when the need arises, I take the time to study those, then apply it in my program. That's one reason why many people here fail to make a game, they focus too much on learning and applying neat features in their engines, they fail to focus on the game. They should have focused on the game, THEN add features to engine as NEEDED.

So, with those advices in mind, make a simple PACMAN game, Tetris, Pong, whatever, in DOS. Learn how to position text on the screen so that you achieve a semi-graphic look with characters. This will help you when you step into the 2D programming field. Once you've finished a game like this, make a more complex game, but still in DOS. By now you should be a master of DOS game programming.

Then the next step is to learn how to program in Windows. I'm not talking about DirectX, OpenGl or anything. Just windows. Learn how to make a window box, how to manipulate the color of background, display text, etc. This will assist you greatly, as you will learn more about pointers and how to handle with APIs (DOS doesn't really have anything between you and the screen, you have direct control.) Maybe learn how to use Windows method to blit a picture to the window. If you want, you could make a simple game in this, before proceeding to DirectX or OpenGl world. You should be compentent at debugging and finding answers to your questions by then.

Now, the next step is to decide whether you want to use DirectX or OpenGl. I'm not going to discuss the differences, just pick one. It tend to happen when you learn one, you can learn another quickly, since both have similar methods and functions.

At this stage, you could try and clone a simple NES/SNES game like Zelda, Final Fantasy, etc. Or make a simple sidescroller like Mario Bros.

Once you've mastered the 2D part of game programming (including physics), you're ready to step into the 3D world.

I admit the game I'm working on is actually 3D in 2D, meaning there's 3D models, but all on 2D platform. I havn't started on FPS or 3D world yet. I'm not ready for that yet.

I hope this helped. I wish you the best of luck, I was once like you, and I can see a lot of potential in you. Go, do your best!
Zeraan, I have to disagree. I decided to learn Windows programming before I learned Allegro or SDL. So I get a book, sit down, open it up, and was totally confused. It's hell. Don't frustrate yourself needlessly yet. I would learn Allegro or SDL first, and take care of the Windows stuff later.
---There are 2 kinds of people: those who know hexadecimal, and those who don't.
Most of the windows stuff isn't necessary for game programming, and very useful things like multi-threading are often just a few pages at the end of a windows programming book. So I would recommend to skip the windows part and begin coding a game if you have experience with C. That way you can learn / will learn only the things you really need as a game programmer.

This topic is closed to new replies.

Advertisement