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

learn more… | top users | synonyms

0
votes
0answers
24 views

Informing objects within a particular state of the world state

Following the State pattern, every state in my game is a derived object that reflects a particular segment of the game (MenuState, PlayingState, GameOverState, etc.) Each of those state objects holds ...
-1
votes
0answers
20 views

Object not texturing properly [on hold]

So I am trying to texture a cube, however things aren't quite turning out as planned. The results always look similar to this: Where in this picture the texture is supposed to be a red/black ...
1
vote
1answer
97 views

Entity Component System Coupling

Lately I've been working on a small personal project which is basically an Entity Component System framework with autoupdated Systems. While I have a pretty good idea on the way the framework should ...
-1
votes
2answers
143 views

Is it possible to use C++ with Unity instead of C#?

The title kind of says it all. Is it possible to replace C# with C++ on a game using Unity?
3
votes
1answer
111 views

How do I render from one render target to another?

I have two render targets: a fake backbuffer; a special render target where I do all my rendering. a light render target; where I render my light fx. I'm sure I'm rendering correctly on both. The ...
0
votes
0answers
31 views

2D MMO Engine/Library? [on hold]

I was wondering if anyone knew any good libraries, frameworks, snippets of code, or engines that could make MMO networking easier or make 2D MMO games? I've been trying for a few weeks now with C++ ...
0
votes
0answers
11 views

Error In SFML Audio [on hold]

This is my code: #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> int main() { sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); ...
0
votes
0answers
61 views

c++ gamedev beginning signals [on hold]

So I've been working on learning c++ for Game Development and had a question about the language. I have learned a little bit about Actionscript 3 and how it uses signals to process events. I was ...
1
vote
1answer
39 views

Compute billboard rotation

