C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

learn more… | top users | synonyms

0
votes
0answers
14 views

Simple Boost multithread networking example

I'm using boost C++ library for multiplayer networking, while my game display function runs. I've looked through this tutorial, and things seem fairly complicated. Does anyone have a simple example I ...
0
votes
0answers
14 views

Add 3d modeler in active environment? [on hold]

I'm trying to find the best way to add in a 3d modeler that can be accessed in-game. I was thinking of using Blender's source-code and implementing it that way but I'm concerned about performance ...
0
votes
0answers
58 views

How can I generate passive 3D using a consumer level graphics card?

I would like to how to generate packed frames and sent them by HDMI to a 3DTV for passive stereo visualization, using any consumer-grade graphics card. I am working on Linux, and programming in C++. ...
1
vote
1answer
52 views

c++ RPG - Handling buffs / equipment stats [duplicate]

I'm trying to develop a character calculator for a RPG, and it could evolve into a turn based combat / text based RPG. One of my concerns is how to handle the equipment stats / buff system. ...
1
vote
2answers
52 views

DirectX Quaternion SLERP Wrong Answer?

I have some code that looks like this: DirectX::XMVECTOR a, b, c; a = DirectX::XMQuaternionIdentity(); b = DirectX::XMQuaternionRotationAxis(DirectX::XMVectorSet(0.0f, 1.0f, 0.0f, 0.0f), 3.1415f); c ...
-1
votes
1answer
71 views

How to move object along circumference of another object? [on hold]

I have following piece of code, now i want to move the "moon" object in the orbit around "earth". please help!! #include <stdio.h> #include <conio.h> #include <graphics.h> #include ...
0
votes
2answers
40 views

Overload how an object instance of a class is treated when used

So I've made this struct that encapsulates a glm::vec4. This is because vec3s are treated as 16-byte in GLSL, but I don't want to assign a vec4 if I only really need 3 components. Anyway, my question ...
-2
votes
0answers
50 views

Where can I look for a game modding savvy C++ gameplay programmer? [on hold]

I am looking for a C++ gameplay programmer who in the past modded Quake1/2/3 and derivatives, Doom 3 and derivatives or UT series, to help me with my game project. I tried ModDb job board with a ...
0
votes
0answers
11 views

SDL_Mixer .xm file loop not working correctly

I am working on a little game in my spare time using C++ and SDL and I have encountered a problem with a .xm file playback. The music is supposed to have an intro of a couple patterns and then ...
0
votes
0answers
24 views

Multiplayer movimentation and animations [closed]

I'm planning my first multiplayer game that will be similar to this: http://www.youtube.com/watch?feature=player_embedded&v=N9ii54dYO6w I will make the client in C++/DarkGDK and the server in ...
0
votes
0answers
23 views

Formal parameter with _declspec(align(16)) [closed]

I am currently trying to learn DirectX. So I was using one of the old templates from my teacher where everything is set up. As I am done with the course, I am moving away from these things I renamed ...
0
votes
0answers
45 views

Trying to bounce a box with a plane using bullet physics

I'm trying to simulate a box that bounces with a plane and I'm beginner with bullet physics. I created a plane (box) and and a box that is falling. The problem is the ball is stalled while colliding ...
0
votes
0answers
29 views

Update DirectX 11 Texture Created in Unity Asynchronously in the Native (c++) Plugin

Sorry for the long question :D tl;dr version :) Is it possible to update DirectX 11 textures created in Unity asynchronously in a native plugin (C++)? I've written a plugin that retrieves data from ...
1
vote
1answer
43 views

How can I fix user input for this pong paddle?

I have been having trouble with my pong paddle - It responds to user input as if it was typing. Sometimes, people try to react to KeyPressed events directly to implement smooth movement. Doing so ...
1
vote
2answers
32 views

Dynamic Flow Control in HLSL with Array References

I'm trying to do lighting calculations for an array of point lights in HLSL. I simply want to pass light direction vectors from the vertex shader to the pixel shader. Here is sample code: static ...
-2
votes
1answer
37 views

Gamepad controlled at c++ [closed]

i want get control my gamepad (MaxFire G-08XU) with c ++ ?. I need to make a robot can control him with the gamepad. please help-- Thank you.
0
votes
1answer
46 views

