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.

0
votes
0answers
10 views

Solve Constraints with linear factor of 0 in Bullet Physics

In my code I need to set the linear factor for velocity to 0 (sometimes). For example, game->rigidBody->setLinearFactor(btVector3(0, 0, 0)); When this is done,...
0
votes
0answers
7 views

btBvhTriangleMeshShape useQuantizedAabbCompression Crash

I use btBvhTriangleMeshShape for static world collision. Generally this works fine, but recently I have encountered situations where the construction of btBvhTriangleMeshShape would crash. In debug ...
0
votes
0answers
14 views

Cascaded shadow map proplems

I am implementing the cascaded shadow map technique with OpenGL and C++, I have some strange behaviors I think my issue with calculating the frustum orthographic matrices, corners and cascaded ends, I ...
1
vote
0answers
11 views

Issue with creating a view in a tilemap environment (SFML)

I'm experiencing a problem with my simple 2d tile map game. I have a character on screen that moves in all directions in a world made up of tiles/blocks. Basically I have created an array that with ...
0
votes
0answers
22 views

3d characters on 2d background game suggestions [on hold]

First off, I am wanting to get back into making games, I have made a few for personal use in gamemaker but never finished them as school always got in the way or they would get deleted when my ...
0
votes
0answers
15 views

How to use opengl3.3 with CUDA using OpenGL Interoperability

I want to render a mesh whose vertices and surfaces are populated and constantly updated inside the GPU. For simple rendering using opengl3.3 alone, I have brought out the data from the GPU to CPU ...
1
vote
1answer
37 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 ...
0
votes
0answers
28 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-...
-3
votes
0answers
31 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
35 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
27 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
23 views

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

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
2answers
52 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
28 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
2answers
66 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 ...
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
0answers
32 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 : ...
0
votes
1answer
21 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 ...
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 ...
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 ...
1
vote
0answers
40 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
20 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
69 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
69 views

Wrong FPS calculations in GLFW game

In my game loop, ...
0
votes
3answers
100 views
0
votes
1answer
24 views

ue4 - create a instance of a c++ class within a blueprint

i'd like to create a instance of a c++ written class in a blueprint. that's my current approach, but the instance is 'None'. any advices? =)
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 ...
0
votes
0answers
29 views

Problems setting up Epic online services in an Unreal Engine 4 project

I have been attempting to get the new Epic online services APK working in a UE4 project. When I add the header files and the .lib file to the project, Visual Studio does recognize the various ...
0
votes
0answers
30 views

32 bit record encountered in module ***.ASM (*** has a file name)

I am reading Amazing 3D Games Adventure Set by Lary Meyers. The book is old, and I have got the .lib file compiled correctly onto my computer. The issue is, however, when I run the actual demos from ...
0
votes
0answers
96 views

AI movement in a tile based game

I've been tryin to make My AI follow my A* path in grid. the problem is that is goes off course and doesn't move along the path very well. currently got it to move only left and up. how I intended ...
0
votes
0answers
44 views

GLFW Handling best practice

I'm currrently working on a small Game Engine using OpenGl. For Window and Context managing I'm using the common glfw library. At the Moment my glfw calls and callback functions sit kind of loseley ...
0
votes
1answer
68 views

DirectX depth/order render issue

I have what appears to be a depth or order rendering problem which I have never seen happen before. My terrain and water are rendered with my displacement shader, and at the moment all other models ...
0
votes
1answer
46 views

Getting Position of a Player in a grid

So I am making a pacman-like game. the game has tiles/grid. I keep the node data in a struct: ...
1
vote
0answers
53 views

2D isometric pixel art technique

I recently started to work on a project which consists in developing a game similar to the Urbz on Gameboy Advance (the Handheld version of the game developed by Griptonite Games). This is mainly a ...
0
votes
0answers
31 views

Godot - Is there a way to pass a specific subclass of Node to a GNative C++ class?

I have a GDNative class that looks like this: ...
2
votes
1answer
71 views

UE4 crashes on launch when using custom components in C++?

I created SM_Door in my Editor with a custom Actor class named "Door" to fire some events like open and close. The problem is, ...
0
votes
1answer
34 views

Z rotation matrix inverting object

I'm currently creating a 3d game where I need to rotate shapes. To do se, I created a rotation matrix for each axis, X, Y and Z. X and Y are giving me expected results, but not Z who kind of "inverts ...
0
votes
1answer
40 views

3d isometric projection matrix?

I have 3d vectors that I want to project as 2d vectors to draw my shapes. I got a 3d vector cameraPosition, a 3d vector cameraDirection, a float renderDistance. I need to create an orthogonal / ...
2
votes
2answers
123 views

C++ create array of multiple types

I tried to create an array Entity[] with elements Human and Zomby. ...
1
vote
1answer
112 views

Passing a value to a stuct

So I've been making a 2D grid and pathfinder using SFML. Now I ran into a problem. I've been making a vector for the path nodes. ...
0
votes
1answer
64 views

DirectX 11 generate normals for tessellated triangles

I've spent a couple days looking for an answer to this - How can I access the newly created triangles of tessellation and generate normals for them? I've followed much of the shader code from the ...
0
votes
1answer
65 views

Integrating Bullet3 into a C++ project - Linking to libraries

I've been following the BulletQuickstart guide and I get as far as generating the vs2010 solution and converting to newer. I've also been following this very good answer from a few years ago and have ...
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'...
1
vote
0answers
26 views

How to make only-head rotation in UE4?

I've made a character, attached a camera to it and setted input. But now i want only character's head to rotate with mouse, but not a whole character (player capsule rotates with Q and E keys). I ...
0
votes
2answers
170 views

How can I benefit when I don't use gpu?

I am trying to make a 3D game with C++, SDL, and OpenGL. My program roughly looks like this: control function has only CPU operations. draw function has CPU and OpenGL functions operations. I just ...
0
votes
0answers
65 views

Having a hard time trying to render an OpenGL scene to ImGui window with deferred rendering

Here's the imgui window that i want my scene to render to. ...
0
votes
0answers
38 views

Making a weapon stay with a first person camera

I was looking all over the internet for any information on how to get a gun to stay with a camera as done in FPS games. I am using OpenGL and GLSL to carry this out. I knew a way of how to do this ...
0
votes
1answer
76 views

How should rendering be structured using SDL?

This question is probably well documented but I can't find any resources. Basically I'm not sure how to structure rendering with SDL in my code. I made a render class which calls the api and the ...
1
vote
1answer
83 views

Handling localization strings in a performant game engine c++

I'm wondering what's the approach for handling localization in a modern game engine. Typically I'd reference a string that would serve as a tag (say: AURA_POISON_CLOUD) in the code and then later in ...