Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++]

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

1
vote
1answer
177 views

Creating a real loading screen between levels in Unreal Engine 4

I'm trying to create a loading screen to pop up between levels in Unreal Engine 4. I want to have a traditional loading screen such as the loading screen in Skyrim, where the player presses play and ...
4
votes
2answers
1k views

How to stop sinking bodies in physics engine C++

I'm writing a rigid body simulation in C++, and have come across a problem when an object should come to rest on the ground. Because gravity is being applied to it's velocity, the object starts ...
1
vote
1answer
126 views

Box2D simulation running slower on lower FPS(even when the desired FPS is lower than the actual)

I´m playing around and trying to make myself an easy platformer using the Box2D physics, before that I was not using it and was using my own physics implementation(just simple movements with timestep)....
1
vote
1answer
24 views

(SFML) Moving in one direction a time

so i've been making a pathfinder on a grid. I've succesfuly implemented the A* algorithm so the next step is making the AI follow a path. I got it to move to the desired destination but the thing is ...
1
vote
2answers
284 views

How to render a bevel effect with SDL2 Texture?

I develop 2D games using CodeBlocks (C++) with SDL2. I can load a texture (ex. a gray square) and render it to the screen. All is fine. If I want to change the color of the square? Yes, I can do it. ...
1
vote
2answers
46 views

Collision Detection in Direction (SFML) [on hold]

I am experiencing a problem with collision detection, an efficiency problem. Right now I want to make it so that my player square stops traveling in the direction of collision into the static object. ...
0
votes
0answers
15 views

Instancing with Directx11

I'm a total beginner with Directx/3D programming. I need help with implementing hardware instancing on Directx 11. I'm trying to render multiple cubes on the screen, to create some sort of Minecraft-...
2
votes
1answer
3k views

Need Help with Cocos2d Ver 3.3 AudioEngine

I have 2 audio files that I want to play at different times: background.wav a sneeze.wav. I believe that I have to convert both wav files into mp3, caf and ogg files. Then I do this: ...
0
votes
1answer
243 views

Failed LockRect of IDirect3DSurface9

I have hooked Present method of the IDirect3DDevice9 interface, and I want to be able to start video capturing. Taking a screenshoot like this work ...
5
votes
1answer
623 views

A script isn't showing in the Content Browser

Just to set the tone, I'm very new to game development. I'm currently taking an online video course for Unreal Engine 4 that required me to create a C++ script. After I created the script and it ...
-3
votes
0answers
27 views

Collision with gravity (SFML) [duplicate]

What's the fastest and smoothest way to implement collision detection in sfml and stop at collision with a platform so that you can expand upon this code and make a platformer game? I've tried many ...
1
vote
0answers
33 views

OpenGL VAO buffer rebinding vs binding switching

I'm considering two different approaches to vertex buffer management in my OpenGL game engine. The first one seems to be pretty usual, but I haven't seen the second one being proposed or used anywhere....
1
vote
1answer
22 views

Displaying debug line in custom raytracer implementation

Not sure if I should post this here or on the Math forum, but I will try my luck. Some background. I made my custom raytracer. The processing happens purely on the CPU for now, no GPU interaction ...
0
votes
0answers
21 views

Is unzipping library necessary for set it up on Visual Studio project? [on hold]

I'm not aware of coding with graphics libraries but I'm of setting them up on Visual Studio projects, and have posted some articles at wikihow.com about. I suggest setting up zipped libraries, ...
1
vote
1answer
352 views

Passing heightmap data to btHeightfieldTerrainShape constructor

I was searching for a couple of hours, but I didn't find final solution, after trying many ways. I'm trying to get heightmap heights data, and pass it to btHeightfieldTerrainShape. Let's say my ...
0
votes
1answer
212 views

Swept aabb 3d incorrect collision resolution along negative normals