My texture blends into one single color (DirectX11)

First thread on gamedev stackexchange. I am currently creating a cube with a single texture on each side. I got my cube up and running. But when I apply my texture, I get this: It blends the ...
3
votes
4answers
268 views
+50

OpenGL lighting appears to be clamping

I'm experiencing an odd problem where everything placed in front of my light appears black in my scene. This happens on multiple axes. I've searched the depths of the internet to find a solution, but ...
0
votes
0answers
19 views

How to properly transform vertices for a model loaded using Assimp?

When I try to load a DAE model then vertices are not placed correctly. Here's the code snippet I use to load 3D models using Assimp : aiNode* CGameObject::findNode(aiNode* rootNode, const char ...
0
votes
0answers
30 views

When camera moves the textures move and rotate

I recently followed the tutorial at PaulsProjects on shadow mapping. After finishing the tutorial all of my textures seemed to have vanished, then I moved my camera and the texture reappeared. But the ...
0
votes
0answers
25 views

Angel2D won't find GLFW

I'm doing my first steps with C++ and game development to build a simple prototype. I've chosen Angel2D as framework to get some help from the beginning but I have problems to get it working with a ...
0
votes
2answers
39 views

How can I change the value of a matrix uniform in an OpenGL vertex shader?

I'm new at OpenGL. I have a uniform transform matrix in a vertex shader file. I want to modify the matrix by individually assigning each values in the matrix. How can I do that in C++? I learned that ...
1
vote
1answer
32 views

CopySubresourceRegion results in no-op

I'm having some trouble copying a subregion from a source texture (2D) to a destination texture. Both textures are mipmapped 2D textures, with dimensions (at mip 0) of 512 x 32. Rather than tell you ...
0
votes
1answer
36 views

Space Invaders: Getting the aliens to move as one [closed]

I'm having issues getting my invaders to move together. Currently they hit the edge of the screen and then go crazy. Here is the code for the Alien: #include "Alien.h" #include <iostream> ...
1
vote
1answer
137 views

C++ Ray Traversing in 3D Voxel game

I'm currently working on a Voxel game in 3D and need a tad bit of help to figure out what Voxel the player is looking at. This is the data I currently have: GRRLIB_Camera3dSettings(Player.x, ...
0
votes
0answers
23 views

Collada 3d file type

For animations in the Collada file type. How does it store them? I'm reading them in with Assimp and I got the keys. mNumPositionKeys = 24. I made the animation and it had 24 frames. But only 2 were ...
0
votes
1answer
95 views

Shipping images with a C++ program [closed]

I've done hobby development in Java for a couple of years now, and I've just started learning C++. I understand syntax fairly well, but I'm extremely confused as to many structural facets of a typical ...
-1
votes
0answers
49 views

How to design drawing order?

I am using Opengl 4.3 in my game and I am curious to how popular implementations of drawing order is done. What I currently have is a texture atlas of bunch of images, some single images to display, ...
0
votes
1answer
78 views

How can I tell if a set of tiles form an enclosure?

I have this tile-based game I've been messing around with and I want to have a way to check if a set of wall tiles make an enclosed space. Here's some more details: I have a tile map. Each tile has ...
0
votes
1answer
73 views

