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
1answer
40 views

Scripting Language To Renderer Architecture

I am currently designing the scripting side of our engine. The idea is an entity-component system. That means most of the coding is done via jobs. The language we are using is compatible to C. The ...
0
votes
1answer
55 views

How do you use configuration files to describe the contents of an entity in an ECS-system?

One of the advantages that's often brought up when talking about ECS-systems is that they allow a higher degree of flexibility in regards to Data vs Code. Without the limitation of hard-coded types, ...
0
votes
0answers
40 views

How do I make a grid with heat data?

So I am working on a game in which I am working on a temperature system that goes about like this; Lines of latitude will be markers across the map, starting at 1 (north pole) going to 200 (south ...
0
votes
1answer
55 views

posting cards in memory game

I am making a memory game using opengl and c++. I am able to post playing cards to the screen. I am having a problem posting two identical cards randomly to the screen. I am able to post 10 cards to ...
3
votes
2answers
240 views

How do different compositions/types of entities interact in an ECS-system?

I have a working ECS-system set up, largely inspired by this brilliant article (not at all required reading to be able to answer my question) on https://indiegamedev.net/ showcasing an ECS-system with ...
2
votes
1answer
192 views

Smoothing multiple combined vector translations

I am currently working on my arm/weapon rig for an fps game written in a custom engine. I am to the point where I am implementing the movement of the arms/weapon (hereby referred to as weapon), for ...
0
votes
0answers
15 views

SFML: Object's shape not rendered on the window

I want to be able to render sf::CircleShape (representing pointwise charges) when pressing mouse buttons on the window. The problem is easy enough, however the ...
0
votes
0answers
21 views

Program doesn't detect a ray triangle intersection correctly

Every frame I check if a ray intersects a triangle. But in practice program tell me that triangle is intersected only when I move camera on to it's position. I don't even have to put cursor on a ...
-1
votes
0answers
119 views

How to build Assimp with MINGW and use it in my C++ project

I need to work with different 3D formats, just read and write, nothing else. After reading some threads here decided that Assimp could be the solution. I've downloaded the latest version of that ...
0
votes
0answers
17 views

Applying HLSL Pixel Shader to RenderTarget in Directx11

I'm developing a unity native plugin and I'm new to DirectX11. In unity I pass input render target, depth and output render target to C++ side. ...
0
votes
0answers
48 views

convert fbx to 3ds using assimp

I have found some kind of explanation about working with Asset-ImporterLib here. Unfortunately it's very badly done and really important things are not explained at all. There is a piece of code which ...
0
votes
0answers
52 views

Rotate a texture around its center

I am tryna developing a little game library in C++ with OpenGl. I got stuck on the texture rendering step. My achieve is that to rotate the texture around its center. Now, I already know that the ...
0
votes
0answers
35 views

How to properly terminate an openGL application?

I use GLFW in C++. I close my application the following way: ...
0
votes
1answer
62 views

C++ Game multiplayer? (Mud)

I have made a simple turn based mud and wanted to implement a cheap way of allowing the client to host the game and others to join. Years back (I am just getting back into programming after a long ...
4
votes
0answers
63 views

How inefficient is my ray-box-intersection algorithm?

One of the most critical parts of my raytracer is the calculation of a collision between ray-box which is done following way: ...
1
vote
0answers
60 views

Unreal Engine 4.26: How to serialize and load the array of custom UObjects (TArray<UObject*>) in C++?

I have a UProperty in struct which is a TArray<UCoverInfo*> where UCoverInfo is inherited from UObject: ...
0
votes
1answer
62 views

Extensible 2D Rendering with ECS Architecture

I am currently creating a 2D game/game engine using an ECS architecture. Currently I have a renderer_2d system which is a function that takes all ...
0
votes
2answers
109 views

Collision detection between transformed meshes (not primitives)

I know questions related to collision detection have been asked multiple times, but I find all of them like this and this depend on the assumption that I have some sort of measurement of the object ...
0
votes
0answers
40 views

Opengl. A single texture is applied to all my objects. glTextureStorage2D Error faced

I can't seem to figure out why a single texture is applied to all my objects. I have three objects - fence, ground and cone but they get weirdly placed textures or a single texture on all of them. ...
0
votes
1answer
25 views

How to change uwidget alignment on/after construction?

Have no idea how to align/realign uwidgets via c++. I have a following widget structure: UButton->UOverlay->UImage. Have to make UOverlay to HFill and VFill the UButton
0
votes
1answer
18 views

UWidget::SynchronizeProperties() is not being called on in editor property change

I have to change the children list every time the enum variable property is changed from widget editor. None of the functions I've tried so far seem to have worked (virtual void OnEndEditByDesigner(); ...
0
votes
0answers
44 views

Arcball camera panning - how to apply mouse coordinates to position regardless of orientation

I have an Arcball camera with panning and rotation working properly; however, panning does not work as intended after rotation is happening. Here are my panning and rotation functions: ...
0
votes
0answers
70 views

What is the most performant way for a game engine to poll gamecontrollers?

I am working on a game engine, and currently I hesitate on this decision. I developed a library that allows Dualsense and Dualshock4 devices to be used in the engine. XBox Support is made possible via ...
0
votes
1answer
132 views

How do game loading screens work?

I have successfully developed a 2D game. I display sequential introduction images then load the start screen after that of course I load the game level in a single thread, it is a basic functional ...
0
votes
1answer
59 views

I can't render faces properly in my DirectX11 project

For some reason, only back-faces are rendering, even if I set the rasterizer and stencil buffer and state to any values. Setting D3D11_CULL_NONE, ...
0
votes
0answers
34 views

Unreal Engine - Looping Procedural Mesh Terrain

We are building a procedural voxel terrain based game and have been doing really well. However we have hit a challenge that we have half the solution for. We need to figure out how to loop the terrain ...
0
votes
1answer
58 views

What is wrong with my terrain lighting?

I've just implemented a simple algorithm to calculate terrain vertex normals and I'm using diffuse and ambient light currently, but for some reason the squares that make up my terrain are visible when ...
0
votes
0answers
22 views

Need an approach for mounting turrets

I'm working on a game with the ability to customize the type of turrets on your starship. My question is how would I go about positioning the turret mesh at the hardpoint locations. Do I need to ...
1
vote
1answer
69 views

Find those points lying on a circle from a ton of points

Given a 2d scene and 10,000 players with coordinates in the scene, I want to implement a function, the input is a circle with the center coords and its radius, the output is those players that lie on ...
0
votes
0answers
75 views

FBX SDK Transformation/Scaling

I am using the FBX SDK to load 3d models into my rendering application. I can successfully traverse the object hierarchy and pull vertex data for the individual scene meshes and display the meshes in ...
1
vote
1answer
63 views

Transforming 3D coordinates to 2D isometric position

I'm trying to render isometric maps, my final goal is to render scenes that resembles Snake Rattle 'n' Roll: So I started by rendering cubes: For now I have an array with a collection of 3D vectors ...
0
votes
0answers
34 views

MMORPG UE4 Tooling

I'm building an mmorpg using UE4 on the client side with a custom server solution. My target is to build server only data in UE4 editor. Define spawn points Define spawn areas etc I've struggled a ...
1
vote
1answer
61 views

Do external graphics cards for laptops help decrease compilation time? [closed]

Can modern compilers use the power of a graphics card to shorten compilation time? Or is this solely based on the CPU and RAM? For example, can GCC utilize an external graphics card connected via a ...
0
votes
2answers
88 views

Trying To Restart My Shooting Arrow With Overlap

I am trying to restart my shooting arrow if the arrow hits the roof but the bool is not changing [and giving a] cast failed [error] this is my shooter character shooting arrow ...
0
votes
1answer
64 views

Timestep Jittering

I've been trying to implement the famous Fix your timestep in C++ and SDL2 using a simple example. I have a square that moves around on the screen but I cannot understand why it keeps jittering/...
0
votes
0answers
41 views

How to make a camera zoom effect in SDL2?

I'm trying to make an pseudo-camera in my SDL2 game. The WASD input movement is already working fine (it's a camera that points aims on the center of the target), but i'm struggling on making an zoom ...
0
votes
1answer
122 views

How do I correctly use userData in Box2d?

Many guides used userData. But with the source of Box2d I have, I don't see the SetUserData functions in the code as I see them in the guides. After understanding ...
0
votes
0answers
21 views

How can I bind fields of USTRUCT with text fields in widget UMG?

I have USTRUCT object. Its fields are filled in c++ code from a JSON object and I need to bind its fields with the content of text fields in a widget. So the flow of my program should be like this: ...
0
votes
1answer
159 views

Cannot access private member declared in class

I have a class definition as such: ...
0
votes
0answers
43 views

Advice on Multi-Threading Vertex Buffers in Vulkan (or any api)

I have managed to multithread everything in my voxel engine besides two vkCmdCopyBuffer() calls that constantly update a single massive vertex and index buffer using an array of thousands of regions, ...
-1
votes
1answer
100 views

Cant compile raylib project with Physac

I'm trying to learn how to use raylib with physac, however I'm quite new to using a c++ compiler and after a few hours trying to get a minimal example working, I came here seeking your help. here is ...
0
votes
1answer
29 views

Keeping two triangles with different scale attached during rotation

I'm making a simple Lunar Lander clone. The ship is a triangle, and I'm trying to draw the exhaust fumes of the ship. I'm wondering how to draw the exhaust so it's always relative to the ship. I'm ...
1
vote
1answer
177 views

What is a efficient way for adding and removing vertices and indices in C++?

So I have this middle-large mesh that is composed from vertices and respective indices. At some point I need to add new ones and remove some. But that brings me into trouble. Because if I have, for ...
1
vote
3answers
123 views

Are there conventions on what exactly to log in a game?

I am currently developing a game in C++, using SDL2. For logging, I wrote this Log class: Log.h ...
0
votes
2answers
70 views

Getting cameras from World (Unreal Engine) to set up a static camera only game

I'm afraid I have another Unreal related question. I'm trying to use ACharacter for my characters but the game uses ONLY static cameras (ie. they shouldn't even ...
0
votes
0answers
15 views

How to sort segments by their angle relative to the specific angle range?

Problem I'm trying to implement a simple algorithm that will sort segments by their angle based on the given angle range. Each of these segments has one common end. These sorted segments will be later ...
0
votes
1answer
34 views
0
votes
0answers
18 views

Add some randomness to the velocity when a ball bounces using UProjectiile Movement Component

I've just started to learn Unreal Engine 4.26.2 with C++. I’m developing a clone of Arkanoid and I’m using UProjectile Movement Component to move the ball. When the ball hit something it always ...
1
vote
0answers
206 views
2
votes
2answers
102 views

How to orient a rectangular object, so when a sphere ( ball ) collision happens to redirect it towards a point?

I have a rectangular object and a ball ( sphere ) in 3D and would like to orient the rectangular object in such way that when a collision with the ball and the object happens, to redirect the ball ...

1
2 3 4 5
82