C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
-3
votes
2answers
38 views
Is hard-abstraction from SDL, OpenGL, OpenAL, Freetype, etc. worth it? [closed]
Is it really worth to abstract away from underlying mechanisms by means of pure virtual functions just to get rid of #include <SDL.h> in high-level classes? I'll still have high-level classes ...
0
votes
1answer
36 views
Projecting world coordinates to screen coordinates issue - points disappear when origin not in view
I am trying to implement a 2d line drawing effect on a 3d mesh using Ogre. In order to do so, I perform silhouette detection on the lines of the object (this works) and then project these lines from ...
2
votes
3answers
91 views
Desire advice on implementing this animation timeline system
I have read a lot of questions on here, as well as books regarding game architecture. I have a general question about the implementation of a game's animation timeline, on which many isolated ...
0
votes
0answers
38 views
Calling a method of a derived class from base class constructor [migrated]
I have a situation where I'd like each derived instance of System to subscribe to an event via my own event system. Basically this means passing a std::function to the event, which is a member field ...
0
votes
0answers
31 views
Using shaders with GLFW3
i've setup the newest version of glfw & glew on mingw (i'm using windows 7). I've previously used freeglut & glew but i switched to glfw because i've heard it was better for games. So my ...
3
votes
1answer
109 views
2D collision resolution: works on each axis individually, but not with both combined
My collision detection method is solid and detects box to box collision every time. Then comes the resolve part which I'm struggling with quite a bit. It works perfectly when I'm manipulating the ...
0
votes
0answers
66 views
Tension Force is zero
And it's not supposed to be. I've been pulling my hair out for a while trying to figure out why...
The values used in T = F - ma are below:
mass of first body: 1 kg
acceleration: [0, 9.80665] (as a ...
0
votes
2answers
136 views
Game state management?
I'm running in circles here trying to figure out how to implement game states!
Many of the articles I have read use an abstract class that game states inherit, and another "manager" class that ...
3
votes
1answer
85 views
Why do some .obj files have no newlines?
I'm working on a game engine and just started with mesh loading. I started with the format .obj. I ran into this problem:
The guide I'm following gave me a couple of .obj files to try and they all ...
0
votes
0answers
58 views
Key holding down and others
I'm setting up a script, and am trying to help a friend with theirs by adding in to where while the player is holding down "key" they are blocking, when they are pressing and holding down the left ...
-2
votes
0answers
51 views
“Full” 3D Game Library? [closed]
Something of the sorts of Slick2D, except for C++ and 3D support. I've only been able to spot things such as SDL and GLFW. I have yet to find anything that yields exceptional results yet. Help would ...
-3
votes
1answer
94 views
Making a scroll bar in game [closed]
I'm making a scroll bar for chat box in my game now but I can't calculate the height of thumb in scroll bar.
I try
(containerHeight / contentHeight) * thumbHeight
but it's not working.
please ...
0
votes
0answers
55 views
GLSL gl_ModelViewMatrix breaks my code?
So I have the following shaders which work (to the extent that they are completed anyway).
//Vertex Shader
uniform float offset;
void main()
{
gl_TexCoord[0].t = gl_MultiTexCoord0.t;
...
0
votes
1answer
184 views
+50
Simplest way to render image over top of another with another image used as mask in OpenGL?
The effect I'm looking for is to have a single large background image that is always visible (at full alpha) and then show a second image (what I call a light map or specular map) that is partially ...
0
votes
0answers
29 views
OpenGL rotate to face an object [duplicate]
I am attempting to create a small game and in opengl and c++ and I am in need of the ability to rotate an object towards another object in 3d space(horizontal rotation is not needed), I have no idea ...
3
votes
1answer
106 views
small independent game development on a virtual machine
I've been learning about OpenGL and SFML with c++ now for about 6-8 months, and would like to work on a small little personal game to put some of my skills to the test.
Now I want to kill two birds ...
1
vote
1answer
96 views
Painter algorithm on transparant objects
Why do you have to use the painter's algorithm when drawing transparant objects ? Can't you just use a z-buffer, draw all non transparant/opaque objects, then draw all transparant/opaque objects last?
...
-5
votes
1answer
83 views
Starting off C++ games development? [closed]
I've just finished my 2nd year of college, and now that I have time on my hands I want to start working on a 3D game, though my stumbling point is trying to find the resources to learn C++ games ...
-3
votes
1answer
42 views
How do I change gravity of box2d world after world is created?
I want to modify the world of box2d after creating it, namely to change the gravity vector. Is there a way to do this?
4
votes
4answers
209 views
Identifying Entity 'Types' in an Entity-Component System
If an Entity has no explicit 'type' (e.g. player) and is simply a collection of components, how do I identify the entities that my systems should and should not be working on? For example, in a game ...
-1
votes
0answers
45 views
Mobile vs. PC for newbie game dev [closed]
First a little background info:
I have made small games such as a Tetris clone and minesweeper in java but I want to learn c++. Now I am looking to make an rpg game. My goal is to eventually make ...
0
votes
1answer
80 views
Can't Build Cocos2Dx emscripten project
I need to port a Cocos2D-x project to Web (JS+HTML5). I'm trying to compile cocos2D-x samples using the emscripten project for cocos2d-x, and I've followed this tutorial ...
0
votes
1answer
62 views
SDL on Windows 7. Better hardware,lower FPS [closed]
I've just moved from one PC to another.I've been developing a game in SDL with SDL_image and SDL_ttf for about one year. On my old pc, I had about 90 FPS on my game, but now i have about 30, witch I ...
-9
votes
0answers
102 views
I want to make a RPG game [closed]
I really want to make a RPG game but I don't know which 3D Engine can I use in C/C++.
Please give me (easy) Engine and link to complete guide for this Engine because I'm only beginner.
1
vote
0answers
51 views
Glowing Effect and Blending [duplicate]
I am using C++ and SDL and I am trying to get lines with a glowing effect as provided by the image of the game Defcon on the continental outlines.
How could I achieve this glow and blend of the ...
5
votes
1answer
164 views
How to find the bottleneck in a typical OpenGL game?
I am working on a little game engine. All major features are implemented yet, despite game logic which I assume not to be such a computational effort. The framerate is at least around 40 FPS, most of ...
-1
votes
4answers
74 views
Return char + char problems [closed]
int ReturnString(int , char);
int Finisher(int ChosenSave)
{
char SaveFolder1[20]="./Data/Saves/Save1/";
char SaveFolder2[20]="./Data/Saves/Save2/";
char ...
3
votes
2answers
132 views
Best way to keep track of game objects
I'm not exactly sure how I should ask this question, and so the title may be misleading - I am not asking if I should use a list or a stack or a vector or a queue - but how I should go about keeping ...
2
votes
1answer
75 views
Mesh objects and a draw function
I'm currently working with a mesh class so I can easily create mesh objects. Now I want a draw function in my mesh class so when ever i want draw it to the screen I can just call it without any fuss. ...
-4
votes
0answers
91 views
Maths behind portals? [closed]
I'm trying to make portals in Source Engine, like the ones in Portal
I don't want to shoot them, I already have them in maps.
Basically, I'd like to know the mathematics needed to create a correct ...
-4
votes
0answers
44 views
OpenGl library for C++ [closed]
Currently, I am writing OpenGL program in C using mesa library in Linux OS. I want to switch into Object-Oriented environment preferably C++ to write OpenGL programs.
Which OpenGL library are there ...
-7
votes
0answers
84 views
Best program for c++ [closed]
I'm new in the C++ World and I'm trying to know what's the most popular C++ program to code in. Your answers will help me make a choice.
2
votes
3answers
141 views
Efficient Collision Detection With Numerous Objects at Once
I am developing a 2D game with very large levels in which two teams(around 200 objects per team) fight against each other in planes, tanks, turrets,...etc. With every entity shooting bullets at their ...
0
votes
1answer
36 views
SDL - BlitSurfaced Background Slowing Time Based Movement
Whenever I use BlitSurface to apply a background image, the movement of my characters is slowed drastically even though I have movement based on time:
SDL_BlitSurface( background, camera, screen, ...
1
vote
1answer
98 views
Score system for “little bit more complex” snake game
I have created snake game.
I can't think of good score system so that is is fair.
There is only one highscore list for all modes.
Player can choose any size of board
- Let's call that param "Board ...
4
votes
1answer
113 views
Mixing Javascript with C++ for mobile development?
I have a few games for the iPhone, Android, and Windows 8 that I built using native C++. This works great but is really limiting when I try to create menus and start screens.
I have read about rapid ...
1
vote
2answers
109 views
Calculate object coordinates from window coordinates using inverse projection matrix
What I am trying to to is placing 3D Objects (A Sphere) in the world when I click there.
I am using a perspective projection so the first step after calculating the canonical clip coordinates from ...
5
votes
2answers
273 views
Most efficient way to draw vertex with OpenGL
I am writing an OpenGL 3D game. There will be tons of triangles for terrain and objects in use.
I am studying from the OpenGL official guide and the first presented method is to call a function ...
0
votes
0answers
50 views
Ideas to create a Best Move in a match 3 game
I'm trying to make a match 3 game in C++ and I want to make a best move method to show the player the ideal position to move to get the most amount of points.
The rules of the game are as follows:
...
14
votes
2answers
592 views
Best way to gain C++ working experience for a job in games (coming from C#) [closed]
I am a software developer, experienced with C# (5 years experience) alongside a few other languages.
My "dream job" is working in video games as a developer.
Most jobs require knowledge of C++, ...
1
vote
1answer
105 views
C++ How to implement a spatial hash (for a 2d Game)
I feel kind of silly for asking this question, but are there examples or tutorials on how to implement a spatial hash (grid/cell-based partitioning), preferably in C++?
I'm stuck and I have no idea ...
1
vote
0answers
50 views
How to correctly synchronize a shared surface?
I am trying to share a direct3d9 surface between two processes. One process (let's call it A) writes to the surface, and the other (B) displays it on screen. Currently, process A does a StretchRect of ...
1
vote
1answer
66 views
2D Platform character getting “unaligned” with the map
I'm trying to make a 2D Platform game and so far I can have my character moving around in a tiled map and collisions are working too. So far so good.
The problem I'm having is that the character can ...
-1
votes
1answer
120 views
OpenGL shader problem
So, I've been working on this game engine for a while now, and just the other day my friend tried running the program and his output doesn't match my output...
My Program Output:
His Program ...
2
votes
0answers
29 views
Creating a d3d surface from pre-allocated system memory?
I thought I read somewhere that one could create a OffscreenPlainSurface from an existing system memory buffer, but I cannot seem to find the reference anymore.
My use case is copying a frame from ...
-2
votes
0answers
71 views
2d mouse coordinates to 3d coordinates [closed]
I have the following problem: I have my mouse coordinates and I have a Model (Data Points) and I want the 3d Coordinates of my mouse coordinates and my lookAt Vector of this coordinates, so that I can ...
1
vote
1answer
52 views
OpenGL VBO - load a normals index
Okay I have the following code that works correctly. It loads a vertex array, a normal array and a vertex index array then draws them with some simple light shading.
To load the buffers:
//Load ...
5
votes
1answer
184 views
How do I read input from multiple keyboards/mice on one computer?
I want to be able to read inputs from multiple keyboards and still differentiate them. It's for split-screen. I know it's possible, because Serious Sam 3 allows it.
Edit : Well a whole lot of my ...
1
vote
1answer
73 views
Drawing models and their bounding boxes using two different shaders?
I have a bunch of 3d models I want to draw and also for some of them I want to draw bounding boxes.
Calculating the boundnig boxes is no problem, but I'm not sure as to what is the best approach to ...
1
vote
2answers
119 views
How to implement SDL Button/Menu GUI with callbacks?
I have been reading Bjarne Stroustrup's Programming Principles and Practice Using C++ for a while now and am nearing the end of the book. I have to tried to make a very simple game using the SDL ...