I have followed this tutorial and ported it to 3d with glm. Everything works fine when the collision normal is reported as positive ((1,0,0),(0,1,0),(0,0,1)) but when it is negative the player aabb ...
0
votes
0answers
27 views

Calculate animation weights based on two variables

I am working on a custom engine and have been tinkering with animations using the Cal3D library. My previous experience with animations was based on prototyping a bit with Unity's Mecanim. Right now, ...
0
votes
0answers
21 views

Alpha blending works when rendering to an FBO, but not when rendering to the screen buffer

My rendering pipeline goes something like this- Bind multisampled FBO Render GameObjects Render Transparent Objects Blit multisampled FBO to normal FBO perform any Post processing Render a quad ...
2
votes
3answers
2k views

SDL2 Mouse Camera Movement

I've been trying to build a 3D camera system in SDL2 with OpenGL so that I can use the mouse to look around. With glfw it's possible to trap the mouse in the window, and keep it centered with a ...
0
votes
2answers
82 views

DirectX function calls' duration

Today I downloaded Nvidia Nsight in order to profe my game GPU side and I came across some doubts: I can't find only any resource of what are the average times for the different DirectX functions (...
0
votes
1answer
474 views

3.3x OpenGL Camera - how to do 3d rotation?

I'm trying my hardest to understand what this code is doing so far I think the sin(theta) and cos(theta) of the code is ...
0
votes
2answers
833 views

Opengl rotate around global axis

I want to create a game in which I rotate a cube around 2 fixed axes(x and y) using my mouse. Here is what I want to do. Just use the mouse to see what kind of rotation I want. I calculated my yaw ...
2
votes
2answers
1k views

Framerate-independent acceleration

Is this the right way, or at least a way that works, for dealing with accelerations in variable time steps evironments? ...
1
vote
2answers
82 views

Is it possible to make desktop visible behind drawn object using SDL2?

I would like to draw an avatar over the desktop, something similar to those word 97 assistants, my idea so far is to make only the background transparent but I haven't had any luck, any suggestion? is ...
1
vote
1answer
651 views

Cocos2d - Physics bodies randomly loosing Velocity along an axis after impact

This just started occurring and seems to randomly happen during, and between, game sessions. A dynamic moving body collides with a static body and instead of bouncing off looses (almost completely) it'...
2
votes
2answers
63 views

Is it feasible to create a game in godot using little to no GDScript [closed]

I am trying to get more into game development, I have very little experience with it. I've been messing around a bit with the Godot engine and am slowly starting to understand it more. I have some ...
4
votes
1answer
109 views

Linking Unreal Engine with OpenCV libraries built with RTTI on Linux

Unreal Engine has a plugin for integrating with OpenCV. Currently that plugin works on Windows. I'm trying to modify this plugin to work on Linux. I've worked through many issues but I have one I can'...
0
votes
0answers
19 views

Library completion did not work? [closed]

I was learning about SFML lately. I have already linked the library to the project in Code::Blocks. However when I want to include the header of the library, it doesn't show up in the code completion. ...
0
votes
0answers
25 views

Value returned is different to the value of the original object

I was wondering if someone could help me resolve a small roadblock I encountered aha... Essentially, in my Pickup.cpp file you can see that I'm trying to establish a behaviour wherein the object being ...
0
votes
1answer
57 views

How to implement an tooltip item cache?

I'm building a tooltip item like that I would like to keep this information cached on the client side, avoiding that whenever the information is displayed it's necessary to make a request to the ...
5
votes
1answer
274 views

Set the name of an animation in collada to be used by AssImp

I am using the collada file format to contain my model and animation but when I use AssImp to load the file the name will be empty for the animation. Where is the name for animation set on the collada ...
1
vote
1answer
663 views

Rotate camera around its center in 2D

I'm currently trying to develop my own little game engine (trying to understand maths in games). I have implemented 4x4 matrices and 2d vectors (I don't need 3d since I'm aiming at orthographic ...
4
votes
1answer
204 views

