Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Specular lighting does not appear

I'm struggling to add specular lighting on-top of diffuse lighting and not entirely sure where I'm going wrong. I've followed the instructions given in our lecture but it just doesn't seem to be ...
Skoosh's user avatar
  • 1
0 votes
0 answers
22 views

clion.sh does not exist

I have Unreal Engine in Linux launched with ./UnrealEditor This file here ...
Idriss's user avatar
  • 1
0 votes
0 answers
20 views

3D Impulse based collision resolution not behaving correctly, what could be wrong?

I've implemented a collision resolution system based on Ian Mellington's System Cyclone and afterwards based on the Game Physics Cookbook. Currently the last one is implemented. For some reason the ...
Martin's user avatar
  • 1
1 vote
0 answers
31 views

Separating axis theorem implementation results in limitless extending colliders along the Z axis

I am trying to implement SAT and it works except for the fact that colliders extend infinitely along the Z axis and I can never get past them. I also have confirmed that ...
Jakob Tadej Vrtačnik's user avatar
0 votes
0 answers
24 views

Clarification on scene graph implementation. Adding object/node to a root node or container?

I learned about scene graphs from this chapter on learnopengl and using this I'm trying to make a simple imgui window that can display the scene graph, but one thing that wasn't made clear/I'm having ...
Konjointed's user avatar
2 votes
1 answer
29 views

Godot 3.5: Web Build using custom GDNative C++ Library does not work due to `dlopen` error and failed linking

The Problem Currently I am trying to get the official GDNative C++ example for Godot 3.5, which can be found here working in the Web Export context. So far, I managed to export to X11.64 without any ...
dsacre's user avatar
  • 41
0 votes
1 answer
41 views

Simulated light for a 2D tile-map with just SDL2?

I'm working on a 2D tile-map RPG with C++17 and SDL2 + SDL_Image. There are daily cycles, weekly cycles and seasons. Even a kind of weather engine provides atmosphere. The moods and times of day are ...
El_Codepone's user avatar
0 votes
0 answers
9 views

Unreal Engine FDirectoryWatcherModule catching multiple events per file operation

I followed this post to implement a delegate on a directory that notifies me when a change has happened (add file, delete file or remove file). This works fine, though the issue is that for each ...
afarre's user avatar
  • 101
0 votes
0 answers
67 views

Seperating axis theorem is bugged

I am attempting to make split axis theorem for 2d collision physics. It does works, but is inaccurate. It is based off of: https://www.gamedev.net/tutorials/programming/math-and-physics/a-verlet-based-...
NoStepOnSnek's user avatar
0 votes
3 answers
86 views

What is the best way to implement a scene manager?

I'm trying to create a scene manager system for a small framework I'm writing on top of SDL2. I have implemented a scene management system that works, but I am not sure if it is structured how it ...
Sphereishere's user avatar
1 vote
0 answers
67 views

Use of a Global Shaders in Unreal Engine to apply some pre-processing operations

I'm a little experienced in Unreal Engine, but I don't know the Unreal's graphics programming from a very low level. More in details I would like to know how could use an Unreal's Global Shader to ...
Giuseppe's user avatar
0 votes
0 answers
33 views

How does bullet physics filter 4+ contacts in GJK?

If the bullet GJK (Convex vs convex) collision algorithm has more than four penetrating points, then how is it filtering that down to the four it needs? What I've tried Staring at the code, but I get ...
Baer Ran's user avatar
0 votes
1 answer
30 views

c++ SFML Window in std::thread ignore animation

I have a main window whose loop is just in the program and a Window class in which separate sf::RenderWindow objects are created and the loops for them are in ...
Proger's user avatar
  • 1
0 votes
0 answers
35 views

Need help with artefacts when rendering shadows using a shadow map

I am encountering some weird artefacts when rendering shadows using a shadow map. I am using C++ with Vulkan and GLSL shaders. This is the vertex shader that calculates the ...
Symlink's user avatar
  • 101
-1 votes
0 answers
11 views

IDE cannot build task core minimal.h no such file directory [closed]

I am following udemy and created a cryptraider project I added a grabber component at first it worked fine I added some c++ code to that component bt now I added two more function in the c++ file but ...
Antareep Saha Roy's user avatar
0 votes
1 answer
107 views

Increased CPU usage when rendering sprites

I'm creating a game in modern OpenGL, C++ but I'm having problems with optimization. Whenever I render the sprites the CPU usage starts to increase. Code: ...
FandoraStudio's user avatar
0 votes
1 answer
44 views

Vulkan Phong shader problem

