C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
83
votes
22answers
12k views
STL for games, yea or nay?
Every programming language has its standard library of containers, algorithms, and other helpful stuff. With languages like C#, Java, and Python, it's practically inconceivable to use the language ...
64
votes
9answers
18k views
What are some programming design patterns that are useful in game development? [closed]
I have a few books on Design Patterns, and have read some articles, but cannot intuitively figure out which programming design patterns would be useful in game development.
For example, I have a book ...
49
votes
8answers
3k views
How can you put all images from a game to 1 file?
I've just finished a basic RPG game written in C++ SFML, I've put a lot of effort into the game and I'd want to distribute it, however I've ran into a small issue.
Problem is, I have well over 200 ...
44
votes
6answers
2k views
Is there a pedagogical game engine?
I'm looking for a book, website, or other resource that gives modern 3D game engines the same treatment as Operating Systems: Design and Implementation gave operating systems.
I have read Jason ...
43
votes
17answers
15k views
C++ low-level optimization tips
Assuming you already have the best-choice algorithm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet frame rate out of C++ code?
It goes without saying that ...
40
votes
9answers
25k views
Good GUI for OpenGL [closed]
I am starting to learn OpenGL with FreeGLUT using the Superbible and the knowledge i have from my elementary graphics to brush up on my skills.
To get more from this experience i want to integrate a ...
37
votes
10answers
7k views
Game State 'Stack'?
I was thinking about how to implement game states into my game. The main things I want for it are:
Semi-transparent top states-being able to see through a pause menu to the game behind
Something ...
36
votes
8answers
14k views
Is Java viable for serious game development?
Ever since I was a little kid, my dream has been to develop games. Well, now that I am older, more mature, and have some programming experience, I would like to start. However, I would like to turn ...
35
votes
9answers
7k views
C++: Smart pointers, Raw pointers, No Pointers?
Within the scope of developing games in C++, what are your preferred patterns in regard to use of pointers (be it none, raw, scoped, shared, or otherwise in between smart and dumb)?
You might ...
35
votes
9answers
13k views
Why don't C++ Game Developers use the boost library? [closed]
So if you spend any time viewing / answering questions over on Stack Overflow under the C++ tag, you will quickly notice that just about everybody uses the boost library; some would even say that if ...
34
votes
9answers
16k views
Easy to use cross-platform 3D engines for C++ game development? [closed]
I want to try my hand at writing a 3D game. However I don't want to start at such a low level of drawing individual triangles and writing my own 3D object loader and so on. I've heard of things like ...
34
votes
1answer
1k views
How do I create particles that react to the player and enemies?
I'm currently making a game with my own game engine which I've written in C++ and I'm using the most recent directx SDK.
The game is a top down space shooter (with a pretty interesting twist) and ...
34
votes
7answers
5k views
What are the performance difference between unsigned and signed integers?
I am aware of the performance hit when mixing signed ints with floats.
Is it any worse to mix unsigned ints with floats?
Is there any hit when mixing signed/unsigned without floats?
Do the ...
30
votes
6answers
2k views
Is it unprofessional to leave game resources to the open eye?
I'm still having problems packing my resources, after going through complicated APIs and basically just zip files which are exhausting my brain, I thought I could also pack the game with the resources ...
30
votes
8answers
2k views
How are deterministic games possible in the face of floating-point non-determinism?
To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag ...
29
votes
5answers
3k views
Any tips for creating cross-platform games?
Do you have any tips/recommendations when creating a cross-platform game in C/C++?
25
votes
2answers
6k views
Entity/Component Systems in C++, How do I discover types and construct components?
I'm working on an entity component system in C++ that I hope to follow the style of Artemis (http://piemaster.net/2011/07/entity-component-artemis/) in that components are mostly data bags and it's ...
25
votes
6answers
2k views
What's a way to implement a flexible buff/debuff system?
Overview:
Lots of games which RPG-like statistics allow for character "buffs", ranging from simple "Deal 25% extra damage" to more complicated things like "Deal 15 damage back to attackers when hit."
...
24
votes
2answers
3k views
How to create adjustable formula for RPG level up requirements?
I'm trying to create a formula that can be modified simply by changing two values: number_of_levels, and last_level_experience. This is to enable people modding the game to change the levelling ...
23
votes
4answers
2k views
game story event programming
I have developed a game engine in c/c++ and DirectX.
I have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus, and level changing but there is no game, it just feels ...
22
votes
9answers
6k views
What C++ GUI library can you suggest? [closed]
I'm building my own game engine in C++ and I'm currently deciding on what user interface I should use.
Should I use a library? Should I make my own?
21
votes
2answers
2k views
Is it safe to use Sleep() in game loop (on Windows)?
Is it safe to use Sleep() function on Windows in game loop (C++)? I want to have fixed frame rate.
20
votes
3answers
11k views
Android game development in c++
So being a primarily c/c++ developer, I've always thought that the only option for mobile game development for me was using iOS, which allows for c/c++ (and minimising objective C).
I heard from a ...
20
votes
2answers
1k views
Several classes need to access the same data, where should the data be declared?
I have a basic 2D tower defense game in C++.
Each map is a separate class which inherits from GameState. The map delegates the logic and drawing code to each object in the game and sets data such as ...
20
votes
3answers
964 views
Making walls in tile-based games: what am I missing?
After spending time today to jot down some notes regarding the implementation of walls into my tile-based game, I've suddenly realized it's not going to be as simple as I imagined before. While the ...
19
votes
4answers
2k views
Find Nearest Object
I have a fairly sizable game engine created, and I'm adding some needed features, such as this, how do I find the nearest object from a list of points?
In this case, I could simply use the ...
19
votes
3answers
1k views
19
votes
7answers
7k views
What languages are used to develop MMORPGs like EVE Online and WOW?
As I understand it, MMORPGs are games that run on your computer like any other normal 3d video game but, with each action that happens with in the game, changes are made to the universe via HTTP calls ...
18
votes
7answers
1k views
How to avoid game objects accidentally deleting themselves in C++
Let's say my game has a monster that can kamikaze explode on the player. Let's pick a name for this monster at random: a Creeper. So, the Creeper class has a method that looks something like this:
...
18
votes
7answers
3k views
18
votes
6answers
5k views
How do I create a save file for a C++ game?
I am coding my final for a Video game Programming course, and I want to know how to create a save file for my game, so that a user can play, and then come back later. Any idea how this is done, every ...
18
votes
6answers
381 views
Finding direction of travel in a world with wrapped edges
I need to find the shortest distance direction from one point in my 2D world to another point where the edges are wrapped (like asteroids etc). I know how to find the shortest distance but am ...
17
votes
10answers
3k views
Competing with C++ for games programming
I'm curious as to why C++ is so popular for games development, and not other languages instead. I know you can create very fast code with it, but what exactly is it that makes it popular?
Is it just ...
17
votes
5answers
1k views
Learning to optimize with Assembly
I am a second year student of Computer Games Technology. I recently finished my first prototype of my "kind" of own pathfinder (that doesn't use A* instead a geometrical approach/pattern recognition, ...
17
votes
5answers
1k views
Try-catch or ifs for error handling in C++
Are exceptions used widely in game engine design or it is more preferable using pure if statements? For example with exceptions:
try {
m_fpsTextId = m_statistics->createText( "FPS: 0", 16, 20, ...
17
votes
7answers
916 views
How important do you find exception safety to be in your C++ code?
Every time I consider making my code strongly exception safe, I justify not doing it because it would be so time consuming. Consider this relatively simple snippet:
Level::Entity* entity = new ...
17
votes
4answers
3k views
Should collision detection be done server-side or cooperatively between client/server?
I am working on an online game that will have very heavy collision detection processing. Player models will collide with other players, mobs, structures, terrain, and solid objects that only exist ...
17
votes
4answers
8k views
Is there anything like XNA for c++? [closed]
I love the features of XNA but I want to get into c++ game dev. The problem is that I now have to worry about everything from loading a png file to opening a window. This is a little bit annoying.
I ...
17
votes
1answer
3k views
File format for static and animated 3D models
I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to
display static meshs and
...
17
votes
0answers
333 views
My game seems to be incompatible with recording software. What could be causing this?
I've just finished a little Game-Dev project for university and I need to record a video to accompany my submission (just in case they can't get my source to work). Basically my game doesn't work at ...
16
votes
9answers
7k views
I prefer C/C++ over Unity and other tools: is it such a big downer for a game developer?
We have a big game project using Unity at school. There are 12 of us working on it. My teacher seems to be convinced it's an important tool to teach students, since it makes students look from the ...
16
votes
5answers
4k views
When should vector/list be used?
I can understand when to use lists, but I don't understand when it is better to use vectors than using lists in video games: when it is better to have fast random access ?
(And I understand why it's ...
16
votes
7answers
3k views
How can one implement hot-swappable C++ modules?
Fast iteration times are key to developing games, much more so than fancy graphics and engines with truckloads of features in my opinion. No wonder many small developers choose scripting languages.
...
16
votes
5answers
2k views
Can I develop games for mobile platforms in C++?
I have a good grasp in C++ and C and have also experience developing AAA game using C++.
Now, I'm shamelessly thinking to dive into mobile game development either in iOS or Android. Unfortunately, I ...
16
votes
7answers
2k views
What scripting language would you recommend for a C++ game project?
By scripting here I mean not just putting config data in a script, but scripting parts of the project like some class methods, test specific game loop, etc. This would be not just to accelerate ...
15
votes
7answers
2k views
Determining Poker Hands
I have been making a Texas Hold'Em game as a part of an assessment, and I have been mulling over how to examine the 7 available cards and determine if hands exist.
The only possible method I can ...
15
votes
12answers
2k views
3D theory before graphics APIs?
I'm a software engineer and I'm hoping to move my career towards game development. I'm reading a book right now on 2D using C++/DirectX. When I get into 3D I know I want to do it correctly. For ...
15
votes
3answers
3k views
Upgrade OpenGL version on Windows?
How do I update the version of OpenGL on Windows so that I can use anything newer than the Version 1.1 header file that is included in the Platform SDK? Even version 7.0A of the SDK for Windows 7 ...
15
votes
3answers
1k views
How does one do unit testing in a game engine?
Much to my shame, I have never written a proper unit test, only small unorganized test programs that I would then dispose of after the test succeeded. I don't really have a clear idea of how unit ...
14
votes
6answers
1k views
Should Vector3 inherit from Vector2?
I'm creating a couple of classes Vector2 (X & Y) and Vector3 (X, Y & Z), but I don't know whether to make Vector3 inherit from Vector2, or whether to re-implement the member variables m_x and ...