How do I detect image clicks in Dark GDK?

I am trying to determine if an image has been clicked, using the Dark GDK game engine. I've found no methods in the engine that do this. I would rather not brute force this with a large nested if/...
1
vote
1answer
203 views

C++ - Assimp - OpenGL vertex data feed problem

I'm getting a very weird problem where OpenGL doesn't use the hardware to render anything, so I get just a cleared blank screen. Here's some code: ...
0
votes
2answers
509 views

Unresolved external symbol _glad_XXX

I am relatively new to C++ but I have a few years of java experience. I decided to try to make a game with C++, In contrast with the handful of games i have written in Java with lwjgl. I am having a ...
0
votes
0answers
31 views

Particle system and 3D scene not getting rendered together

I have been following this lesson for implementing a particle system inside a 3D scene whose code is here in github. My entry point and initialization looks like : ...
4
votes
1answer
160 views

Normal mapping soft question: What could this be?

So I'm trying to implement tangent space normal mapping. I bind the uniforms, load the attributes, set the shaders, and out comes this: This happens on the sides only, and not when in direct light. I'...
1
vote
2answers
133 views

Are closing window and destroying DirectX11.1 independent?

I have a project with DirectX support. In this program uses two threads. One is a dedicated message loop and the second is executing DirectX API's. The question is about ending such program. The ...
0
votes
1answer
20 views

glReadPixels with GL_DEPTH_COMPONENT into PBO is slow

I need to read depth buffer back to cpu memory. It may be few frames old, so I use glReadPixels with a buffer bound to GL_PIXEL_PACK_BUFFER. I use several buffers and ping-pong them. Finally, I read ...
1
vote
2answers
369 views

Proper way to update pixel array data

For a game that updates a board every frame I am calculating the next arrangement of board, updating pixel array data and render board as 2D texture to quad the size of the screen using OpenGL. I use:...
2
votes
1answer
92 views

How can I create a pixellated, limited-palette appearance in modern OpenGL?

I wanna get some old art style (256 color, dithering, etc) in modern OpenGL in an effective way. Maybe using a low resolution (320x240) rendered at a bigger space so that the pixels looks "bigger?" I'...
3
votes
1answer
3k views

Key released, multiple Keys, how to go around ncurses limitations?

I have been trying to make a small game in the terminal in C++ using ncurses. After searching around for some time, I came to realize that ncurses is pretty limiting as far as keyboard inputs are ...
0
votes
1answer
41 views

OpenGL 2D Game Render Help

I just recently started using C++ and OpenGL and I am running into an issue. I am not totally sure what I am doing so could you please tell me what I am doing wrong and what I could improve? Here is ...
0
votes
0answers
9 views

What is the best way to create a level shortcut for menu with cocos2d-x?

I have a PageView and I want on every page to have an array of MxN items. Each item is a level icon. What if I want to make not ...
1
vote
0answers
39 views

Random lines drawn on screen while all vertexes are correct

I'm writing a 2D program in which a monocycle follows a Catmull-Rom spline. My problem is when I write the circle, the drawing goes crazy. There is one line on the screenshot (which seems to be 3 when ...
0
votes
0answers
18 views

When trying to render a texture in opengl after including the stb_image.h file in the project i get a linker error

Initially i gave the path of the stb_image.h & stb_image.c file location C/C++ include directories as adding the header file directly to the project was not working.
0
votes
1answer
68 views

Bullet Physics Integration - direct movement of rigid bodies

I'm adding bullet physics to my engine. The physics simulation bits are all working nicely, but one bit I'm struggling with is being able to move objects using their co-ordinates, and then have them ...
1
vote
2answers
68 views
0
votes
1answer
21 views

Uninitialized Variables with Deactivation of Objects in Game Maker Studio 2

I am currently working on some map generation for my GMS2 game, and I have run into an issue that I absolutely cannot figure out. (I am very new to GMS2, so bear with me). I am working on map ...