How to render a vertex buffer in DirectX11 C++ (specifically with box2d's b2Draw)

I have all the DirectX11 devices etc setup and working with DirectXTK's SpriteBatch and currently attempting to implement a b2Draw class to draw my box2d physics worlds. I have little idea on how to ...
1
vote
1answer
55 views

Errors when loading Assimp meshes

I am experiencing some oddities when loading meshes in Assimp. Some models render perfectly, while others are complete jumbles of triangles. Some Example Images: Teapot Correct - Teapot Actual ...
0
votes
1answer
61 views

Should I check SDL_Event for NULL?

I have taken as a practice (as many others, I think) to always do this when working with pointers: void I_take_pointer(some_type* arg1) { if(arg1) { //safely do stuff with pointer ...
2
votes
0answers
52 views

Box2d C++ x velocity slowing for no apparent reason

I'm making a 2d platformer in C++, using Box2d for physics and sfml for rendering, I want the player character to move with a constant velocity in the x direction, and to jump when the spacebar is ...
1
vote
0answers
40 views

3D engine for technical application [closed]

I am looking for a 3D engine for a very technical application. I want to visualize orbits around bodies of the solar system, and thus need some way to easily display 3D Models and draw lines in 3D ...
0
votes
1answer
47 views

Bullet pointer becoming zero [closed]

I am currently trying to implement the Bullet physics into my game project. However, when i add some rigid bodies to the scene, i occasionally get an error in btDbvtBroadphase.cpp at the line ...
0
votes
1answer
55 views

Randomize and display sprites in a 4x6 grid - Cocos2d-x

I am creating a card matching game. I have a vector that stores 16 unique cards. I am trying to randomize the order and select only the first 12 cards, then setup in a 4x6 grid for a total of 24 ...
1
vote
2answers
93 views

Getting around limitations posed by float in space game

I'm working on a procedurally generated game set in outer space. As in the real world, the game universe will be pretty much 99% empty, with planets/stars/solar systems etc... being very far apart. ...
0
votes
1answer
129 views

OpenGL: I only see one square instead of a cube / giving information to vertex shader

I am new to OpenGL and tried to follow this tutorial. I use C# and OpenTK. So I translate the C++ Code from the Tutorial: My C#-Code: /* Hintergrundfarbe */ ...
0
votes
0answers
6 views

Error with QObject::connect() [migrated]

I am trying to run QTimer and have it warn me when timeouting. To do so, I use slot and signal to link the two. The guy.h: #ifndef GUY_H #define GUY_H #include <QGraphicsItem> #include ...
0
votes
1answer
74 views

Animation, Interpolation, & Structure

I have been working on animation in my small game engine recently and I am implementing some interpolation to be used with skeletal animations. I know how to do interpolation but I am not sure where ...
0
votes
0answers
4 views

C++ Irrlicht Program doesn't link: “undefined reference to `__imp_createDevice'” [migrated]

My Irrlicht program doesn't link. The compiler I use is g++. Code: #include <irrlicht.h> int main() { irr::IrrLichtDevice *device = irr::createDevice(); // And other init stuff ...
0
votes
2answers
120 views

How to make sprites from multiple images using SDL2

Using SDL2 in C++ I can load textures with out problem however, I have sprites that are from about 15 different png's that I was hoping I could load them all up and for loop through them. However, ...
0
votes
1answer
120 views

How do I set a background image in OpenGL/GLFW?

I'm writing a simple 2D game with C++ and OpenGL/GLFW, and my current step is to create a menu. I finished with buttons, but I think it looks a little bit boring (with only 4 buttons and a black ...
0
votes
1answer
78 views

OpenGL - Asteroids clone - shooting bullets from spaceship [duplicate]

I am having a bit of difficulty figuring out how to shoot bullets from the front of the spaceship. I can draw it to screen, but I can't properly figure out how to create bullets each time I press the ...
0
votes
0answers
35 views

Getting a Rect of a SpriteBatch

I'm using DirectXTK, https://directxtk.codeplex.com/wikipage?title=SpriteBatch it's a port of XNA spritebatch. I'm trying to get a bounding rect of my sprite for testing collisions AABB. I draw ...
0
votes
0answers
50 views

How do I procedurally generate a different animal randomly with object oriented programming in C++? [duplicate]

I am working on a puzzle game, which generates a different animal every time they. reach a cage at the top of the screen. I have the object code written down so that it respawns at the bottom again to ...
1
vote
1answer
139 views

OOP design, keeping track of entities

First, I would like to say that I have no experience with this and am still getting my head around OOP, so if something is really obvious, just point it out :) I am designing a game and I am not sure ...
0
votes
1answer
48 views

FBX SDK texture file name

I have built an importer that retrieves necessary vertex data however I wish to be able to read texture file directories. How do I retrieve the texture file name?
1
vote
1answer
128 views

How to calculate ray polygon intersection? [duplicate]

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
2
votes
1answer
75 views

How does the SDL dynamic API inject itself in statically linked code

I've been using SDL2 for development almost since it came out. Long story short, I stumbled upon the SDL dynamic api explanation. I've looked in SDL_Dynapi.c to understand how it works. I get that the ...