Light increases its intensity as it come closer the origin model. Vertex Shader: ...
BrutaL _'s user avatar
0 votes
1 answer
48 views

When I inherit my own GDExtension class, editor can no longer see the inheriting class

I had two classes in my game, Player and ShootableObject. Both set up as such: ...
Tomáš Zato's user avatar
1 vote
1 answer
77 views

How to use the godot::String % operator for string formating of multiple values?

I tried this: godot::String str = "values: %f,%f"; double a = 1.0; double b = 2.0; str = str % a % b; Result string is: ...
Tomáš Zato's user avatar
0 votes
1 answer
16 views

In Unreal Engine 5, how do I include and use UPlayMontageCallbackProxy::CreateProxyObjectForPlayMontage in C++?

I want to play my UAnimMontage via C++, and in particular, want to make use of the conveniences of UPlayMontageCallbackProxy. ...
brain56's user avatar
  • 209
0 votes
0 answers
48 views

UE5; fatal error: CoreMinimal.h: No such file or directory

I am leaning to use UE5 and am following this tutorial : https://www.youtube.com/watch?v=KQgOqyYoHAs However, when I try to compile a simple pawn class on vscode, I am given the error: "...
AssEat1451's user avatar
0 votes
0 answers
30 views

How can i move actor's bounding box center in relative location in Unreal Engine 5?

