C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
5
votes
2answers
2k views
Is it worth it to use Bullet for 2D physics instead of Box2D for the sake of learning Bullet?
There isn't much more to the question. I'm not concerned about overhead, as I'm sure they are both fine for my purposes. Basically, I am familiar with Box2D concepts because of the Farseer Physics ...
5
votes
3answers
912 views
What features do basic particle engines have?
I created a basic particle system for SDL in C++. It has some basic stuff like an emitter, as well as a simple particle class. It can load a image, or create a dot of a color. And that's it. What ...
5
votes
6answers
905 views
Is it possible to use Java as a scripting language?
Is it possible to use Java as a scripting language for a C++ engine/game?
I understand that you need to make a binding to the interpreter, but I haven't seen any around.
5
votes
4answers
2k views
2D Platformer Collision Handling
I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font ...
5
votes
3answers
827 views
Writing a minimalistic server for vanilla WoW
This is about a personal project I've been longing to do for some time now. Since a while now I have stopped playing WoW, but as I'm quite experienced in C++ I thought I'd try the following:
Write a ...
5
votes
1answer
679 views
Setting up a cross-platform Ogre project on a Git repository
I'm looking to start a cross platform game project using Ogre, and I want to host it on a git repository. I'm collaborating with a friend on this: I'm on a Mac using Xcode, and he's on a PC using ...
5
votes
3answers
1k views
Draw contour around object in Opengl
I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
5
votes
5answers
2k views
How to handle netcode?
I'm interested in evaluating the different ways that the netcode can "hook into" a game engine. I am designing a multiplayer game now, and so far I have determined that I need to (at the very least) ...
5
votes
3answers
615 views
Object-oriented Snake game design
I'm going to make a snake remake with SDL library and right now I'm thinking heavily about the object-oriented design.
I can imagine that I will have classes like GameEngine, Snake, Board and Food, ...
5
votes
3answers
863 views
Why aren't linked lists more common data structures for enemies?
I was recently listen to a talk that Jonathan Blow gave, you can find it here. In the talk, he was talking about what data structures he (and he seemed to imply many others) use, and why. Which is ...
5
votes
2answers
1k views
Using HTML for interface?
The game I've been working on uses opengl/sfml for graphics. I'm currently working on the interface and I've found determining all the proper offsets/positioning etc. to be a pain. To make it ...
5
votes
1answer
4k views
Time based movement Vs Frame rate based movement?
I'm new to Game programmming and SDL, and I have been following Lazyfoo's SDL tutorials. My question is related to time based motion and frame rate based motion, basically which is better or ...
5
votes
2answers
338 views
How to remove an object from a std::vector
So I have a vector of bullets that show up on the screen and I do not want these bullets to live forever. I want them to "die as soon as they go off screen or collide with an enemy. How can I make ...
5
votes
2answers
626 views
Custom extensible file format for 2d tiled maps
I have implemented much of my game logic right now, but still create my maps with nasty for-loops on-the-fly to be able to work with something. Now I wanted to move on and to do some research on how ...
5
votes
1answer
355 views
Spaceship interiors: How to approach, implementation-wise?
I'm creating a 3D space game using Ogre3D for graphics with C++ and one of the features is to be able to freely wander around spaceship interiors, but I am lost with how to implement it. Here is what ...
5
votes
3answers
730 views
What's a good entity hierarchy for a 2D game?
I'm in the process of building a new 2D game out of some code I wrote a while ago.
The object hierarchy for entities is like this:
Scene (e.g. MainMenu): Contains multiple entities and delegates ...
5
votes
1answer
1k views
Game programming: common methods and design patterns
I begun writing a very simple game engine so that I can learn OpenGL 3.x better but since my inexperience and my sparse knowledge of how a 3D game should be designed, I usually get into problems where ...
5
votes
2answers
252 views
What use does the unary & operator have in this piece of C++ code?
In an example for a little game framework (that does work), there are the lines:
ID3D10Device* device;
ID3D10Buffer* pBuffer;
followed by the line
device()->CreateBuffer(&bd, NULL, ...
5
votes
2answers
247 views
How should I plan the inheritance structure for my game?
I am trying to write a platform shooter in C++ with a really good class structure for robustness. The game itself is secondary; it is the learning process of writing it that is primary.
I am ...
5
votes
4answers
322 views
Sharing data between graphics and physics engine in the game?
I'm writing the game engine that consists of few modules. Two of them are the graphics engine and the physics engine.
I wonder if it's a good solution to share data between them?
Two ways (sharing ...
5
votes
2answers
5k views
Does Windows 8 still support DirectX 9?
Is Windows 8 supporting DirectX 9? Because I was looking through some samples written in C++ and DirectX 9 made for Windows 8. It wasn't that, like I know it ( look here ...
5
votes
3answers
7k views
How to play animations in Cocos2d-x?
I'm new to Cocos2d-x and looking for a good way/tutorial on how to play animations in Cocos2d-x.
5
votes
3answers
3k views
OBB vs OBB Collision Detection
Say you have two Bounding Box Objects each of them storing the current vertices of the box in a vector with all the vertices of the object rotated and translated relative to a common axis.
Here is an ...
5
votes
5answers
785 views
What is Serialization?
I have been around programming for a while as a hobby, but I did not start seeing this concept until recently. I have google'd "what is serialization" numerous times, but I never actually get any sort ...
5
votes
2answers
642 views
Atmospheric Scattering
I want to add some nice atmospheric scattering to my 3D game engine but I am very concerned with conserving resources. I am not very familiar with how its done but can someone please give me some ...
5
votes
1answer
1k views
Fast, accurate 2d collision
I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system.
I have large levels with many different sprites, all of which are different shapes and ...
5
votes
3answers
219 views
Deleting a game object causing an access violation
I tried doing this but it cause an access violation.
void GameObjectFactory::Update()
{
for( std::list<GameObject*>::iterator it=gameObjectList.begin() .....
(*it)->Update();
...
5
votes
1answer
281 views
Is a 10 meg 2048x2048 bitmap too big a size texture to use in an OpenGL game?
This is a speed question, I have a texture, which is 2048 per 2048, the texture is designed to run in big resolutions (1920x1080 for example).
The problem is, that the texture have a size of 10MB in ...
5
votes
2answers
510 views
How do you pack resources in a game when you have too many of them?
I've recently made a basic space invaders clone in C++ using the Allegro 5 framework. It took me a long time, but after I finished, I realized I had about 10 sprites, and 13MB worth of DLLs (Some of ...
5
votes
3answers
289 views
Current library situation
Allright so I've been doing some searches, here what I got:
SDL: It is a standard, very mature but very old. (I got posts of late 2009 where they were still waiting for the 1.3 to come up...we are ...
5
votes
1answer
206 views
Rectangles render with gaps in between them (Box2D)
Right now I create my boxes where 1 meter is 85 pixels. Gravity is 10. And
fixtureDef.restitution = 0.1f;
fixtureDef.friction = 0.5f;
...
5
votes
1answer
1k views
Game Code Design for Rendering
I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android's way is to have two threads, one ...
5
votes
5answers
508 views
C++: Game State Logic other than switch statement?
Executive summary
Are there any good tutorials on Game State FSMs, particularly OOP/OOD-based and not switch-statement-based?
Summary
Is there a practical process for creating a game state engine ...
5
votes
3answers
1k views
Height Map vs 3D Model Mesh
I'm currently working on a 3D PC game (written in C++ and DirectX 9.0) and I'm trying to find the best way to store level data in the memory.
The game's action takes place under the ground, so ...
5
votes
2answers
1k views
How to disable Y-axis movement in the Bullet physics engine
I want to create an object than only moves along the the X and Z axes, while keeping the Y-axis disabled (it's like movement in 2D, and the object wont fall down).
I'm currently using a 6 dof ...
5
votes
2answers
949 views
3D primitive rendering library
I am looking for a library which would easily allow me to render shapes (cubes, spheres, lines, circles, etc.) in 3D3 and OpenGL if possible. I want to be able to rapidly design visual debugging tools ...
5
votes
1answer
461 views
Floating Point Precision (fp:precise vs. fp:fast)
In C or C++, does the compiler option of floating point precision really make a difference in real world (small/indie) games?
From my observations, setting fp:fast is many times faster than ...
5
votes
1answer
503 views
VBO and gl*Pointer management practises?
I'm aware it's not a simple yes/no question and for the moment I can't tell if it can be simply answered, or is it topic for a long discussion which is not suitable for our Q&A format.
I want to ...
5
votes
1answer
427 views
Splitting up duties for a card game server
I'm working on a game where players connect to a game server and to a lobby to play a card game against others.
I have a pretty good idea how to code it and such, I'm just not sure regarding a few ...
5
votes
1answer
789 views
Problem with Assimp 3D model loader
In my game I have model loading functions for Assimp model loading library. I can load the model and render it, but the model displays incorrectly. The models load in as if they were using a seperate ...
5
votes
1answer
190 views
Trouble with speed and vectors
I'm working on adding bullets to my game. Right now I can shoot bullets in the direction that I would like from a ship by getting the ship's angle:
int speed = 5;
int dx = ...
5
votes
3answers
2k views
Object-Oriented OpenGL
I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state ...
5
votes
2answers
2k views
C++ entity component system framework [closed]
I have found several entity system frameworks for other languages besides C++, like Ash and Rush for ActionScript and Artemis for Java and C#.
My question is whether there exists a framework like one ...
5
votes
1answer
2k views
How can I build and run Doom 3 from source in Windows?
I am trying to build and run Doom 3 from the open source release in order to better understand how the engine works. Unfortunately I am not able to run the game from the binary I built. I just get the ...
5
votes
1answer
526 views
Advice for programming a lobby for a network multiplayer game?
I'm working on learning network programming. I'm working on a simple card game. The basic idea is:
Players enter the lobby
Players see tables
Players sit at an empty seat
Once they sit, they do not ...
5
votes
2answers
2k views
2D soft-body physics engines?
Hi so i've recently learned the SFML graphics library and would like to use or make a non-rigid body 2D physics system to use with it. I have three questions:
The definition of rigid body in Box2d is
...
5
votes
4answers
7k views
Wavefront *.obj loader in C++
I'm creating a game using OpenGL (via SDL) and C++ (via Visual Studios 2010 Professional). During the game, I will be using 3D character animation. I'd like to use wavefront *.obj files for all the 3D ...
5
votes
1answer
1k views
Video Encoding library for C++ game
I'm looking for a video encoding library in C++ that I can use to record game footage.
It can not be an external application like Fraps, it must be a library.
Ideally the encoding can be done in ...
5
votes
2answers
282 views
D3D/DXGI handle fullscreen transition
I have a D3D11 application, and I want to add proper fullscreen suport.
Now I can let DXGI switch my window to fullscreen for me, and I'm under the impression that DXGI will take care of everything ...
5
votes
1answer
127 views
How do I disable the graphical output of Quake 3?
I have been working with the Quake 3 source code for a few weeks now and am in the process of integrating a custom bot as part of my M.S. thesis. I am using a machine learning algorithm to allow the ...

