Game Programming

Pages: 12
I'm in school right now, and I was just wondering, how do you design and program your game?

Include libraries, game engines(unless you wrote your own), preferences, code snippets, and samples... Basically a short paragraph... I'm just curious that's all. You could even post snippets...

(I'm not asking for source code)
You program a game like you'd program anything. You're given a finite set of "problems" to solve (graphics, sound, input, logic) and then you write code that solves each of this problems.
I'm not looking for resources for me, I'm just asking how did you start ad finish(if you did) your game? If you aren't a game programmer, how would you do it?
I'm in the process of making my first 2D game. I'm trying to work it little by little, first I started getting used to the API I'm using (SFML) and worked at simple things like drawing sprites. After getting very basic movement I moved focus to the map scrolling (extremely easy with SFML) then changed to a tiled map. Then I focused on having my sprite interact with the map (stay on ground and land on platforms). The next step I'm planning to add an enemy and work on collision with it. I'm not saying this "method" is perfect or even good, in fact it is pretty "hacky", but considering a first anything is usually a learning experience I think it will work. But it is still a good idea to have at least a basic design/class layout before you start.
closed account (S6k9GNh0)
Just for reference, that OpenGL tutorial is generally bad since it's based off of OpenGL 2. At this point, it's probably better to jump straight into OpenGL 4 and move down if required.
I generally start my games by copy and pasting a pre-existing project that I have for making games, which has the code for setting up the window and resources, managing game logic, and detecting and enumerating collisions. After I make a few tweaks regarding how the base code works (which varies depending on the project, i.e. I might remove dependencies on matrix code if I'm not working in 3D), and then I start working on prototyping the aspects of the game that I expect to prove difficult.

The prototyping involves building up only the core required mechanics to develop and encapsulate the components that I develop. After those more difficult pieces have been worked out, I begin to work on the full game. The stages of this vary depending on whether or not I decide to bring in a level editor, but if all content is procedurally generated then the process is intensely simplified. Developing game mechanics after the core has been worked out is entirely a matter of how potent your base code is in allowing you to design game logic.

When it comes to "how did you start and finish," are you asking for a specs sheet regarding development (i.e. how collision detection and object processing worked), or are you looking for an overview of what stages go where?
Fredbill30 wrote:
I'm not looking for resources for me, I'm just asking how did you start ad finish(if you did) your game? If you aren't a game programmer, how would you do it?

Wait, you just posted a while ago about how good you are with programming. If you are good with it then you would know the answer to that question already. The process to make a application is the same for a game (come up with the idea, refine it to small workable pieces, start coding and working toward end product). Unfortunately, your question is too broad as most programmers that do game programming (myself included) have dabbled and made games and demos with multiple libraries and such, making the answer to that question pretty loaded. I mean I've made demos in Allegro, SDL, SFML, used Unity a little, played with scripting (Lua mostly), and I even dabble with drawing and writing on top of that.
BHXSpector, I know how I do it, but different programmers have different styles... I'm just curious, that's all. I only know how I do it.
Come up with an idea

Come up with a solution

Tweak this solution until it is completely efficient

Also, object oriented programming.
Dissimulation, don't give me general steps. I'm looking for a post more like naraku9333's...
i think your looking for a tutorial on gaming. there isnt really a good one out there. pretty much you sit down and say ok im going to start with story map village etc and decide how you want to do it. then you move on to the next part and say how am i going to do this and get it to work with what i had before

Dissimulation was giving you general steps because every programmer execute the steps differently. Like every book, professor, and programmer will tell you; "Pick your style and stick to it." No company will want a programmer that changes the style of how they do things from project to project. If you know how to make games, then don't worry about how other programmers do them, just code some to build experience and if you do something like a map editor, but think you did it bad, then you can see if there are better methods out there but always adapt them to your style.
Last edited on by closed account z6A9GNh0
do everything in one consistent style whether its ur own or someones ur working for
The easiest way for you to start would be SFML, youtube "SFML Coder" and find one of his videos about setting up SFML on VisualStudio/Code::Blocks, whichever IDE you use, then go read the tutorials on for version 2.0 and look at the examples in the SFML 2.0 RC you downloaded in the /examples folder, such as ping-pong, and see if you can recreate it.
I'd prefer SDL
Design, design, and design some more. I think the best way to create a game is to TOTALLY map out what everything will do and the structure of the code. Also, I usually don't even use a graphics library while I am starting out my projects. Initially I create the engine, figure out the physics or whatever (collisions, map storage/editor/format). After I have a good data storage system and have bare-bone classes in place, I shove the graphics in.

Also, I recommend using SFML, seeing as SDL is C based. Once you get a handle on SFML, you will see that it is much nicer to work with.
I support SFML, It is a really nice library with tools that fit my needs. However, I also have a very low standard for graphics when it comes to games. I realize that if I ever want to get into any kind of professional game design I will most likely need to learn directX.

I actually like working with C-based code a bit more. I prefer SDL.
Pages: 12