This is my situation. I need align the center of the object (it's box) and the center of the scene component. I have only center of the box TVector type or FVector. How can i do it? ...
anime username's user avatar
0 votes
0 answers
86 views

Fast Fourier Transform for Water surface simulation

I want to implement water in my game and have already done it using the Gerstner equation, but the result is not too impressive, then searching the Internet I found an article about how someone made ...
Proger's user avatar
  • 1
1 vote
1 answer
71 views

Blitting GStreamer's decoded buffer into a Unity render texture

I'm working on a Unity native plugin that runs a gstreamer pipeline in the background, decodes it using hardware decoding, then copies the texture over to a render ...
STUDIOCRAFTapps Developpement's user avatar
0 votes
0 answers
35 views

How can I display properties/attributes of an object in an editor?

I'm learning how to make a game engine using SDL and OpenGL and I'm using imgui for the engine editor UI and I'm trying to make a properties panel that displays the properties of the selected object. ...
Konjointed's user avatar
3 votes
1 answer
139 views

Character overlaps with static objects

I am creating a simple OpenGL C++ game. I have a main character (green box) and some static objects (red boxes) positioned as stairs. The problem is as green box is descending down the stairs, it ...
Axel's user avatar
  • 33
0 votes
1 answer
89 views

In C++, should POD-types be used for performance-critical parts, where many instances of the type will be handled?

(In C++) For a type whose instances will be handled in great numbers in performance-critical areas, such as a Vector2 class representing 2D-positions, should such ...
JensB's user avatar
  • 147
0 votes
0 answers
71 views

How to do Tileable Perlin Noise in C++?

I'm currently making a game that is going to involve terrain generation. I've already tried terrain generation using FastNoise2, and it "worked" and honestly would be faster than the "...
ChrisNonyminus's user avatar
0 votes
0 answers
46 views

C++ OpenGL texture coords VBO indexes changes between models

I just load 3 models using assimp into my Engine and have some problems with textures. Through some research, I realized that texture coordinates VBOs indexes changes between models, according to this ...
Proger's user avatar
  • 1
0 votes
0 answers
38 views

Box2d's SetLinearVelocity not working as expected

I'm working in a SFML and Box2d project, and I stumbled with a problem related to the linear velocity of bodies. I've created a simplified version of the project, and the problem still persists, this ...
BOOM's user avatar
  • 11
0 votes
1 answer
105 views

How to design an EventBus(guided by the pub/sub pattern)

I'm working on my game engine, and was faced with the fact, that i don't know how properly design an event system. As a pattern i choose Pub/Sub with an event bus, but i don't know where i should '...
qulop's user avatar
  • 3
0 votes
1 answer
115 views

Untraceable exception in XAudio dll

I'm developing a game using OpenGL and XAudio 2.9. For some reason I am getting an exception in release builds inside the XAudio dll. Here is the exception : Exception thrown at 0x00007FFBB5416EF1 (...
Mike F's user avatar
  • 93
0 votes
0 answers
85 views

Why doesn't multi-constraint work in this case?

The situation is as follows: There are two objects and there are 3 constraints between the two objects. $$ \dot{C}=(\vec{V}_{rel_a} - \vec{V}_{rel_b}) \cdot normalize(\vec{p_{a}} - \vec{p_{b}}) $$ &...
noodle_run's user avatar
-2 votes
2 answers
128 views

Please explain this matrices interpolation code

int rate,frac; sint16 *frmptr[2]; frac = GetFrames(item, frmptr, &rate); ...
black4's user avatar
  • 167
0 votes
0 answers
34 views

Change colors after drawing lines in Pangolin using OpenGL

I am drawing a bunch of lines using pangolin library. Each line has 4 vertex pairs. My goal is to give each line a different colour. Here is the code snippet I am using. In each render loop I do the ...
Nitron_707's user avatar
0 votes
0 answers
52 views

How to extract data about in-game events?

I recently started playing New World, and I thought I would like to create something like a "data collector". It would report data like: during the session, I fired X bullets, type of ...
WILCZUR's user avatar
1 vote
1 answer
128 views

How to get Keyboard working with GameInput on PC in C++

I need some help here. I try this for a while now but it won't work and I can't find anything online. I want to write my own input handling. At first I used XInput for gamepads and Win32 callbacks for ...
Fragrantius's user avatar
0 votes
1 answer
132 views

Should networking and rendering be separated in multiple threads?

I've been trying to code a multiplayer client/server prototype game using SFML's networking. My server and client use TcpSelectors to wait for a certain amount of time for incoming packets without ...
xGolden's user avatar
0 votes
1 answer
81 views

Accessing an Animation Blueprint C++ class from a Character C++ class

This is my first leap out of tutorials and building my own game so bear with me. I've been struggling with getting C++ classes to work with one another and accessing Unreal blueprints from my code. I ...
Aaron Williams's user avatar
0 votes
0 answers
42 views

How do I add a Mesh to an AActor at runtime in c++ in Unreal Engine 5.3

For Unreal 5.0, 5.1 and 5.2 I used the following code to do this: ...
marc40000's user avatar
  • 163
0 votes
1 answer
55 views

2D Batching and correct draw order

I'm encountering a design challenge while developing my 2D C++ OpenGL engine. I'm using a batching technique for rendering my drawable objects, and I want to ensure they are drawn in the same order ...
DDD's user avatar
  • 1
0 votes
1 answer
34 views

Bullet physics linker error

I am trying to build my project in VS, which is a copy of HelloWorld.cpp provided by Bullet. I am getting a list of errors of sort "unresolved external symbol" when I build my project, ...
SigmaKlim's user avatar
0 votes
0 answers
46 views

Why are global constraints so ineffective?

There are two objects here, each with 3 constraint points. I use formula: $$ \lambda=(JM^{-1}J^{T})^{-1}(-JV-b) $$ $$ \Delta V=M^{-1}J^{T}\lambda \ $$ I put the information of the three constraint ...
noodle_run's user avatar
0 votes
2 answers
85 views

Is there a logical reason for SFML's Vector2 being templated?

The game development library SFML has a Vector2 class template (and a Vector3 for that matter), which can use any arithmetic ...
JensB's user avatar
  • 147
0 votes
0 answers
48 views

How to handle collision detection with different 2D shapes while maintaining performance? Is polymorphism appropriate?

If I'm making a small library for handling 2D shapes, should polymorphism generally be avoided? I know that it can worsen performance but it's not like polymorphism is never used in game development ...
JensB's user avatar
  • 147
1 vote
0 answers
180 views

Selecting tiles with mouse on isometric map with height and slopes

I want to implement an isometric map with rectangular tiles similar to how it was in simcity 2000, where tiles could have different heights and tiles with different heights were connected by slopes. ...
SavedowW's user avatar
0 votes
1 answer
62 views

Vertices index access violation when loading mesh by Assimp

Currently, i am implementing the model loading feature for my game engine using Assimp. But i got an access violation error when loading my FBX model. The problem is that although the ...
Quang Phạm's user avatar
0 votes
0 answers
56 views

How is it possible that double buffering is enabled yet the back buffer doesn't exist?

I am working on an existing OpenGL application and am currently trying to figure out why I am getting a black screen. So I am wondering how its possible that double buffering is enabled and the back ...
Doug Ray's user avatar
  • 143
0 votes
0 answers
50 views

Sequencing interaction between rendering/animation and game logic in Poker game

I am building a two-player(CPU-User) Poker application with C++ and OpenGL. Currently the application just renders the graphics, keeps track of which button is pressed, value entered in textbox ...
Incompleteness's user avatar
0 votes
1 answer
27 views

Why isn't my framebuffer getting updated?

...
Cedric Martens's user avatar

1
2 3 4 5
86