I'm trying to compute a matrix to have object always facing the camera. For the moment, my result look pretty good, the problem is that my original billboard scale isn't preserved (Every billboard ...
2
votes
1answer
127 views

Anti-Aliasing in OpenGL [C++]

I'm trying to make anti-aliasing work inside of OpenGL, here's what I've tried: glEnable(GL_POINT_SMOOTH); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); glEnable(GL_LINE_SMOOTH); ...
0
votes
0answers
45 views

Which way would a character face if he is moving one way, but pointing his gun a different way? [on hold]

So I am creating a 2D platform game in C++ with SFML, in which the character wields a 2 handed grenade launcher type of gun. The character is controlled with they keyboard (arrow keys or WASD), and ...
1
vote
1answer
97 views

C++: Checking if an object faces a point (within a certain range)

I have been working on a shooter game in C++, and am trying to add a feature whereby missiles shot must be within 90 degrees (PI/2 radians) of the direction the ship is facing. The missiles will be ...
0
votes
1answer
45 views

Proper way to encapsulate a Shader into different modules

I am planning to build a Shader system which can be accessed through different components/modules in C++. Each component has its own functionality like transform-relevated stuff (handle the MVP ...
1
vote
1answer
116 views

Using unordered_multimap as entity and component storage

The Setup I've made a few games (more like animations) using the Object Oriented method with base classes for objects that extend them, and objects that extend those, and found I couldn't wrap my ...
0
votes
0answers
49 views

C++ OpenGL trouble trapping cursor in window

I am using OpenGL and I try to trap my cursor inside my game window (using both SetCursorPos and ClipCursor) But, these conflict with my camera rotation code as my camera is rotated with ...
-3
votes
1answer
71 views

Rotate camera with mouse? [closed]

Once again, using tutorial 10 at NeHe. I want the code if (keys[VK_RIGHT]) // Is The Right Arrow Being Pressed? { yrot -= 1.5f; // Rotate The ...
0
votes
0answers
8 views

Create a kind of Interface c++ [migrated]

I'm writing a little 2d rendering framework with managers for input and resources like textures and meshes (for 2d geometry models, like quads) and they are all contained in a class "engine" that ...
-3
votes
0answers
40 views

Can any one name a good 3d c++ framework for game development? [closed]

I am thinking of developing a game as c++. Is there any good 3d c++ framework for it.
-1
votes
0answers
48 views

C++ Game Development [closed]

I want to make games.For now simple 2D games, but I don't know from where TO START. I "know" C++, but i havent worked with classes.I want to begin with GAME development and I searched in the internet ...
-1
votes
0answers
36 views

Keep basic game physics separate from basic game object? [closed]

If anybody has dealt with a similar situation I'd be interested in your experience/wisdom, I'm developing a 2D game library in C++, I have game objects which have very basic physics, they also have ...
-1
votes
0answers
58 views

Render To Texture Using OpenGL is not working but normal rendering works just fine [closed]

DISCLAIMER: THERE IS A BIT OF CODE BECAUSE I ALREADY KNEW THE DIFFERENT QUESTIONS PEOPLE WOULD ASK example: "how did you make your shader attachments" "what was your order of rendering to the ...
1
vote
2answers
268 views

UV Atlas Generation and Seam Removal

I'm generating light maps for scene mesh objects using DirectX's UV Atlas Tool( D3DXUVAtlasCreate() ). I've succeeded in generating an atlas, however, when I try to render the mesh object using the ...
0
votes
1answer
80 views

filling the empty spaces in a certain region in a grid using c++

Hi guys i am struggling to find the optimal way to fill the grid of a certain region. In the above example lets say my player is at (7,5) and traveled (2,0) and i have the information of all the ...
0
votes
1answer
44 views

Filling up the empty blocks when the player touches the safe zone again! using cocos2d

Hi guys i am stuck with filling up the data of all the blocks which are empty like the ones in the image. As you can see there i have a pacman like object where i will be moving around. But when ...
1
vote
3answers
116 views

How do I correctly multiply an XMMATRIX by a scalar?

Using DirectXMath and its XMMATRIX structure in C++ and Direct X 11, how does one multiply that matrix structure by a single float scalar? I want to implement the operation B = A * f; where A and B ...
0
votes
2answers
129 views

How to set HUD elements position and size depending of resolution [duplicate]

How can I set HUD elements' position and size when changing resolution and maintain the desired layout? All HUD elements (including menu items such as play button, setting button etc) need to get some ...
-1
votes
0answers
22 views

`std::cout` freezes `Display()` in glut [closed]

I'm using Eigen Library to compute matrices. If I print them out using std::cout, I notice the Display() is getting slower. Why this occurs and how to overcome this problem?
0
votes
1answer
40 views

Box2D `ApplyLinearImpulse` is not working whereas `SetLinearVelocity` works

I need to mimic jumping behavior for the player in my game. Player consists of two fixtures with circle and rectangle shapes. Rectangle I use to detect ground and it is a sensor. Is some point for ...
-4
votes
0answers
51 views

What game companies hire remote programmers? [closed]

I'm looking for a remote (telecommute) c++/lua/python job. What game industry companies occasionally have such vacancies? Thanks!
7
votes
2answers
181 views

How do I find the closest points(thereby forming a polygon) enclosing a particular point?(see image)

I am working with a game engine, and my task is to add code for simulating fracture of rigid meshes. Right now I'm only working on breaking a cube. I am using Voronoi's algorithm to make a ...
0
votes
1answer
39 views

speed up the update of glutidle()

I have a client that sends data at 1KHz (i.e. 0.001 sec) to a master over Internet using UDP protocol. In Master, I need to draw an object, but the problem is that the update of GLUT is slower than ...
3
votes
1answer
303 views

Dynamic Quad/Oct Trees

I've recently discovered the power of Quadtrees and Octrees and their role in culling/LOD applications, however I've been pondering on the implementations for a Dynamic Quad/Oct Tree. Such tree would ...
1
vote
2answers
151 views

How to detect graphics API at runtime with SDL2?

Using SDL2, is there a way to determine at runtime whether the application is using OpenGL, OpenGLES, or DirectX? EDIT: If there is a way to figure it out without using the SDL2 API, I'm willing to ...
0
votes
1answer
54 views

DirectX9 Drawing Sprites out of place due to offset

This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites. For that, i ...
1
vote
0answers
400 views

How do I mix 3D skeletal animations?

I'm trying to create a 3D-model skeletal animation system for C++/Open GL. I would like to be able to mix animations by allowing animations to only affect specific bones. My game has ride-able ...
-1
votes
1answer
71 views

Smooth radial collision

I'm trying to make collisions smoother in my game. Currently, entities will stop completely when they collide with an obstacle. I saw the following article recently: ...
1
vote
2answers
79 views

OOP Question for Team System

I'm not quite sure right how I should create my "Team System". Lets say I have 2 teams with 4 players in there. The teams are Team Blue and Team Red. A team knows the amount of its members, the amount ...
10
votes
1answer
282 views

How are entity systems cache-efficient?

Lately I've been doing a lot of reading on entity systems to implement in my game engine (C++/OpenGL). The two key benefits that I constantly hear lauded about entity systems are 1) the easy ...
1
vote
1answer
62 views

How to implement camera pan like in Maya?

I am trying to implement camera pan like the one in Maya. I've got it almost working. The problem is that the mouse cursor is moving faster than the 3d mesh (in fact I am moving the camera but I ...
1
vote
1answer
195 views

Calculating shadowmap coordinates for cubemap in shading pass?

I'm trying to implement shadow mapping with cube maps. I believe I've done the first stage by filling the cube map, but for the final shading pass I am unsure how to exactly calculate the cubemap ...
0
votes
1answer
82 views

SFML Stuttering issue with Linux

I wrote a little game of a bouncing ball, using SFML and Box2D. When running on Windows, the graphics animate smoothly. The problem is on my Linux machine. The animation stutters randomly. To be ...
-5
votes
1answer
71 views

Slot machine effect on c++ [closed]

Am making some slot machine game in c++ and sfml for fun. Wanna have an idea to make the REEL effect wheen spin button is pressed.
2
votes
0answers
31 views

How to raycast against a physx cloth mesh?

I'm using the PhysX 3.3 SDK in a application and mostly everything is working fine. However, I'm trying to develop a feature that would allow users to click on various actors in the scene and modify ...
0
votes
0answers
19 views

How do I update a static mesh in Unreal 4 during movement?

I would like to use UE4 for rendering of a huge world. During the runtime, I would like to load a mesh from a custom source and adopt the mesh in the game. Could someone give me a hint how to do this ...
1
vote
1answer
113 views

Game development for high-school with C++ and OpenGL [closed]

I've been teaching high-school students (12th grade) game programming in the last 2 years. The way I did this till now, was first to give them "half made" classes (for Point, Polygon, etc.) and ...
2
votes
1answer
106 views

Emscripten code and three.js

I would like, if it's possible, to use Emscripten code generated from C/C++ with the Javascript library three.js. For example, from emscripten code I want to pass rendering information to the three.js ...
0
votes
2answers
53 views

Why can't I load an image with a relative path in SDL2 on Linux?

When loading a texture in SDL2 the general procedure is this: SDL_Texture* texture = IMG_LoadTexture(renderer, "resources/images/image.png); However this doesn't work and I have to supply the WHOLE ...
0
votes
1answer
36 views

Algorithm for texture blending modification

Im currently writing a terrain editor for my game (for the record: no commercial intentions) and after having implemented the terrain morphing to my liking im now working on the texturing of said ...
0
votes
0answers
7 views

OOP Design Player and AI Controlled Unit. dynamic_cast? [migrated]

Lets say I have a Actor, which can be any placeable object on my Level. I also have Unit which which is a child class of Actor. A Unit can be either a player or a AI controlled hero. And Unit also ...
0
votes
1answer
64 views

C++ OpenGL / SDL2 VBO — Depth problem / Transparency

I got a problem with my VBO. When having textures. The far blocks overlay the near ones. I tried editing the alpha, depth buffer, the VBO byte allocation. Nothing works for me... The FAR plane is ...